skill-auto-improver
Skill949 starsChanged 6 months agoMITView on GitHub
Audit and improve an existing skill's instructions, review outputs, and evaluation criteria. Use when fixing a skill or applying the skill-creator standard. Don't use for authoring from scratch, bulk evaluation, or standalone prose edits.
- Deletes or force-pushes
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- website-src/llms.txtllms.txt
- find-me-skillsSkill
- hello-worldSkill
- refresh-indexSkill
- skill-creatorSkill
- skill-index-updaterSkill
- skill-install-improvedSkill
- skill-shortenerSkill
- skill-upstream-prSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 49
Use the returned neutral path directly.
- Very specific: line 61
If the tree is dirty, git stash, sync, git stash pop.
- Distinctive: line 76
Verify all of these before touching any files.
- Distinctive: line 120
Follow these phases in order, except for Phase 0's fully compliant early exit.
- Very specific: line 134
Read the JSON and note overallScore, grade, all 7 categories[].score, and topSuggestions.
- Very specific: line 136
Before deciding Gate 1, inspect the target using references/human-review-audit.md.
- Distinctive: line 140
Run the evaluator's auto-fixer for free wins:
- Very specific: line 151
When it does write, --fix adds a top-level author: (from git config user.name) and/or version: 0.1.0, both of which quick_validate.py …
- Very specific: line 185
Read references/category-playbook.md for that category's fix patterns
- Very specific: line 222
Write .asm-improver/report.md using references/report-template.md.
- Distinctive: line 228
Every run closes its summary with a run-stats block — the last thing printed, after the Phase 7 report.
- Distinctive: line 247
After each phase, emit a compact status block so pass/fail is scannable:
- Distinctive: line 268
All five target checks resolved under Gate 1.
- Very specific: line 282
Destructive action: never rm -rf the skill directory.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.
Files
Skill Auto-Improver
Audit and edit the target skill's instructions, templates, references, and evaluation criteria to meet the current skill-creator standard. Apply the five writing and human-review improvements to any existing skill, including skill-creator output when requested. Updating only this improver's report does not satisfy the task.
The target clears two hard gates, plus an advisory predictability audit:
- Gate 1 — skill-creator standard — validator, frontmatter, size caps, and the five target-writing and human-review checks pass.
- Gate 2 — asm-eval floor (supplementary) —
overallScore > 85AND every category>= 8. - Advisory — predictability (Phase 2b) — broader process findings are reported separately and never block the verdict.
A skill that scores 92 but fails quick_validate.py is not done; one that passes it but scores 70 is not done either. Both gates must clear, or the loop reports a blocker — open predictability findings alone never make one.
Two modes
Pick one before Phase 0 — they do not share a workflow.
- Mode 1 — retrofit (default). Bring the target to the skill-creator standard via the Phase 0–7 loop below. Every "improve", "fix", "level up", or "bring up to standard" request is Mode 1.
- Mode 2 — delegation conversion (opt-in). Restructure the target's steps onto per-step context delegation: each heavy step names the slice of its own
references/tree its worker needs and hands it over as that worker'sInput. Runs outside the Phase 6 loop, on a target that already clears Gate 1, and only once the user confirms. A Phase 2b delegability finding routes here but never starts a conversion by itself. Procedure:references/delegation-conversion.md.
Dependency Preflight (mandatory)
This skill invokes skill-creator, declared in frontmatter dependencies: it runs that skill's quick_validate.py (required — the Gate 1 validator) and reads its predictability-rubric.md (fail-soft — a local copy may predate the rubric, and a missing one only degrades Phase 2b to a warning). The main agent supplies ASM_SKILL_SESSION_ID, acquires this dependency at first use, and releases that session in its own finally/shutdown handling:
date +%s >&2 # anchors the Run stats block below — read it off stderr
: "${ASM_SKILL_SESSION_ID:?caller must supply a unique dependency session identity}"
ACQUISITION="$(asm deps acquire skill-creator --session "$ASM_SKILL_SESSION_ID" --json)"
SKILL_CREATOR_DIR="$(printf '%s' "$ACQUISITION" | node -e 'let s="";process.stdin.on("data",c=>s+=c).on("end",()=>process.stdout.write(JSON.parse(s).path))')"
QV="$SKILL_CREATOR_DIR/scripts/quick_validate.py"
test -f "$QV" || { echo "skill-creator acquisition lacks quick_validate.py" >&2; exit 1; }
RUBRIC="$SKILL_CREATOR_DIR/references/predictability-rubric.md"
test -f "$RUBRIC" || echo "⚠ predictability rubric missing — Phase 2b degraded (gates unaffected)"Use the returned neutral path directly; do not wait for a provider to rescan its catalog. Even on failure, the main agent's finally runs asm deps release --session "$ASM_SKILL_SESSION_ID" --json. ASM does not supervise this skill. An uncatchable termination requires explicit later recovery with asm deps cleanup --stale-before <conservative-ISO-cutoff> --dry-run --json, then without --dry-run.
Repo Sync Before Edits (mandatory)
This skill mutates files in a git repo. Sync the branch with the remote before any edit:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"If the tree is dirty, git stash, sync, git stash pop. If origin is missing or the pull conflicts, stop and ask the user — never skip or force the sync.
When to Use
Reach for this on any existing skill:
- The user asks to "improve", "level up", "fix", "polish", or "bring up to standard" an existing skill
- A skill was authored outside skill-creator — hand-written, imported, inherited — and must meet the current bar
- A skill has drifted: it predates the standard, or edits left it failing
quick_validate.pyor below the 85/8 floor - You are preparing such a skill for
asm publishor a catalog
For authoring from scratch, use /skill-creator. For a numeric report only, run asm eval and quick_validate.py directly. This workflow requires an existing SKILL.md.
Prerequisites
Verify all of these before touching any files. Stop and tell the user if any fails.
asmis on PATH (command -v asm)- Python 3 is available —
quick_validate.pyitself is resolved by Dependency Preflight (mandatory), the only place that handles a miss - The target skill path contains a
SKILL.md - The working tree has no unrelated uncommitted edits — dirty files get mixed into diffs
- You have write access to the skill directory
Inputs
One of: a local skill path (skills/foo, /abs/path/to/skill), a SKILL.md file path (treated as its parent directory), or a GitHub shorthand (github:owner/repo[:path/to/skill]).
For a GitHub input, ask the user to clone locally first. This skill edits locally; remote editing is out of scope for v1.
The Gates
Both hard gates decide PASS vs BLOCKER. Gate 1 combines automated validation with manual inspection of the target's instructions; Gate 2 measures asm scores. Phase 2b's broader predictability findings stay advisory. Scores alone cannot establish that the target meets the five writing and human-review requirements.
Gate 1 — Skill-creator standard (must-pass floor)
A skill passes when all of these hold:
python "$QV" "$SKILL_PATH"exits 0- The Frontmatter Audit passes — checklist in
references/frontmatter-audit.md - The body is under 500 lines and under 3000 words
- The description carries a negative-trigger clause naming adjacent domains that should not trigger the skill
metadata.versionisMAJOR.MINOR.PATCH;metadata.authoris present- A
docs/README.md, if present, opens with the AI-skip HTML comment - Any bundled script under
scripts/prints a descriptive error on stderr before exiting - If the target skill invokes another skill, it declares frontmatter
dependenciesand carries a caller-owned first-use acquire/release lifecycle (references/skill-creator-checklist.md→ Dependency preflight). A target that invokes none needs neither — never add an empty list or section - The five checks in
references/human-review-audit.mdpass in the target's instructions and supporting files. Only the interactive-report check may be not applicable, with a recorded reason.
This workflow requires the full gate. quick_validate.py does not perform the manual target-instruction checks.
Gate 2 — asm-eval 85/8 quality floor (supplementary)
overallScore > 85 AND min(categories[*].score) >= 8Stricter than overall alone — 86 with a 5 in testability still fails — so one strong area cannot hide a weak one.
Workflow
Follow these phases in order, except for Phase 0's fully compliant early exit. Phase 4 is a sidebar during Phase 3, with no separate Step Completion Report.
Phase 0 — Capture baseline against both gates
Save the starting state so the before/after diff is auditable:
mkdir -p .asm-improver
asm eval "$SKILL_PATH" --json > .asm-improver/baseline.json
python "$QV" "$SKILL_PATH" > .asm-improver/baseline-quickvalidate.txt 2>&1 || trueThen run the Frontmatter Audit from references/frontmatter-audit.md, saving findings to .asm-improver/baseline-frontmatter-audit.md. In a git repo, suggest adding .asm-improver/ to .gitignore.
Read the JSON and note overallScore, grade, all 7 categories[].score, and topSuggestions. Each category's findings carry the measured numbers behind its score — body word count among them. Use those; never approximate by hand.
Before deciding Gate 1, inspect the target using references/human-review-audit.md. Save the five checks to .asm-improver/baseline-human-review.md. If both full gates pass, run Phase 2b without edits, then report. Otherwise continue to Phase 1, even if numeric scores pass.
Phase 1 — Apply deterministic fixes, then normalize frontmatter
Run the evaluator's auto-fixer for free wins:
asm eval "$SKILL_PATH" --fix --dry-run # preview the diff
asm eval "$SKILL_PATH" --fix # write, creates SKILL.md.bakIt handles trailing whitespace, CRLF normalization, and a missing effort. A dry-run reporting "No fixes needed" satisfies this phase — do not apply --fix anyway.
Frontmatter normalization (mandatory after --fix)
When it does write, --fix adds a top-level author: (from git config user.name) and/or version: 0.1.0, both of which quick_validate.py rejects as unexpected keys. Apply references/frontmatter-audit.md → Normalizing asm eval --fix output. Then re-run both checks:
asm eval "$SKILL_PATH" --json > .asm-improver/iter-1.json
python "$QV" "$SKILL_PATH"Many skills jump 5–15 points here without touching the body, and quick_validate.py typically goes from fail to pass.
Phase 2 — Fix Gate 1 failures first
quick_validate.py and the Frontmatter Audit come first because they gate publish. references/skill-creator-checklist.md carries the fix for each failing check — frontmatter, description, body size, the docs/README.md AI-skip notice, script stderr, version, and preflight. Work it top to bottom.
One check has no complete mechanical validator behind it, so look for it deliberately: Skill invokes another skill without dependency metadata and a first-use lease lifecycle. Detect it by scanning for /skill-name invocations, reads under provider skill directories, and phases handed to a named skill; remediate with the checklist's Dependency preflight section.
Re-run python "$QV" "$SKILL_PATH" after every Gate 1 edit. Do not enter Phase 2b until Gate 1 is clean.
Fix each failed target-writing and human-review check using references/human-review-audit.md. Save the re-check to .asm-improver/human-review-audit.md. Fixes belong in the target skill, not just the improvement report.
Phase 2b — Audit predictability (advisory)
With Gate 1 clean, audit against skill-creator's rubric before Phase 3, so findings can steer your category edits. Advisory — never gates, never blocks.
- Confirm
$RUBRICresolved (Dependency Preflight (mandatory)). If missing, log⚠ predictability audit skipped (rubric unavailable)and skip item 2 only. - Walk
references/predictability-audit.md, marking each of its 7 itemspassoradvisorywith a specific note, and save the walk to.asm-improver/predictability-audit.md. Item #4's delegability sub-check names which step is not delegable and why; its remediation is Mode 2, never a Mode 1 edit.
Act on a finding only when the fix is targeted — one often lifts an asm-eval category too. Never bloat to satisfy one; that rule is in the same reference.
Phase 3 — Fix the lowest asm-eval categories
Sort the 7 categories ascending and work the lowest first. Stop when all are >= 8 — never chase points a passing category does not need.
For each category below 8:
- Read
references/category-playbook.mdfor that category's fix patterns - Apply them with
Edit, orWritewhen restructuring a whole section - Re-run
asm eval "$SKILL_PATH" --jsonandpython "$QV" "$SKILL_PATH", checking every category's delta, not just the one you edited
Never batch-edit categories blindly. Fixes interact: expanding the body for testability can tank context-efficiency or breach the 500-line cap. One at a time; keep what helps, revert what regresses either gate.
Phase 4 — Watch for cross-gate tradeoffs (sidebar — applies during Phase 3)
A continuous sidebar, not a sequential phase: the gates pull in opposite directions on body length, so a fix that lifts one category can sink another or breach a Gate 1 cap. SKILL.md is loaded whole on every invocation, so each inlined paragraph is a permanent charge against the agent's context window — a budget the context-efficiency score is measuring. Read references/cross-gate-tradeoffs.md once before Phase 3, then default to linking out, not inlining on every edit.
Phase 5 — Bump the target skill's metadata.version
This runs as the last action inside each Phase 6 iteration, not as a one-time pass after it — the number is sequential for narrative only. Bump exactly once per iteration, never once per edit, or the version churns ahead of meaningful change. Record each bump so the report shows baseline → final.
- Patch (
x.y.Z): typo fixes, frontmatter-only normalization, wording tweaks - Minor (
x.Y.0): new sections, new references, expanded triggers, added subagents - Major (
X.0.0): restructured workflow, breaking output-format changes
A target with no metadata.version gets one, starting at 1.0.0.
Phase 6 — Loop with a cap
Re-check both full gates after every iteration, including the five target checks. Record the remaining failed checks in each gate summary. The loop stops when any of these is true:
| Stop condition | Outcome |
Gate 1 passes AND overallScore > 85 AND min(scores) >= 8 | PASS — proceed to report |
| 8 eval iterations completed | BLOCKER — write report |
| 3 consecutive iterations with no movement on either gate | BLOCKER — write report |
| 2 consecutive iterations with regression on either gate | BLOCKER — revert, report |
Mid-iteration Gate 1 regressions are not regressions. When a Phase 3 edit breaks a Gate 1 check (see Phase 4), drop back into Phase 2, fix it inside the same iteration, then re-run both checks. Count the iteration as a regression only if both gates are still worse afterwards — otherwise ordinary churn trips the 2-regression stop.
Save every iteration to .asm-improver/iter-N.json, with a one-line gate summary in .asm-improver/iter-N-gates.txt, so the report can diff them.
Phase 7 — Write the final report
Write .asm-improver/report.md using references/report-template.md. Keep hard-gate status, advisory audits, and unresolved blockers distinct. Select the review format using references/human-review-audit.md; the Markdown file can be a compact audit record linking to a diagram or HTML report.
Lead with the result. Cite checks actually performed. Name uncertainty and any required approval decision. Include the skill path, version change, files changed, iterations, and fixes. Close the report and printed summary with Run stats.
Run stats (mandatory)
Every run closes its summary with a run-stats block — the last thing printed, after the Phase 7 report. It reports what the run cost and never repeats a metric the report already carries.
elapsed is now - run_started_epoch, where the epoch is the date +%s >&2 in Dependency Preflight (mandatory) — read it off that block's stderr, not a shell variable that need not survive. A stop before that block ran has no anchor, so elapsed prints n/a.
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
Run stats elapsed 4m 12s · tokens 128,400 · cost $0.42
agents 0 · skills 1 · tool calls 63Fields are fixed and in this order — never reordered, renamed, or added to: elapsed, tokens, cost, agents, skills, tool calls. Per-field formatting: references/run-stats.md.
tokensandcostare omitted entirely when the host reported no figure — no dangling·, no placeholder. Never estimate one, and never reconstruct one from host transcripts or logs.elapsed,agents,skills, andtool callsalways print. A value that cannot be determined prints the literaln/a;0is a determined value, correct where true.- A missing optional figure never suppresses the rest of the block.
- Print the block at every terminal outcome — a completed loop, a BLOCKER, the Phase 0 early exit, a failed prerequisite, an aborted run. Only a run with no output at all has none.
Step Completion Reports (mandatory)
After each phase, emit a compact status block so pass/fail is scannable:
◆ Phase N — [phase name]
··································································
Frontmatter valid: √ pass
quick_validate: √ pass
asm overall: 86 → 91
Min category: 7 → 8
Target version: 1.2.0 → 1.3.0
Result: PASS | FAIL | PARTIAL√ is pass, × is fail, — is context. Emit one after each of Phase 0, 1, 2, 2b, 3, 5, 6, and 7. Phase 2b's block reports the findings count plus "advisory" or "skipped fail-soft" — that phase never gates.
Acceptance Criteria
The bars that decide the outcome. The full run checklist — every artifact and process obligation — is references/acceptance-criteria.md; walk it before writing the report.
- Baselines captured to
.asm-improver/before any edits, and every iteration re-evaluated against both gates and saved there - Each Gate 1 check addressed before any Gate 2 work; each category below 8 addressed at least once
- All five target checks resolved under Gate 1; a missing upstream rubric skips only advisory predictability
metadata.versionbumped once per edited iteration; the loop stopped under Phase 6 or Phase 0's fully compliant early exit.asm-improver/report.mdexists on exit either way, and the summary closes with the Run stats block- On PASS: all Gate 1 checks, including the target-writing and human-review audit, pass AND
overallScore > 85ANDmin(categories[*].score) >= 8 - On BLOCKER: the report names every failing Gate 1 check and every category still below 8 with a one-line reason each
Expected output
See references/report-template.md for the full PASS and BLOCKER layouts. On BLOCKER, add an ## Unresolved blockers section naming each failing hard gate check with a one-line reason.
Edge Cases
Two rules the phases above do not carry. Every other edge case — no frontmatter, a rejected --fix key, an over-250-char description, a content-pinning test, an over-length body, the 8-iteration cap, GitHub shorthand — is in references/edge-cases.md, read when it arises.
- Destructive action: never
rm -rfthe skill directory.asm eval --fixcreatesSKILL.md.bak— leave it until the user explicitly cleans up. - Gate-passing skill with heavy non-delegable steps: a Mode 2 candidate. Offer the conversion; never edit it under Mode 1.
References
references/skill-creator-checklist.md— Gate 1 retrofit playbookreferences/frontmatter-audit.md— audit checklist and theasm eval --fixnormalization migrationreferences/category-playbook.md— per-category fix patterns for Gate 2references/predictability-audit.md— Phase 2b advisory checklistreferences/human-review-audit.md— controlled instructions, output contracts, formats, interactive reports, and understanding checksreferences/cross-gate-tradeoffs.md— Phase 4 sidebar: body length and the link-out rulereferences/delegation-conversion.md— the Mode 2 procedurereferences/report-template.md— PASS, BLOCKER, and Mode 2 report layoutsreferences/acceptance-criteria.md— the full run checklistreferences/run-stats.md— run-stats field definitionsreferences/edge-cases.md— the full edge-case list- Under
~/.claude/skills/skill-creator/:scripts/quick_validate.py(the Gate 1 validator), plusreferences/frontmatter-rules.md,predictability-rubric.md, anddependency-preflight.md— upstream sources the local references restate self-sufficiently asm eval --help, andsrc/evaluator-core.tsin the ASM repo — how each Gate 2 category is scored
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.

