About context-packager
A skill for preparing reusable context bundles before complex AI-assisted analysis. It combines and deduplicates source material, estimates token use, checks context quality, and produces a prompt-ready package.
Key features
- 01Select context layers for a task
- 02Merge and deduplicate source files
- 03Estimate token count and trim content
- 04Score context completeness and relevance
- 05Save a reusable prompt package
Use cases
- 01Preparing context for a multi-step analysis
- 02Combining project schemas and prior findings
- 03Keeping a context bundle within a token budget
- 04Reusing context in follow-up AI sessions
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ nimrodfisher/ data-analytics-skills --skill context-packagerAfter installing, type/context-packagerin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
assets/context_package_template.mdreferences/context_layering_guide.mdcontext_quality_rubric.mdscripts/context_bundler.pytoken_counter.pyDetails
From the project READMEWhen to use
Before starting an AI-assisted analysis session when the task requires more than a single prompt — complex investigations, multi-step analyses, or work that depends on project-specific knowledge. A well-packaged context bundle reduces back-and-forth and produces better first responses.
Process
- Identify required context layers — use
references/context_layering_guide.mdto decide which layers are needed: task definition, business context, data schema, prior findings, constraints, and output format. - Collect and deduplicate sources — run
scripts/context_bundler.pyto merge multiple context files into a single structured bundle; it deduplicates and applies the layering order. - Check token budget — run
scripts/token_counter.pyon the bundle to estimate token count; trim lower-priority layers if over budget (seereferences/context_layering_guide.mdfor trimming priority). - Score context quality — evaluate the bundle against
references/context_quality_rubric.md; a good bundle scores ≥ 7/10 on completeness, clarity, and relevance. - Write the prompt header — prepend a clear task statement to the bundle: what you need, what output format you expect, and any hard constraints.
- Save the package — store the bundle using
assets/context_package_template.mdso it can be reused or updated for follow-up sessions.
Inputs the skill needs
- Task description (what you want the AI to do)
- List of context source files or snippets (schema docs, prior reports, business definitions)
- Token budget (default: 100k tokens)
Output
- Merged context bundle (single text file)
- Token count estimate
- Context quality score
- Ready-to-use prompt with task header (
context_package_template.md)
Comments
Markdown supported