ccc-compound

ccc-compound is a command for Claude Code from KevinZai/commander. It costs 46 tokens per session (1,105 once invoked), scanned A, original, MIT.

A command for recording lessons, decisions, and useful patterns from completed coding work in project files for later reference.

In plain words
What is it for?
Use it after a task to capture learnings, or use its review and prune options to inspect and clean up stored lessons.
Why use it?
It prevents useful experience from being forgotten between tasks and helps identify lessons that are no longer relevant.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Use it after a task to capture learnings, or use its review and prune options to inspect and clean up stored lessons.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kevinzai/commander/ccc-compound
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.

Clone the repo
git clone --depth 1 https://github.com/KevinZai/commander

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ccc-compound

README.md
[![agentmods](https://agentmods.dev/badge/commands/kevinzai/commander/ccc-compound/github.svg)](https://agentmods.dev/commands/kevinzai/commander/ccc-compound)
Your own site
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-compound"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-compound/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ccc-compound

Your own site · 80×15
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-compound"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-compound.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00046 $0.01105
Opus 5.5 $0.00018 $0.00442
Sonnet 5.5 $0.00009 $0.00221
Haiku 4.5 $0.00005 $0.00111

Measured 5d ago against content hash f1887ff05d2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ccc-compound 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 5d ago.

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.

commands/ccc-compound.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/ccc-compound — persist what this task taught

CC Commander · /ccc-compound · post-task learning capture so the next task starts cheaper. Pattern credit: Compound Engineering.

Arguments

$ARGUMENTS:

  • empty — capture learnings from the current session (default flow below)
  • review — show accumulated lessons; change nothing
  • prune — propose outdated lessons for removal; delete only after confirmation

If review

  1. Read tasks/lessons.md and list ~/.claude/learned-skills/ (either may be absent; say so).

  2. Print:

    COMPOUND REVIEW
    Lessons:        <n> entries across <m> dates
    Learned skills: <k> files
    <lessons grouped by date, most recent first>
    
  3. Stop. Do not extract or write anything.

If prune

  1. Read tasks/lessons.md, the project CLAUDE.md and the files each lesson names.
  2. For each entry, decide whether it still applies to the current code. List the stale ones with a one-line reason each.
  3. Ask with AskUserQuestion (Codex: a plain-text question):
    • 🟢 Remove the listed entries — edits tasks/lessons.md
    • Pick entries one by one — confirm each before removing
    • Keep everything — no change
  4. After editing, run git diff --stat -- tasks/lessons.md and report the removed line count. Stop.

Default: capture learnings

  1. Review what just happened. Run in parallel:

    git log --oneline -10
    git diff --stat HEAD~3
    

    If HEAD~3 does not exist (new repo), use git diff --stat against the first commit or the working tree. Then scan the conversation for decisions made, corrections received and patterns discovered.

  2. Extract learnings into three groups; skip any group with nothing meaningful:

    • Patterns: code patterns that worked (architecture, data flow, API design), tool or library usage worth repeating, efficient workflow sequences.
    • Corrections: what went wrong and its root cause, the fix, and how to prevent the class of error.
    • Decisions: what was decided and why, alternatives rejected, constraints that drove it.

Read the full file on GitHub · 111 lines

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. 5d ago Changed · -13 lines · +27 tokens per session f1887ff05d2e
  2. 1mo ago First seen · 124 lines · 19 tokens per session scan A 2463ed426d82

Subscribe to this mod's changes

ccc-compound is a command published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,105 once invoked, about $0.0002 per session on Opus 5.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-09-03.