pack

A command that creates a Repomix snapshot, which is a condensed copy of a code repository for use as AI context. It can include the whole repository or selected file patterns and saves the snapshot for a feature.

In plain words
What is it for?
Use it for repositories with many files, multi-repository features, or design reviews that need only the files affected by a change.
Why use it?
It avoids repeatedly scanning a large codebase during planning and system design. It also helps combine context from multiple repositories while keeping the amount of code under control.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/pierry/harness-kit/pack
Clone the repo
git clone --depth 1 https://github.com/Pierry/harness-kit

Made for: Claude Code.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.00534
Opus 5 $0.00009 $0.00267
Sonnet 5 $0.00004 $0.00107
Haiku 4.5 $0.00002 $0.00053

Measured yesterday against content hash 95b3ea5355a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pack scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/context/pack.md · 60 lines

What it actually says

Build repomix snapshot of target repo. Used by /sse:plan, /sse:sdd supervisor eval, and multi-repo PRPs.

Inputs

  • Arg 1 (required): feature_id (matches PRD/PRP filename basename)
  • Arg 2 (optional): target repo path (default = cwd)
  • --include "glob": narrow scope (e.g. --include "src/auth/**"). Repeat with comma-separated globs.
  • --style xml|markdown: output format. Default xml.

Pre-flight

Run command -v repomix. Missing → block with install hint:

repomix not installed
install: npm i -g repomix  |  brew install repomix
docs:    https://repomix.com

Steps

  1. Bash: .claude/scripts/pack-repo.sh <feature_id> [target] [--include glob] [--style xml]
  2. Script writes .claude/runtime/cache/repomix/{feature_id}.{style}
  3. Report path + size + token estimate

When to use

  • Target repo > 50 files and stages keep re-grepping same context
  • Multi-repo feature: pack each repo, supervisor eval reads concat
  • SDD loop: pack {changed files} ∪ {PRP "Repos and files touched"} for cheaper per-iter eval

When NOT to use:

  • Small repo (<20 files): grep is fine
  • Pack would exceed context budget (>200k tokens): narrow with --include

Reply format

Pack complete.
  feature:  {feature_id}
  target:   {target_dir}
  style:    {xml|markdown}
  include:  {glob | (default .gitignore aware)}
  path:     .claude/runtime/cache/repomix/{feature_id}.{ext}
  size:     {N} bytes
  tokens:   {N} (repomix estimate)
  next:     consumed automatically by /sse:plan, /sse:sdd if cache present

Cleanup

Pack invalidated when:

  • /pipeline:reset runs (clears all caches for active feature)
  • Manual: rm .claude/runtime/cache/repomix/{feature_id}.*

Pack is snapshot, not live. Re-run when target repo materially changes mid-feature.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 60 lines · 18 tokens per session scan A 95b3ea5355a1

Subscribe to this mod's changes

pack is a command published in the GitHub repository Pierry/harness-kit (3 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 534 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.