context-packer
Build a compact, high-signal context brief (files, symbols, recent commits) instead of pasting large code blocks
When & Why to Use This Skill
Context Packer is a high-efficiency Claude skill designed to optimize token usage and improve model reasoning by generating compact, high-signal context briefs. Instead of pasting large, redundant code blocks, it extracts essential file maps, key symbols, and recent commit history to provide the AI with a precise architectural overview, significantly reducing costs and preventing context window overflow.
Use Cases
- Token Optimization: Condensing large codebases into 10-20 line briefs to save tokens and reduce latency during long development sessions.
- Repository Mapping: Quickly identifying critical files and functions when starting a new feature or debugging task in an unfamiliar repository.
- Sub-agent Orchestration: Providing concise, high-level context to sub-agents to ensure they remain aligned with the project structure without hitting context limits.
- Change Impact Analysis: Incorporating recent commit subjects into the prompt to help the AI understand the latest project evolution and avoid regressive changes.
| name | context-packer |
|---|---|
| description | Build a compact, high-signal context brief (files, symbols, recent commits) instead of pasting large code blocks |
| version | 0.1.0 |
| tags | [context, tokens] |
Context Packer
Purpose
Reduce token usage by summarizing only what’s needed for the task.
Behavior
- Produce a 10–20 line brief:
- File map (key paths)
- Key symbols/functions/classes
- Last 3 relevant commits (subject only)
- Pointers to exact files/lines if code is needed
- Include ≤1 short code window only if critical.
Guardrails
- Never paste large files; link paths/lines instead.
- Prefer bullets over prose.
Integration
UserPromptSubmitenrichment; before sub-agent calls.
Example Prompt
Pack context to implement auth middleware with minimal tokens.