Your project knowledge
compounds and learns
across sessions.
Claude Code is stateless. Every session starts from zero. Clankbrain gives it a living memory — decisions, lessons, and patterns that grow with your project and apply automatically at every session start.
Two commands: Start Session → work → End Session. That's the whole interface.
yf@clankbrain ~ $
Five minutes to a living environment
Claude Code is the only requirement. Run one command from your project root.
No Node.js? Other install options ▸
Not a config file.
A living environment.
Most setups drop a CLAUDE.md and call it done. clankbrain ships an environment that learns your codebase, improves its own workflows, and remembers what went wrong — permanently.
The compound
learning loop
The engine that makes this agentic. Runs quietly in the background — extract lessons, score skills, patch weak steps, repeat. The environment gets smarter without you managing it.
→ skill_scores.md
→ memory/
proposes new ones
smarter
## Auto-Chain to any skill.Claude continues without waiting.
On fail: debug-resin → retry
On pass: smoke-test → done
PostToolUse hook: drift check after every edit
PreCompact hook: saves in-flight work
PostCompact hook: re-injects memory after compact
StopFailure hook: captures state on API crash
10 skills ship ready.
Generate Skills builds the rest.
Skills live in .claude/skills/ as markdown files.
Chain them with ## Auto-Chain.
Run Generate Skills — Claude scans your stack and creates skills tailored to your project.
| skill file | trigger phrase | what it does |
|---|---|---|
| /learn | /learn, extract patterns | Extract lessons from this session, score skills Y/N, update decisions.md and lessons.md |
| plan | plan [feature], I want to build X, design X | Structured planning — options with build cost/friction/payoff ratings, decision logged live, full plan auto-displayed after every update |
| /evolve | /evolve, evolve lessons into skills | Read skill_scores.md, patch weak steps, propose new skills from detected patterns |
| verification-loop | verify, run verification loop, did that work | After a code change — confirm it compiled, smoke test, self-check quality |
| search-first | search first, check if this exists | Enforce research-before-coding: search codebase before implementing anything new |
| strategic-compact | should I compact, context getting long | Evaluate whether to compact and guide through safe compaction that preserves all memory |
| java-reviewer | review this java, java review | Deep Java review against your stack's specific patterns — goes beyond generic code review |
| mode | mode develop, mode review, mode safe, mode deploy | Restrict Claude's tool access to what a task actually needs — develop (full), review (read-only), safe (no writes), deploy (shell only) |
| debug-session | debug session, structured debug, debug this error | 7-step structured debugging: reproduce → isolate → hypothesize → fix → verify — then logs cause + fix to error-lookup.md so the same bug never takes time twice. Auto-chains to verification-loop after the fix. |
| generate-guards | generate guards, add guards, what guards should I add | Mines your error-lookup.md, regret.md, and lessons.md to propose project-specific guards — converts your actual mistake history into automated prevention. Generic guards catch common patterns; these catch yours. |
160 sessions.
One living environment.
Built and validated on a production project — Java backend, vanilla JS, SQL Server. These numbers are from the actual engineering environment this kit grew out of.
────────────────────────────────────────
sessions logged 160
skills in active use 23+
sessions, zero data lost160
memory files tracked 20+
decisions preserved 15+
rejected approaches logged12
dependencies zero
context reset cost zero — memory persists
setup time ~5 minutes
────────────────────────────────────────
// compare to: rwieruch/the-road-to-claude (no loop),
// anthropics/claude-code-examples (no persistence)
// nothing else ships persistent memory + compound learning loop
Works on any machine — when you want it to
Memory stays on your machine by default. Nothing leaves unless you set this up. When you're ready to work across machines, three commands get you there.
.claude/memory/ and pushes to your private repo. That's it.Start Session — fully up to speed.One person debugs it. Zero cost for everyone.
One private git repo. Six shared files. When a teammate logs a bug fix in error-lookup.md, every developer on the project gets it at their next Team Pull.
This system is only as good as you are
Clankbrain is a system, not a plugin. It compounds with use — but only if you use it.
Session journal captures what happened
Stop hook reminds you when memory is unsaved
PreCompact hook protects memory through resets
End Session — skipping it means lessons don't get extractedRunning
/learn — skill scores only exist if you log themRunning
/evolve every few sessions — skills don't self-patch without itKeeping memory honest — garbage in, garbage out
Start Session / End Session consistently and /evolve every few weeks will have a Claude that gets measurably better at their specific codebase over time. Someone who uses it sporadically gets marginal gains.The habit is the product. The kit is what makes the habit stick.
FAQ
Does this use official Claude Code features or unofficial workarounds?
Official mechanisms used:
·
CLAUDE.md with @rules/ imports — Anthropic's documented persistent context system·
.claude/rules/ directory — now a first-class Anthropic feature with path-scoping support·
.claude/skills/<name>/SKILL.md — exact official skills path·
~/.claude/CLAUDE.md for global lessons — Anthropic's documented cross-project use case·
settings.json hooks — all 5 hook events used (SessionStart, UserPromptSubmit, PostToolUse, PreCompact, Stop) are official Anthropic event namesThe learning loop (lessons.md, decisions.md, /learn, /evolve) is built on top of those official mechanisms — that layer is what the kit adds.
Does a big CLAUDE.md actually help?
clankbrain is built the opposite way:
CLAUDE.md stays lean — commands and project-specific gotchas only. Project knowledge lives in separate .claude/memory/ files that load selectively based on what's relevant to the current task. That's what the research actually recommends.The template that ships with the kit enforces this. The project-specific section is designed to stay under 50 lines. High-level principles ("plan first", "simplicity first") are omitted entirely — Claude already knows them.
What Claude plan do I need?
What happens if Claude Code crashes mid-session?
STATUS.md confirms what was last saved. Run Check Drift to find anything that happened between the last memory update and the crash.
Do I need to use git for memory sync?
What's the difference between Full and Lite mode?
Lite: 3 typed memory files (notes, lessons, decisions), no drift detection, no hooks — memory updates only when you run End Session manually. Best for any project. Upgrade to Full any time with a single prompt.
Can I add skills for my own tech stack?
Create a skill called [name] that [description].
Skills are markdown files in .claude/skills/name/SKILL.md — easy to read, edit, and version-control.
What does /evolve actually do?
skill_scores.md (which /learn populates after every session with Y/N corrections),
finds steps that repeatedly needed fixing, and patches those steps. It also scans
lessons.md for recurring patterns and proposes new skills you don't have yet.
Run it every 3-5 sessions.
How do I move this to a new machine?
What is the Auto-Chain feature?
## Auto-Chain section to any skill file with On pass and On fail steps.
Claude reads it and continues to the next skill automatically — no human prompt needed.
Example: fix-bug → verification-loop → smoke-test runs as one chain.
Does updating the kit overwrite my memory or project notes?
CLAUDE.md.
Your memory files, STATUS.md, and everything below
## What This Project Is in CLAUDE.md are never touched.
The updater always shows a diff and asks "Apply update? [y/N]" before changing anything.
Is there a global lessons file that works across projects?
~/.claude/global-lessons.md (or C:\Users\you\.claude\global-lessons.md on Windows).
Any discovery you add here gets loaded at every session start across all your projects.
Use it for things like "always check for stale .class files before debugging Java".
What Python version do I need?
Why markdown files instead of a database?
Does this work with Anthropic's native Auto Memory?
How is this different from other Claude memory repos?
Every other tool — Auto Memory, MCP servers, single-file notes, SQLite stores — captures what happened. Clankbrain also improves how Claude works: skills score themselves on every use,
/evolve patches the steps that keep failing, and regret.md permanently blocks
approaches you've already rejected.On session 5 every tool looks similar. By session 50, Clankbrain's skills have been refined by 50 real feedback loops. Nothing else compounds that way.