agentleFS
dawn840705dawn840705/codex-code-studios/skills/skill-improve/SKILL.md

skill-improve

Skill17 starsChanged 3 months agoMITView on GitHub

Improve a skill using a test-fix-retest loop. Runs static checks, proposes targeted fixes, rewrites the skill, re-tests, and keeps or reverts based on score change.

19 other projects use a version of this, 10 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the skill name from the first argument.

    line 15
  2. Very specific:

    Verify ../[name]/SKILL.md exists.

    line 22
  3. Very specific:

    Run $skill-test static [name] and record the baseline score:

    line 29
  4. Distinctive:

    If baseline is 0 FAILs and 0 WARNs, stop: "This skill already passes the Codex-format structural and routing checks.

    line 40
  5. Very specific:

    Read the full skill file at ../[name]/SKILL.md.

    line 47
  6. Distinctive:

    Write a targeted fix for each failure and warning.

    line 65
  7. Very specific:

    Ask: "May I write this improved version to ../[name]/SKILL.md?"

    line 69
  8. Distinctive:

    If the user says no, stop here.

    line 71
  9. Very specific:

    Write the improved skill to ../[name]/SKILL.md.

    line 79
  10. Very specific:

    Ask: "May I revert ../[name]/SKILL.md using git checkout?" If yes: run git checkout -- ../[name]/SKILL.md

    line 102
  11. Very specific:

    If yes: run git checkout -- ../[name]/SKILL.md

    line 103
  12. Very specific:

    Run $skill-test static all to find the next skill with failures.

    line 109
  13. Very specific:

    Run $skill-improve [next-name] to continue the loop on another skill.

    line 110
  14. Very specific:

    Run $skill-test audit to see overall coverage progress.

    line 111

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

Skill Improve

Runs an improvement loop on a single skill: test → fix → retest → keep or revert.


Phase 1: Parse Argument

Read the skill name from the first argument. If missing, output usage and stop:

Usage: $skill-improve [skill-name]
Example: $skill-improve tech-debt

Verify ../[name]/SKILL.md exists. If not, stop with: "Skill '[name]' not found."


Phase 2: Baseline Test

Run $skill-test static [name] and record the baseline score:

  • Count of FAILs
  • Count of WARNs
  • Which specific checks failed

Display to the user:

Static baseline:   [N] failures, [M] warnings
Failing: Check 1 (frontmatter), Check 3 (no verdict keyword)

If baseline is 0 FAILs and 0 WARNs, stop: "This skill already passes the Codex-format structural and routing checks. No improvement is needed."


Phase 3: Diagnose

Read the full skill file at ../[name]/SKILL.md.

For each failing or warning static check, identify the exact gap:

  • Check 1 fail → whether name or description is missing or invalid
  • Check 2 fail → how many phases found vs. minimum required
  • Check 3 fail → no verdict keywords anywhere in the skill body
  • Check 4 warn → no explicit boundary for user-owned file writes
  • Check 5 warn → no follow-up or next-step section at the end
  • Check 8/10 warn → description lacks a negative boundary or explicit trigger
  • Check 9 warn → description is too similar to another skill and needs a clearer boundary

Show the full combined diagnosis to the user before proposing any changes.


Phase 4: Propose Fix

Write a targeted fix for each failure and warning. Show the proposed changes as clearly marked before/after blocks. Only change what is failing — do not rewrite sections that are passing.

Ask: "May I write this improved version to ../[name]/SKILL.md?"

If the user says no, stop here.


Phase 5: Write and Retest

Record the current content of the skill file (for revert if needed).

Write the improved skill to ../[name]/SKILL.md.

Re-run $skill-test static [name] and record the new static score.

Display the comparison:

Static:   Before [N] failures, [M] warnings  →  After [N'] failures, [M'] warnings
Change: improved / no change / worse

Phase 6: Verdict

Count the combined total: static FAILs + static WARNs.

If the score improved (combined issue count is lower than baseline): Report: "Score improved. Changes kept." Show a summary of what was fixed in each dimension.

If combined score is the same or worse: Report: "Combined score did not improve." Show what changed and why it may not have helped. Ask: "May I revert ../[name]/SKILL.md using git checkout?" If yes: run git checkout -- ../[name]/SKILL.md


Phase 7: Next Steps

  • Run $skill-test static all to find the next skill with failures.
  • Run $skill-improve [next-name] to continue the loop on another skill.
  • Run $skill-test audit to see overall coverage progress.

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.