agentleFS
BSSE23047BSSE23047/nauraiz-dev/skills/capture-lesson/SKILL.md

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

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    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.

The file

Files
SKILL.md

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.

  1. 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".
  2. Pick the place.

    • local mode (the session header shows mode=local, or .claude/nauraiz-dev.local.json exists and .claude/nauraiz-dev.json does 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.md in <home>/.claude/projects, take the folder whose name equals the slug, compared case-insensitively. No match: ask the owner for the folder and stop.

  3. 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.
  4. 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 in CLAUDE.md.
    • Auto-memory file: frontmatter name, description (one line), metadata: with type: (feedback, project, reference or user); 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.
  5. Index it. Knowledge: one line in .claude/knowledge/README.md under "Files" (replace None yet.). Auto-memory: one line in MEMORY.md, - [Title](file.md) — one-line hook, under 150 characters. If MEMORY.md has more than 200 lines, say so and suggest /nauraiz-dev:memory-hygiene.
  6. Report. The file written or changed, the index line added, and the lesson in one sentence. Do not commit.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.