agentleFS
mementomori-comementomori-co/maker-mastery/.claude/skills/lesson-learned/SKILL.md

lesson-learned

Skill2 starsChanged 25 days agoMITView on GitHub

Use when a mistake, a print-qa FAIL, a CONTRADICTED fact-check row, a correction from the maker or an agent that missed its output format has just happened. Writes the post-mortem to lessons\YYYY-MM-DD-<project>-<slug>.md in the standard table and rebuilds the lessons index.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write the file in the standard format (copy the layout of any existing lesson in lessons\):

    line 15
  2. Very specific:

    Add a Sources: list with full URLs when the lesson corrects a fact.

    line 27
  3. Distinctive:

    If the rule does not yet live in anything executable (hook, script check, agent rationalization row), write "not yet enforced" and name the …

    line 28
  4. Very specific:

    Run .venv\Scripts\python.exe tools\build_indexes.py.

    line 29

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Input: $ARGUMENTS, three fields separated by |: project slug, lesson slug, one-line description. Output: lessons\YYYY-MM-DD-<project>-<slug>.md (today's date) and a regenerated lessons\INDEX.md. Lead-run; writes nothing else.

When to use

In the same session as the failure: any print-qa FAIL, any fact-checker CONTRADICTED row, any agent returning without its required output, any correction from the maker, any instruction given in the wrong form. Not for filing facts (/file). If a lesson with the same root cause already exists, add a row there instead of a new file.

Steps

  1. Glob lessons\*.md and Grep the folder for the slug and the root cause. If an existing lesson covers it, append a row to its table and go to step 4.
  2. Write the file in the standard format (copy the layout of any existing lesson in lessons\):
    # Post-mortem: <title> (<YYYY-MM-DD>, <project or phase>)
    
    | What happened | Root cause | Rule now |
    |---|---|---|
    | <observable event, naming the file or print it touched, repo-relative path> | <why, one sentence that names the missing check> | <imperative rule with the number, condition, command or file that makes it checkable> |
    
    Fix applied: <what changed, paths>.
    
    Rule lives in: <path of CLAUDE.md, an agent or skill file, a tools\*.py or hook, or "not yet enforced">.
    Add a Sources: list with full URLs when the lesson corrects a fact.
  3. If the rule does not yet live in anything executable (hook, script check, agent rationalization row), write "not yet enforced" and name the follow-up. Never claim enforcement that does not exist.
  4. Run .venv\Scripts\python.exe tools\build_indexes.py; confirm the new line in lessons\INDEX.md.
  5. Reply with the lesson path, the rule in one line, and where it lives (or "not yet enforced" plus the follow-up).

Common rationalizations

RationalizationReality
"It was a small slip, no lesson needed."Small slips (one wrong drying time, one wrong unit) repeat. Every correction gets a row.
"The rule is 'be more careful'."Not checkable. A rule names a number, a condition, a command or a file.
"I'll write the lesson at the end of the session."Sessions end abruptly. Same moment, same session.
"Rule lives in: CLAUDE.md" when it does not yet.Write "not yet enforced" and name the hook or script that would.

Red flags

  • A "Rule now" cell without a checkable element.
  • A lesson that restates the event without a root cause.
  • build_indexes.py not run.

Verification

  • File exists at lessons\YYYY-MM-DD-<project>-<slug>.md with the three-column table.
  • "Rule lives in:" names a path or says "not yet enforced" with a follow-up.
  • build_indexes.py printed the new lesson count; lessons\INDEX.md lists the file.

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.