agentleFS
letsloose501letsloose501/sqs-agent-memory/skills/mistake/SKILL.md

mistake

Skill2 starsChanged 9 days agoApache-2.0View on GitHub

Record a mistake the agent made and corrected, so the lesson outlives the session. Run it yourself, without a reminder, whenever you gave a wrong answer and fixed it, went down a wrong path and redid the work, misread the request, or a tool behaved unlike you expected; also when the user says "remember this mistake", "log this", "/mistake". It only records; it decides nothing.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    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
  1. Distinctive:

    Not into MemPalace: the palace is the index of the notes vault, not a journal.

    line 10
  2. Very specific:

    Put the effort into PATTERN and phrase it so it covers a class of cases, not today's command: "empty output is not a result until you have …

    line 45
  3. Very specific:

    Do not touch MEMORY.md: this folder is not in the index.

    line 50
  4. Distinctive:

    3. Read back the file you just wrote: All four fields present, text not cut off.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Record a mistake

The entry goes into the file memory under git: ${user_config.memory_dir}/mistakes/. Not into MemPalace: the palace is the index of the notes vault, not a journal. A file can be read, edited, diffed and reverted, which is exactly what a mistakes journal needs.

This skill only records

It decides nothing. The weekly review (/agent-memory:memory-review) reads the whole folder, groups entries by substance, moves repeats one step up (a rule, then a hook), writes the analysis into ${user_config.memory_dir}/scripts/consolidation-log.md and empties the folder. Hence:

  • Do not look for duplicates. Grouping needs the whole folder at once; a session sees only its own mistake.
  • Do not propose a rule or a hook. The step is set from the whole picture: once is noise, twice is a rule, three times is a hook. That count is invisible from inside one session.
  • Write freely and in detail. It is a draft, and nothing is lost: the folder is under git.

One exception: the user said to create a rule or hook. Then it is their decision, and it is done as an ordinary task, not inside this skill.

Steps

1. Write the entry: four lines, in English (the user's verbatim words stay in quotes as they are).

MISTAKE: [what I did wrong]
WHY: [what caused it]
FIX: [how it was fixed now]
PATTERN: [how not to repeat it: the valuable part]
KIND: mistake | dead_end

KIND: dead_end is for an approach that was tried and does not work here (a flag that fails on this machine, a library that cannot do the job): the weekly review lists dead ends separately so nobody re-derives them. Leave KIND out for an ordinary mistake.

Put the effort into PATTERN and phrase it so it covers a class of cases, not today's command: "empty output is not a result until you have looked at the exit code", not "ls-remote can print nothing".

2. Write the file mistakes/YYYY-MM-DD-short-gist.md (Latin letters) with those four lines. Do not touch MEMORY.md: this folder is not in the index. Do not ask for confirmation.

3. Read back the file you just wrote. All four fields present, text not cut off. This is not paranoia: in one real journal five of 55 entries turned out to be a single broken word, the structure lost on write, and the lesson with it. The mistake-catching tool fell for the most common mistake in its own journal: claiming something was written without checking. A field is empty or cut: rewrite it now; the context leaves with the session.

4. Report in one line: "recorded a mistake: <gist>". No analysis, no proposals.

Arguments

The user may describe the mistake: /agent-memory:mistake mixed up the port in the config

$ARGUMENTS

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.