memento
Skill0 starsChanged 3 months agoMITView on GitHub
Use when the user corrects a repeated behavior ("again?", "I told you", "stop doing that"), when an approach fails repeatedly before a fix is found, when a quality gate is skipped (coverage, complexity, lint), when discovering a project-specific workaround — and at task start, to load past lessons before choosing an approach.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- howells/skillstheir own version, first seen Nov 6, 2026
- waterdrop26651/Memento-skilltheir own version, first seen Nov 3, 2026
- ruslanlap/mementotheir own version, first seen Oct 20, 2026
- catcatcatstudio/cat-skillstheir own version, first seen Aug 27, 2026
- Lego1997/mementotheir own version, first seen Jul 4, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- howells/skills★ 5same name
- catcatcatstudio/cat-skills★ 3same name
- waterdrop26651/Memento-skill★ 3same name
- ruslanlap/memento★ 1same name
- Lego1997/memento★ 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 repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- rust-gui-controlSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Run before choosing tools or approach.
- Very specific: line 34
Run memento list first — recurrence means reusing the same slug.
- Very specific: line 72
If ~/.agents/memento/memento.py does not exist, read BOOTSTRAP.md next to this file and copy its code block verbatim to that path.
“Common” is measured: kept by at least 6 in 10 of the 4 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.
Files
Memento
Cross-agent mistake ledger: log repeated mistakes, count recurrence and cost, promote repeat offenders into enforced rules. Any tool that reads markdown can use it.
The CLI owns all bookkeeping. Never hand-edit ledger entries, never count occurrences yourself.
python3 ~/.agents/memento/memento.py <cmd>Stdlib-only — plain python3, never uv run. (Exception: inside ~/dev/ai, uv run memento is the same script.)
Ledgers: global ~/.agents/memento/MEMENTO.md, project <git root>/MEMENTO.md.
Protocol: CONSULT → LOG → PROMOTE
1. CONSULT (task start)
memento checkRun before choosing tools or approach. ENFORCED entries are law. WATCHING entries are strong defaults — deviating without cause is how the mistake repeats.
2. LOG (on trigger)
Triggers: the user corrects you (especially "again", "I told you") · an approach fails repeatedly before a fix works (log the fix — that is the valuable part) · a quality gate is skipped or ignored · you discover the way that actually works in this project.
Run memento list first — recurrence means reusing the same slug. Then:
memento hit <slug> [--rule "..."] [--fix "..."] [--kind habit|trick|gate|project-way] [--scope global|project] [--cost MIN]- New slug requires
--rule: one enforceable sentence. --fix: the exact command/env var/edit that worked. "Fixed the SSL issue" is useless next month.--scope: applies in other repos →global; only here →project.--cost: minutes lost this occurrence (feeds thememento toppain ranking).- The CLI warns about similar existing slugs and prints a PROMOTE alert at 3 hits or ≥30 min in one hit.
3. PROMOTE (enforcement)
On a PROMOTE alert, or when the user says "always" / "never":
memento promote <slug>Writes the rule bullet into a dedicated ## Memento-enforced section (other sections untouched): global scope → AGENTS.md + CLAUDE.md in the rules dir (env MEMENTO_AI_DIR, else rules_dir in ~/.agents/memento/config.json); project scope → the project's AGENTS.md (created if missing) + CLAUDE.md if present. The ledger keeps history and the detailed fix; the enforcement doc gets only the rule.
Obsolete rule (tool fixed, project dead, user says so): memento retire <slug> — removes the bullet, keeps ledger history, drops it from check. A later hit revives it to watching.
Common mistakes
| Mistake | Fix |
| Lesson only stated in the chat reply | Chat dies with the session. memento hit or it didn't happen. |
| Hand-editing MEMENTO.md / counting yourself | The CLI owns bookkeeping. Judgment (rule, fix, scope) is yours; arithmetic is not. |
| Logging straight into AGENTS.md/CLAUDE.md | Those are enforcement docs, not history. hit first; promote when earned. |
| New slug per occurrence | memento list first; recurrence = same slug. Duplicates break rate tracking. |
| Vague fix ("fixed certs") | Record the exact command/env var/edit that worked. |
Skipping memento check at task start | That is precisely how mistakes repeat. |
| Promoting on first occurrence | One-offs pollute enforcement docs. Thresholds exist; user "always/never" overrides them. |
Bootstrap
If ~/.agents/memento/memento.py does not exist, read BOOTSTRAP.md next to this file and copy its code block verbatim to that path. Never open BOOTSTRAP.md otherwise — it is only the embedded script source.
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.

