agentleFS
HenryCordesHenryCordes/ai-engineering-workflow/.claude/skills/improve-skill/SKILL.md

improve-skill

Skill0 starsChanged 4 months agoMITView on GitHub

Use when something went wrong in a session that a skill or rule should have prevented — a correction from the user, a broken build, a convention violation, a repeated mistake. Captures the failure as a permanent fix to the responsible skill, doc, or rule.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-skill.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ElasticSkill

    create-skill

    Interactively create a new Claude Code skill and add it to the elastic-docs-skills catalog. Use when the user wants to generate a new skill, scaffold a slash command, or build automation for docs tasks.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If it can't be stated in one sentence, it isn't understood yet.

    line 26
  2. Distinctive:

    No owner exists → propose the smallest new home.

    line 32
  3. Distinctive:

    Confirm with the user: before writing — show the exact edit.

    line 40
  4. Distinctive:

    Add generic advice a model already knows.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 13 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

Improve Skill

Overview

The hardening loop. Context files (skills, docs, AGENTS.md) are treated like code: when they fail, they get a fix, not a workaround. Every correction the user has to make twice is a bug in the harness, and this skill patches the harness. Over time skills converge on bulletproof, and the always-loaded context stays small because knowledge accretes in the right on-demand file instead of in an ever-growing CLAUDE.md.

When invoked

Mid-session, right after the failure — while the exact wording of what went wrong is still in context. Typical triggers: the user corrects the same thing again, a hook or CI rejects work, a skill produced output that violated a repo convention, a doc turned out to be wrong or stale.

Workflow

  1. Name the failure precisely. One sentence: what was expected, what happened instead. If it can't be stated in one sentence, it isn't understood yet.
  2. Find the owner. Which file should have prevented this?
    • A task went wrong → the skill for that task.
    • A convention was violated → the doc that states it (or should state it).
    • It must never happen regardless of task → AGENTS.md (always-loaded, so the bar is high) or better, a deterministic guardrail (git hook, lint rule, CI check).
    • No owner exists → propose the smallest new home; a new skill needs a recurring task, not a one-off.
  3. Write the smallest rule that would have prevented it. One or two lines in the owner's body. Prefer tightening an existing step over adding a new section. Never grow a skill's description for this — descriptions are always in context and stay one line.
  4. Log it. Append to the owner skill's ## Lessons section (create it on first lesson): - YYYY-MM-DD — <failure> → <rule added>. This keeps the audit trail of why each rule exists.
  5. Confirm with the user before writing — show the exact edit. If the same lesson is being added a second time, the rule is wrong or unclear; rewrite it instead of restating it.

Do not

  • Patch the symptom in the session but skip the harness fix — that's how the same failure returns next week.
  • Add generic advice a model already knows; rules must be project-specific and falsifiable.
  • Grow AGENTS.md when an on-demand skill or doc can own the rule.
  • Turn a one-off mishap into a rule; twice is a pattern, once is noise (log nothing).

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.