← ClaudeAtlas

forge-lessonlisted

This skill should be used to save or manage persistent memory in a Context Forge Methodology project — phrases like "forge-lesson", "remember this", "log a lesson", "don't make that mistake again", "note this for next time", "save this as a preference", or "forget that lesson". It appends a distilled one-line lesson to context/lessons.md (or a cross-project preference to ~/.context-forge/preferences.md with approval), keeps both within budget, and promotes recurring lessons into the real context files.
yerros/context-forge · ★ 0 · AI & Automation · score 73
Install: claude install-skill yerros/context-forge
# forge-lesson Turn a correction, diagnosis, or preference into persistent memory — so it's never re-paid in tokens. The memory contract (formats, budgets, read/write rules) is defined canonically in `${CLAUDE_PLUGIN_ROOT}/skills/forge-lesson/references/memory.md` — read it first. ## Argument Text after the command is the lesson or instruction (e.g. `/forge-lesson never use barrel files here`, `/forge-lesson forget the Vite one`, `/forge-lesson show`) — distill/act on it directly. No argument → ask what to remember (or manage). ## Steps ### 0. Check the candidates file If `context/.lesson-candidates.md` exists (the `UserPromptSubmit` hook appends every prompt shaped like a correction — "no, X; do Y instead"), read it first: each line is a candidate. Distill the real ones through steps 1–3, discard the noise, then delete the lines you handled. The file is local and never committed. ### 1. Distill Reduce what happened to one line: `- [area] symptom/trigger → rule`. The rule part must be imperative and actionable. If it can't fit one line, it isn't a lesson — it's documentation; put it in the right context file instead and say so. ### 2. Route - **Project-specific** (about this codebase, its stack, its conventions) → `context/lessons.md`. Create the file from the bundled template (`${CLAUDE_PLUGIN_ROOT}/skills/forge-init/templates/context/lessons.md`) if absent. - **Cross-project** (a preference the user would want everywhere: tooling choices, style defaults, wor