ccRecall: Instructions file for Claude Code

CLAUDE.md

ccRecall CLAUDE.md is an instructions file for Claude Code from tznthou/ccRecall. It costs 948 tokens per session, scanned A, original, Apache-2.0.

A Claude Code instruction file describing ccRecall, a local service that remembers relevant parts of earlier coding sessions. It stores searchable session information in a local SQLite database and exposes a localhost HTTP service.

In plain words
What is it for?
Use it to guide development of ccRecall, including its Node.js and TypeScript commands, tests, linting, build, and start procedures.
Why use it?
It tells agents how to continue work safely, including where to find previous-session context and how to keep tests isolated from real user data.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions Claude Code.

This is tznthou/ccRecall's own configuration. It tells Claude Code how to work on ccRecall 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 ccRecall configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/tznthou/Documents/ccRwind/.

Reuse

Borrowing it

Nothing to install: this file belongs to tznthou/ccRecall. 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/tznthou/ccRecall/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/tznthou/ccRecall

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 ccRecall CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tznthou/ccrecall/claude-md.svg)](https://agentmods.dev/instructions/tznthou/ccrecall/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/tznthou/ccrecall/claude-md"><img src="https://agentmods.dev/badge/instructions/tznthou/ccrecall/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 948 This file is loaded in full into every session.
When invoked 948 The same file — it is already loaded in full.
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.1 $0.00948 $0.00948
Opus 5 $0.00474 $0.00474
Sonnet 5 $0.00190 $0.00190
Haiku 4.5 $0.00095 $0.00095

Measured 5d ago against content hash 93b5c6aaad70, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ccRecall CLAUDE.md 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.

CLAUDE.md · 75 lines

How it starts

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

ccRecall — AI Memory Service for Claude Code

ccRewind 的姐妹作。ccRewind 做「考古」(事後看 session 發生了什麼),ccRecall 做「記憶」(讓 AI 在未來 session 中自動記住過去的經驗)。

定位

本地背景服務,讀取 Claude Code 對話歷史,讓 AI 在未來 session 中按需記憶——不全部載入,只注入最相關的片段(<300 tokens)。

核心模組從 ccRewind 抽取(parser, scanner, summarizer, database, indexer),新增記憶層、HTTP API、元認知索引。

指令

  • dev: pnpm dev
  • build: pnpm build
  • test: pnpm vitest run
  • lint: pnpm eslint . --fix
  • start: pnpm start

技術約束

  • Runtime: Node.js + TypeScript
  • DB: better-sqlite3 + FTS5(同步 API,零外部依賴)
  • HTTP: 輕量 HTTP server(localhost only)
  • 摘要引擎: 規則式(零 API 成本),不依賴 LLM
  • 純唯讀應用——絕對不修改 ~/.claude/ 下的任何檔案
  • JSONL parser 採寬容模式:未知結構保留 raw JSON,不中斷解析
  • 不用 Docker、不用 Electron、不用向量資料庫

架構

Claude Code hooks ──HTTP──→ ccRecall Service ──→ SQLite + FTS5
                                                  ├── memories
                                                  ├── knowledge_map
                                                  └── sessions/messages (from JSONL)

測試誠信

  • 測試紅了先修程式,禁止為通過測試而改斷言
  • 先寫測試、後寫實作
  • 測試不碰生產資料:使用 mkdtemp 隔離,不操作真實 ~/.claude/

接續

  • 新 session 開始前,先讀取 .claude/RESUME.md

相關專案

  • ccRewind: /Users/tznthou/Documents/ccRwind/(考古 GUI,核心模組來源)

參考文件(需要時再讀)

  • 架構設計: .claude/pi-research/ccrewind-memory-service-architecture.md
  • AI 記憶全景: .claude/pi-research/ai-memory-systems-landscape.md
  • 元認知設計: .claude/pi-research/ai-long-term-memory-design.md
  • Obsidian 記憶研究: .claude/pi-research/obsidian-ai-deep-memory.md
  • Hooks 注入可行性: .claude/pi-research/hooks-context-injection-feasibility.md
  • LLM Wiki 範式分析: .claude/pi-research/llm-wiki-karpathy-analysis.md

核心模組來源(從 ccRewind 抽取)

抽取順序:types → parser → scanner → summarizer → database(裁剪 UI query)→ indexer

模組 ccRewind 來源 LOC 測試 狀態
types src/shared/types.ts ✓ 已抽取(src/core/types.ts
parser src/main/parser.ts 240 tests/parser.test.ts 待抽取
scanner src/main/scanner.ts 131 tests/scanner.test.ts 待抽取
summarizer src/main/summarizer.ts 476 tests/summarizer.test.ts 待抽取
database src/main/database.ts 1665 tests/database.test.ts 待抽取(需裁剪 UI query)
indexer src/main/indexer.ts 253 tests/indexer.test.ts 待抽取

Read the full file on GitHub · 75 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 First seen · 75 lines · 948 tokens per session scan A 93b5c6aaad70

Subscribe to this mod's changes

ccRecall CLAUDE.md is an instructions file published in the GitHub repository tznthou/ccRecall (1 stars, last pushed 13d ago), licensed Apache-2.0. It adds 948 tokens to every session, about $0.0047 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.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens