context-packer

Build a compact, high-signal context brief (files, symbols, recent commits) instead of pasting large code blocks

⭐1stars🔀0forks📁View on GitHub🕐Updated Nov 10, 2025

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.
namecontext-packer
descriptionBuild a compact, high-signal context brief (files, symbols, recent commits) instead of pasting large code blocks
version0.1.0
tags[context, tokens]

Context Packer

Purpose

Reduce token usage by summarizing only what’s needed for the task.

Behavior

  1. 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
  2. Include ≤1 short code window only if critical.

Guardrails

  • Never paste large files; link paths/lines instead.
  • Prefer bullets over prose.

Integration

  • UserPromptSubmit enrichment; before sub-agent calls.

Example Prompt

Pack context to implement auth middleware with minimal tokens.