From Session Memory
Record corrections and failed approaches as durable, deduplicated lessons in .ai/memory/LESSONS.md, and surface them in later sessions so mistakes are not repeated. Use when the user corrects agent behavior ("no, use Y not X", "you made this mistake before", "I already told you this"), says "remember this for next time" or "add that to your lessons", when a tried approach failed with a diagnosed cause, or when asked "what lessons do you have for this project?". Do NOT use for ordinary requirement changes or new instructions (a changed spec is not a mistake), one-off contextual choices ("use port 4000 just for this test"), conversational disambiguation ("no, I meant the other file"), or anything containing secrets, tokens, or credentials.
How this skill is triggered — by the user, by Claude, or both
Slash command
/session-memory:lessons-learnedThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Turn corrections and diagnosed failures into durable lessons that future sessions actually see.
Turn corrections and diagnosed failures into durable lessons that future sessions actually see.
User corrections evaporate when a session ends, so the same mistakes recur and the user has to repeat themselves. This skill keeps a deduplicated, evidence-counted ledger at .ai/memory/LESSONS.md, surfaces matching entries when relevant work starts, and promotes proven lessons toward CLAUDE.md — with user approval only.
Before any read or write under .ai/memory/, read references/memory-contract.md — it defines the LESSONS.md format, size cap, precedence rule, and safety rules shared with the session-handoff skill. Never improvise the format.
Record a lesson only for these signals:
Do NOT record:
<redacted: ...>) and record the lesson without it, or decline to persist and say why. Hard rule from the contract, no exceptions.When a signal is borderline (a preference that might be standing), ask: "Should I record that as a standing lesson for this project?" — one question beats a polluted ledger.
.ai/memory/LESSONS.md if it exists. Missing or empty → create it from templates/lessons.md (read the template now; it includes the entry format and a worked example). Unparseable → treat as read-only evidence per the contract; tell the user before writing anything fresh.When an update brings a lesson to Count ≥ 3, it is proven enough for always-on context. After quoting the update, SUGGEST: show the exact line(s) that would be added to CLAUDE.md and ask for approval. Only edit CLAUDE.md after an explicit yes — CLAUDE.md loads every session, and silently editing the user's project memory breaks trust and the contract's write-safety rule. On approval, append minimally; note in the lesson's Evidence that it was promoted. On decline, drop it — do not re-ask on every reinforcement.
Be honest about mechanism: this skill is routed by the user's message, so it cannot fire merely because a lesson's topic comes up. Lessons actually surface through four channels:
Surfacing is read-only — never modify the file while merely consulting it.
.ai/memory/. Source of truth for location, entry format, size cap, precedence, and safety rules..ai/memory/ (plus approved CLAUDE.md additions); no secrets; no auto-commit — the contract's hard rules.npx claudepluginhub luka-zivkovic/overclock --plugin session-memoryCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.