capture-lesson
Skill2 starsChanged 14 days agoMITView on GitHub
Save a gotcha just hit (hang, timeout, blocked command, wrong path) as a dated lesson: 'remember that for next time'. Not for session notes (handoff), task lists, or things the code shows.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dougmotshell/mathematics-studiestheir own version, first seen Aug 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dougmotshell/mathematics-studies★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- find-skillsSkill
- gateSkill
- grillSkill
- handoffSkill
- initSkill
- kickoff-promptSkill
- measureSkill
- memory-hygieneSkill
- reviewSkill
- setupSkill
- shipSkill
- start-taskSkill
The file
Files
capture-lesson
Turn something that just cost time into a dated entry the next session reads, so it is not paid for twice. One lesson per file, facts only.
"Stop" and "ask" mean: end your turn with the question and wait.
- Pin the lesson. Get four facts from the session or the owner: what happened, what
fixed it, how to recognise it next time, what it cost. Missing one: ask. Write nothing
you did not see or were not told. Use absolute dates (
2026-10-31), never "today" or "last week". Pick the place.
localmode (the session header showsmode=local, or.claude/nauraiz-dev.local.jsonexists and.claude/nauraiz-dev.jsondoes not): auto-memory only. Never write a tracked file.- Machine-specific (a path, a tool version, a login on this computer): auto-memory.
- A rule (something that must never or always be done, with an incident behind it) and
.claude/rules/exists: a rule file. - Else, if
.claude/knowledge/exists: a knowledge file. - Else: auto-memory.
Auto-memory folder:
~/.claude/projects/<slug>/memory/under the user's home, where<slug>is the current directory with every non-alphanumeric character replaced by-. Find it with Glob on*/memory/MEMORY.mdin<home>/.claude/projects, take the folder whose name equals the slug, compared case-insensitively. No match: ask the owner for the folder and stop.- Look for an existing entry. Grep the folder for the topic. Found: fix that file
(replace the wrong fact, do not append a correction). Not found: one new file named
after the topic, e.g.
windows-spawn-needs-shell.md. - Write it.
- Knowledge file: a heading, then
Verified <date>:facts, then the incident in one sentence (date, what happened, what it cost). - Rule file: a heading, the constraint in the first paragraph, then
Incident, <date>: <what happened and what it cost>. Add it to the "Rules" list inCLAUDE.md. - Auto-memory file: frontmatter
name,description(one line),metadata:withtype:(feedback,project,referenceoruser); then the body as above. - Related entries: link each with
[[file-name]](no.md), only to files that exist, and add the link back in the other file.
- Knowledge file: a heading, then
- Index it. Knowledge: one line in
.claude/knowledge/README.mdunder "Files" (replaceNone yet.). Auto-memory: one line inMEMORY.md,- [Title](file.md) — one-line hook, under 150 characters. IfMEMORY.mdhas more than 200 lines, say so and suggest/nauraiz-dev:memory-hygiene. - Report. The file written or changed, the index line added, and the lesson in one sentence. Do not commit.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

