agentleFS
musahyderrmusahyderr/mainseat/.claude/skills/learn-corrections/SKILL.md

learn-corrections

Skill1 starsChanged 14 days agoMITView on GitHub

Save a repeated correction as a rule, or a repeated workflow as a project skill (/learn).

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't record one-off instructions for the current task.

    line 15
  2. Very specific:

    Write the rule as one short, direct line, plus the reason if the user gave one: - Use pathlib, not os.path, for new code.

    line 18
  3. Very specific:

    Put it under the right heading in .claude/LEARNED.md (Code style, Fixing bugs, Testing, Workflow, Don't).

    line 20
  4. Very specific:

    Create the file from the template in the kit if it is missing, and add @.claude/LEARNED.md to CLAUDE.md if that line is missing.

    line 22
  5. Distinctive:

    If a rule on the same topic exists, replace it.

    line 24
  6. Distinctive:

    Keep the file under 40 rules.

    line 25
  7. Distinctive:

    When to offer one:

    line 31
  8. Distinctive:

    Don't offer one for a single step (that is a rule) or for a job done only once.

    line 36
  9. Distinctive:

    Check that no existing skill already covers the job.

    line 39
  10. Very specific:

    Never overwrite a core Mainseat skill.

    line 45
  11. Distinctive:

    Ask one question before recording: "Should I always <X>, or only for <case>?"

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

learn-corrections

Rules live in .claude/LEARNED.md. CLAUDE.md imports it with the line @.claude/LEARNED.md, so every new session follows them without being told again.

When to record

  • The user corrects the same kind of thing for the second time.
  • The user states a standing preference ("always use tabs", "never touch tests").
  • The user types /learn <rule>. Don't record one-off instructions for the current task.

How to record

  1. Write the rule as one short, direct line, plus the reason if the user gave one: - Use pathlib, not os.path, for new code. (user: easier to read)
  2. Put it under the right heading in .claude/LEARNED.md (Code style, Fixing bugs, Testing, Workflow, Don't). Create the file from the template in the kit if it is missing, and add @.claude/LEARNED.md to CLAUDE.md if that line is missing.
  3. If a rule on the same topic exists, replace it; never keep two rules that conflict.
  4. Keep the file under 40 rules. When it's full, merge similar rules.
  5. Tell the user in one line: learned: <rule>. They can say "forget that" to remove it.

Growing a skill

A rule is one line. When what the user teaches is a whole procedure, it becomes a skill.

When to offer one:

  • The user walks you through the same multi-step job a second time ("run the linter, then the tests, then update the changelog").
  • The user says "whenever I ask for X, do Y" and Y has three or more steps.
  • The user types /learn skill <what it should do>. Don't offer one for a single step (that is a rule) or for a job done only once.

How to create it:

  1. Check that no existing skill already covers the job; if one does, offer to extend it.
  2. Propose it in two lines and wait for a yes: Save this as skill "release-notes": 1) ... 2) ... 3) ...?
  3. On yes, write .claude/skills/<name>/SKILL.md: a lowercase hyphenated name, a description: of one short line saying when to use it, then the numbered steps in the user's own words. Keep it under 30 lines.
  4. Never overwrite a core Mainseat skill. Keep at most 5 learned skills, because every skill's description is loaded on every turn; past that, offer to merge or retire one.
  5. Tell the user in one line: learned skill: <name>. They can say "forget that skill" to delete it. Refer to the user as "they" in any file you write.

Never record

Personal details, names, emails, passwords, keys, tokens, client data, or anything the user calls private. .claude/LEARNED.md may be committed and made public.

If the rule is unclear

Ask one question before recording: "Should I always <X>, or only for <case>?"

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.