cc-memory: Instructions file for Claude Code

CLAUDE.md

cc-memory CLAUDE.md is an instructions file for Claude Code from skymanbp/cc-memory. It costs 7,787 tokens per session, scanned B, original, MIT.

Project instructions for cc-memory, a Claude Code plugin that saves and searches useful information between sessions. It uses files, full-text search, and optional AI-based extraction and deduplication.

In plain words
What is it for?
Use them when changing memory storage, search, plan handoffs, directive tracking, transcript limits, consolidation, or the optional local Ollama fallback.
Why use it?
They document how the plugin prevents repeated or conflicting notes, carries plans between sessions, and observes possible prompt-injection content.

Instructions file for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions CLAUDE.md.

This is skymanbp/cc-memory's own configuration. It tells Claude Code how to work on cc-memory itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-memory configures →

Runs only inside a plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else, and the catalogue could not identify which plugin ships it.

Reuse

Borrowing it

Nothing to install: this file belongs to skymanbp/cc-memory. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/skymanbp/cc-memory/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/skymanbp/cc-memory

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 cc-memory CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/skymanbp/cc-memory/claude-md/github.svg)](https://agentmods.dev/instructions/skymanbp/cc-memory/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/skymanbp/cc-memory/claude-md"><img src="https://agentmods.dev/badge/instructions/skymanbp/cc-memory/claude-md/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 cc-memory CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/skymanbp/cc-memory/claude-md"><img src="https://agentmods.dev/badge/instructions/skymanbp/cc-memory/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,787 This file is loaded in full into every session.
When invoked 7,787 The same file — it is already loaded in full.
Security scan B 1 finding. 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.07787 $0.07787
Opus 5.5 $0.03115 $0.03115
Sonnet 5.5 $0.01557 $0.01557
Haiku 4.5 $0.00779 $0.00779

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

Security

Grade B, and why

cc-memory CLAUDE.md scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.claude/settings.json`; only the standalone installer
CLAUDE.md · 426 lines

How it starts

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

CLAUDE.md — Operating manual for Claude Code working on cc-memory

Project: cc-memory

Claude Code persistent memory plugin (v2.18.0) — anti-patch reconcile-on-write with the store shown to the extractor (it supersedes and archives what it was shown), LLM-judged semantic de-duplication and backpressure-triggered consolidation, a forced PROGRESS.md handoff, a live PLAN.md anchor with plan-refiner / plan-guardian subagents and a mandatory carryover gate, an enforced directive ledger, layered SessionStart injection shaped by the start reason, query-time recall, CJK-capable FTS5 search, and Haiku extraction from detached workers (optional local Ollama fallback).

  • Language: Python 3.8+ (pure stdlib, zero pip dependencies at runtime)
  • Version: 2.18.0 — what changed in this version is CHANGELOG.md § [2.18.0]
  • License: MIT
  • Platform: Windows-primary; CI runs every gate on Windows and Linux (Tkinter required for the GUI)

This file is the manual: what runs, where state lives, what each channel costs, and how a change is verified and released. The rules a change must not break are numbered in INVARIANTS.md (symbols, gates and falsification cases, no line numbers). The narrative of every release — what was measured, what the first fix got wrong — is CHANGELOG.md; the rules each release wrote into this file before v2.16.0 sit under that version's entry as Rules recorded in CLAUDE.md at release.

Repository layout

cc-memory/
├── .claude-plugin/plugin.json   ← plugin manifest (+ inline mcpServers entry)
├── .claude-plugin/marketplace.json
├── hooks/hooks.json             ← 6 hook commands across 5 events
├── skills/                      ← ccm-load (activation + init), save-memories
├── agents/                      ← plan-refiner.md, plan-guardian.md
├── commands/cc-mem.md           ← the /cc-mem slash command
├── docs/                        ← ARCHITECTURE.md, CONTRACTS.md (+ .zh.md siblings),
│   │                              debug-pass-2026-09.md (evidence record),
│   ├── debug-pass-2026-09/        its evidence + repros
│   └── plans/                     the v2.16.0 plan (.txt, unscanned)
├── demo/                        ← run_demo.py + tally/ fixture + captures/
├── cc_memory/
│   ├── config.json              ← consolidation cadence, Ollama fallback, opt-out
│   ├── core/                    db, extractor, consolidate, idle, progress, plan,
│   │                            prompts, privacy, recall, modes, roots, layout,
│   │                            auth, logger, encoding_setup, version, atomic,
│   │                            markers, textsim, adopt, announce
│   ├── hooks/                   _entry, post_tool_use, pre_compact,
│   │                            consolidate_async, session_start, stop, user_prompt
│   ├── llm/                     ccl_backend, memory_writer, parse, usage_judge
│   ├── cli/                     mem
│   ├── mcp/                     server
│   └── ui/                      installer, dashboard, web_viewer
├── tests/                       ← run_gates.py + five suites (see § Tests)
├── tools/                       ← dev/CI checkers, never packaged
├── scripts/                     ← build_exe.py, release_notes.py, bench_hooks.py
├── .github/                     ← workflows/ (gates.yml, release.yml),
│                                  PULL_REQUEST_TEMPLATE.md, ISSUE_TEMPLATE/
├── INVARIANTS.md                ← the numbered rules
├── CHANGELOG.md · CONTRIBUTING.md · SECURITY.md · README.md · README.zh.md
└── CLAUDE.md                    ← this file

Read the full file on GitHub · 426 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. 2d ago Changed · +9 lines · +171 tokens per session e89a664d0220
  2. 4d ago Changed · +22 lines · +558 tokens per session 0a020f560da6
  3. 15d ago Changed · +7 lines · +119 tokens per session 2ed05f86fb6c
  4. 23d ago Changed · -2,026 lines · -32,392 tokens per session scan D → B 7b0232404ad9
  5. 27d ago Changed · +17 lines · +242 tokens per session 5c53f4bad09e
  6. 29d ago Changed · +16 lines · +232 tokens per session 6675d4bcef6c
  7. 1mo ago Changed · +220 lines · +3,790 tokens per session b3ca031a31fe
  8. 1mo ago Changed · +385 lines · +6,861 tokens per session 907d99fe591a
  9. 1mo ago First seen · 1,776 lines · 28,206 tokens per session scan D c6da794e78df

Subscribe to this mod's changes

cc-memory CLAUDE.md is an instructions file published in the GitHub repository skymanbp/cc-memory (9 stars, last pushed today), licensed MIT. It adds 7,787 tokens to every session, about $0.0311 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,257 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,159 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens