mcpField
C
cco-pack

cco-pack

github.com/egorfedorovAgent workflows125131 installsUpdated 1d ago
Repository

About cco-pack

cco-pack is a skill for selecting repository files relevant to a coding task, helping users avoid loading an entire project. It ranks candidates by task references, Git changes, project history, and keywords, while accounting for a context budget.

Key features

  1. 01Task-aware file ranking
  2. 02Git working-tree change detection
  3. 03Relevant section offset and limit suggestions
  4. 04Context-budget-aware file selection
  5. 05JSON output mode

Use cases

  1. 01Find files to load for a described task
  2. 02Select relevant files from the current Git state
  3. 03Pass a curated file list to automation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/egorfedorov/claude-context-optimizer --skill cco-pack

After installing, type/cco-packin Claude Code to confirm it loaded.

Details

From the project README

Smart Context Pack

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.

How to use

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 "..."

How it ranks files

Priority order:

  1. Mentioned in prompt — explicit file paths or recognisable names → relevance 100
  2. Modified in git working tree → 85
  3. Historically useful in this project (high confidence, edited often) → up to 70
  4. Keyword match against the task → up to 70

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).

Token budget awareness

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-5.5 — 1M is standard on Opus, no premium tier).

Presentation

After running, present the list to the user and offer to:

  • Read the top N files with the suggested offset/limit
  • Save the set as a template (/cco-templates create <name>)
  • Drop low-relevance items if they want a tighter pack

Comments

Markdown supported