Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/KevinZai/commandernpx agentmods add skills/kevinzai/commander/ccc-knowledgeWrote 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.
[](https://agentmods.dev/skills/kevinzai/commander/ccc-knowledge)<a href="https://agentmods.dev/skills/kevinzai/commander/ccc-knowledge"><img src="https://agentmods.dev/badge/skills/kevinzai/commander/ccc-knowledge/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.
<a href="https://agentmods.dev/skills/kevinzai/commander/ccc-knowledge"><img src="https://agentmods.dev/badge/skills/kevinzai/commander/ccc-knowledge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00057 | $0.02738 |
| Opus 5.5 | $0.00023 | $0.01095 |
| Sonnet 5.5 | $0.00011 | $0.00548 |
| Haiku 4.5 | $0.00006 | $0.00274 |
Grade A, and why
ccc-knowledge 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.
$ccc-knowledge — search what we learned
CC Commander · $ccc-knowledge · past lessons from <config dir>/commander/knowledge/ (~/.claude/commander/knowledge/ by default; the config dir is CCC_CONFIG_DIR, then CLAUDE_CONFIG_DIR, then ~/.claude), searchable in one step.
Placeholders like ~~knowledge base refer to connected tools. See CONNECTORS.md.
When to use / when not to
- Use to recall lessons before a similar task, review outcomes by category, or record a lesson by hand.
- Use
$ccc-recallto search past session transcripts, and$ccc-memoryfor project memory inCLAUDE.mdandmemory/. This skill reads only the Commander knowledge directory.
What the directory holds
| File | Written by | Used here |
|---|---|---|
kl-<epoch-ms>.json |
the CC Commander CLI (commander/knowledge.js) after a dispatched task, or "Add a lesson" below |
lessons: timestamp, task, outcome, category, keywords, patterns.{techStack, successPatterns, errorPatterns} |
session-*.json |
the plugin SessionEnd hook | session stubs (sessionId, startedAt, endedAt); counted, not shown as lessons |
auto-captures.jsonl |
the knowledge-capture PostToolUse hook | one line per Write/Edit (timestamp, tool, file); counted in stats |
The directory can hold thousands of files, so never glob it with ls *.json (the shell fails with "argument list too long"). Every read goes through the query command in step 1.
What happens
1. Run the query command
All modes use this one command. Replace MODE with recent, search, category or stats, and ARG with the count, topic or category name (quote topics).
node -e '
const fs=require("fs"),path=require("path"),os=require("os");
const dir=path.join(process.env.CCC_CONFIG_DIR||process.env.CLAUDE_CONFIG_DIR||path.join(os.homedir(),".claude"),"commander","knowledge");
const legacy=path.join(os.homedir(),".claude","commander","knowledge");
const dirs=path.resolve(dir)===path.resolve(legacy)?[dir]:[dir,legacy];
const [mode="recent",arg=""]=process.argv.slice(1);
const src={};for(const d of dirs){let n=[];try{n=fs.readdirSync(d)}catch{continue}for(const f of n)if(!(f in src))src[f]=d}
const names=Object.keys(src);if(!names.length&&!dirs.some(d=>fs.existsSync(d))){console.log("EMPTY dir-missing");process.exit(0)}
const L=[];for(const f of names){if(!f.endsWith(".json")||f.startsWith("session-"))continue;
try{const l=JSON.parse(fs.readFileSync(path.join(src[f],f),"utf8"));if(l&&l.timestamp)L.push(Object.assign({file:f},l))}catch{}}
L.sort((a,b)=>String(b.timestamp).localeCompare(String(a.timestamp)));
const sessions=names.filter(f=>f.startsWith("session-")).length;
let captures=0;for(const d of dirs){try{captures+=fs.readFileSync(path.join(d,"auto-captures.jsonl"),"utf8").split("\n").filter(Boolean).length}catch{}}
if(mode==="stats"){const by=k=>L.reduce((m,l)=>{const v=l[k]||"unknown";m[v]=(m[v]||0)+1;return m},{});
console.log(JSON.stringify({lessons:L.length,outcome:by("outcome"),category:by("category"),sessions,captures}));process.exit(0)}
if(!L.length){console.log("EMPTY lessons=0 sessions="+sessions+" captures="+captures);process.exit(0)}
const q=String(arg).toLowerCase();
const hits=mode==="search"?L.filter(l=>JSON.stringify(l).toLowerCase().includes(q))
:mode==="category"?L.filter(l=>(l.category||"general")===q):L;
const n=mode==="recent"?(Number(arg)||3):10;
const p=l=>l.patterns||{};
for(const l of hits.slice(0,n))console.log(JSON.stringify({date:String(l.timestamp).slice(0,10),category:l.category||"general",
outcome:l.outcome||"unknown",task:String(l.task||l.description||"").slice(0,120),worked:p(l).successPatterns||[],
failed:p(l).errorPatterns||[],stack:p(l).techStack||[],file:l.file}));
if(!hits.length)console.log("NO-MATCH "+mode+" "+q);
' MODE ARG
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago Changed · -1 lines 80aff65d27b9
- 1mo ago Changed · +3 lines b06514e9ddda
- 1mo ago Changed · +46 lines · +17 tokens per session scan B → A b6abd761b9e2
- 3mo ago First seen · 145 lines · 40 tokens per session scan B e640aec4d929
ccc-knowledge is a skill published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 2,738 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-08-31.
ccc-knowledge compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ccc-knowledgeKevinZai/commander | Skill | 6 | today | MIT | A | 57 | Claude Code, Codex |
| agent-memory-mcpdavila7/claude-code-templates | Skill | 35k | yesterday | MIT | A | 26 | Claude Code, Codex |
| token-optimizationcwinvestments/memstack | Skill | 433 | 19d ago | MIT | A | 79 | Claude Code |
| memory-synckochetkov-ma/claude-brewcode | Skill | 41 | yesterday | MIT | A | 37 | Codex |
| debt-ops-initbcanfield/agentic-tech-debt | Skill | 9 | 2d ago | MIT | A | 76 | Claude Code, Codex |
| debt-ops-metricsbcanfield/agentic-tech-debt | Skill | 9 | 2d ago | MIT | A | 74 | Claude Code, Codex |
| knowledgebaseandisab/swe-marketplace | Skill | 23 | 3d ago | MIT | A | 210 | Claude Code |