Ranks files by relevance to the user's task — based on git state, mentioned paths, and historical patterns — with token-budget-aware offset/limit suggestions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-context-optimizer:cco-packThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
When the user runs `/cco-pack` or asks "what files do I need for X", build a curated, token-budget-aware list of files to load instead of guessing or reading the whole repo.
When the user runs /cco-pack or asks "what files do I need for X", build a curated, token-budget-aware list of files to load instead of guessing or reading the whole repo.
node ${CLAUDE_PLUGIN_ROOT}/src/smart-pack.js "the task description"
Or for the current git state without a description:
node ${CLAUDE_PLUGIN_ROOT}/src/smart-pack.js
Or to feed it back into automation as JSON:
node ${CLAUDE_PLUGIN_ROOT}/src/smart-pack.js --json "..."
Priority order:
For each file the pack also suggests offset / limit — pointing at the structurally relevant section based on file landmarks (function/class declarations near task keywords).
Pack stops adding files once it would exceed 25% of the user's effective context budget. The budget itself respects the configured model (e.g. the full 1M window for opus-4.8 — 1M is standard on Opus, no premium tier).
After running, present the list to the user and offer to:
/cco-templates create <name>)npx claudepluginhub egorfedorov/claude-context-optimizerSuggests optimal files to preload based on task description, historical patterns, and templates. Activates on new tasks, file reading mentions, or session setup.
Hierarchical context loading strategy for AI coding agents. Loads rules, architecture, source, errors, and conversation in priority order to maximize signal per token.
Creates minimal, high-signal CLAUDE.md and AGENTS.md context files for repos using empirical best practices. Triggers on /init, create/update requests, or missing context during brainstorming.