ccc-memory

ccc-memory is a skill for Claude Code from KevinZai/commander. It costs 55 tokens per session (1,710 once invoked), scanned A, original, MIT.

A two-level memory system for coding-agent sessions: a short CLAUDE.md file loaded every time and a memory/ folder with notes loaded when needed. It keeps important project knowledge across sessions.

In plain words
What is it for?
Use it to save architecture decisions, tricky bug causes, project conventions, key commands, and other knowledge you want to reuse later.
Why use it?
It prevents useful decisions, bug explanations, and project conventions from being forgotten when a session ends.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Use it to save architecture decisions, tricky bug causes, project conventions, key commands, and other knowledge you want to reuse later.

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

Any agent
npx skills add KevinZai/commander --skill ccc-memory
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-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevinzai/commander/ccc-memory/github.svg)](https://agentmods.dev/skills/kevinzai/commander/ccc-memory)
Your own site
<a href="https://agentmods.dev/skills/kevinzai/commander/ccc-memory"><img src="https://agentmods.dev/badge/skills/kevinzai/commander/ccc-memory/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-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevinzai/commander/ccc-memory"><img src="https://agentmods.dev/badge/skills/kevinzai/commander/ccc-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,710 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.00055 $0.01710
Opus 5.5 $0.00022 $0.00684
Sonnet 5.5 $0.00011 $0.00342
Haiku 4.5 $0.00006 $0.00171

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

Security

Grade A, and why

ccc-memory 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 3d 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.

commander/cowork-plugin-codex/skills/ccc-memory/SKILL.md · 165 lines

How it starts

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

$ccc-memory — Two-tier persistent memory

CC Commander · $ccc-memory · important facts survive the end of a session without bloating every turn's context.

On Codex, AskUserQuestion becomes a plain-text question and AGENTS.md plays the role of CLAUDE.md.

When to use / when not to

  • Use after resolving a tricky bug (save the root cause), after an architectural decision (record the reasoning), when a project outgrows one CLAUDE.md section, or before a /clear that would lose a specific insight.
  • Not for session-scoped state that ends with this session: use $ccc-save-session.
  • Not for searching past knowledge: use $ccc-recall.
  • Not for per-skill notes: put those in the skill's own body.

The two tiers

Tier 1 — CLAUDE.md (always loaded). Project type and stack, key paths and conventions, daily commands, cross-cutting style rules. Everything here costs context on every turn, so keep it tight. Use $ccc-claudemd to audit or restructure it.

Tier 2 — memory/ (on demand). Read only the file a task needs:

Path Holds
memory/YYYY-MM-DD-<slug>.md Dated learnings, decisions, corrections
memory/decisions/<slug>.md One file per significant call and why it was made
memory/gotchas/<slug>.md Known footguns, such as a renamed API or changed syntax
memory/preferences.md Curated long-term preferences that did not fit CLAUDE.md

If the project already uses tasks/memory/, use that root instead of memory/.

What happens

  1. Locate the memory root.

    ls -d memory tasks/memory 2>/dev/null; ls memory tasks/memory 2>/dev/null | head -40
    

    No output → there is no memory root yet; add and correct create memory/ with mkdir -p memory (and the needed subdirectory) before writing.

  2. Route by $ARGUMENTS. No argument → ask the first decision below.

    • read (start of a session): skim the filenames from step 1, then Read only the few that match today's task. Report which files were read.
    • add: ask the second decision below for the kind, then write the note with the template in step 3.
    • correct: append a dated entry to memory/preferences.md in corrective framing ("Do X instead of Y — check: …"), with the source of the correction.
    • consolidate (weekly, or before big work): list notes referenced repeatedly and propose moving them into CLAUDE.md; list stale dated notes and propose moving them to memory/archive/. Show the proposed CLAUDE.md diff and the move list, and apply nothing until the user approves with the third decision below.

Read the full file on GitHub · 165 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. 3d ago Changed · +79 lines · +14 tokens per session df3f217e5c3c
  2. 1mo ago First seen · 86 lines · 41 tokens per session scan A baed629b8d07

Subscribe to this mod's changes

ccc-memory is a skill published in the GitHub repository KevinZai/commander (6 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 1,710 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.

Related

Other skills, from other repositories

context-hygiene

Use when starting a project, reading project documentation or history, or resolving conflicts between documents. For current state, read only the latest documents designated by the project; do not proactively read archives; do not duplicate the spec; use long-term memory only for environment, people, and preferences…

chipfighter/coding-discipline · 67 tokens

agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

davila7/claude-code-templates · 26 tokens

report

Writes the session final report to a file, then prints only the path and a one-line summary. Fires when the prompt contains "Report per memstack:report", and also when the prompt begins with a standing trigger configured through MEMSTACKREPORTONTASKPROMPTS or MEMSTACKREPORTTRIGGERS. Dormant otherwise.

cwinvestments/memstack · 67 tokens

token-optimization

Use when the user says 'token optimization', 'save tokens', 'context window', 'reduce tokens', 'token stack', or 'TokenStack', or asks about extending context window capacity. Covers TokenStack, the built-in compression proxy that shrinks Claude Code tool output before it reaches the Anthropic API. Do NOT use for…

cwinvestments/memstack · 79 tokens

state

Use when the user says 'update state', 'project state', 'where was I', or at session start to load current context.

cwinvestments/memstack · 29 tokens

magic-compact

Compact this Claude Code session.

aerovato/magic-compact · 10 tokens