$npx -y skills add luongnv89/asm --skill skill-auto-improverImprove an external, legacy, or drifted SKILL.md to the skill-creator standard — hard validation gates plus an advisory predictability audit. Don't use for authoring from scratch (skill-creator output is already standard), bulk eval, or prose edits.
| 1 | # Skill Auto-Improver |
| 2 | |
| 3 | You run an eval-driven loop that **retrofits an existing SKILL.md to the current skill-creator standard**. This is the remediation tool for skills that did **not** go through skill-creator — external, legacy, manually-authored, or drifted. Fresh skill-creator output is publish-ready by construction (see skill-creator's `predictability-rubric.md` → _Publish-ready — no auto-improver dependency_) and should **not** normally need this skill. |
| 4 | |
| 5 | The target must clear **two hard gates**, then gets one **advisory** audit: |
| 6 | |
| 7 | 1. **Gate 1 — skill-creator standard (must-pass floor)** — `quick_validate` clean, Frontmatter Audit passes, ≤500 lines (detail below). |
| 8 | 2. **Gate 2 — asm-eval floor (supplementary)** — `overallScore > 85` AND every category `>= 8`. |
| 9 | 3. **Advisory — predictability audit (Phase 2b, not a gate)** — judgment-based findings against skill-creator's rubric, reported separately, **never** blocking. |
| 10 | |
| 11 | A skill that scores 92 but fails `quick_validate.py` is not done; one that passes `quick_validate.py` but scores 70 is not done. **Both gates must clear, or the loop reports a blocker** — open predictability findings alone never make one. |
| 12 | |
| 13 | ## Repo Sync Before Edits (mandatory) |
| 14 | |
| 15 | This skill mutates files in a git repo. Before any edit, sync the local branch with the remote: |
| 16 | |
| 17 | ```bash |
| 18 | branch="$(git rev-parse --abbrev-ref HEAD)" |
| 19 | git fetch origin |
| 20 | git pull --rebase origin "$branch" |
| 21 | ``` |
| 22 | |
| 23 | If the working tree is dirty, `git stash`, sync, then `git stash pop`. If `origin` is missing or `git pull` hits conflicts, **stop and ask the user** before continuing — do not skip or force the sync. |
| 24 | |
| 25 | ## When to Use |
| 26 | |
| 27 | Reach for this on an **existing, external, legacy, manually-authored, or drifted** skill: |
| 28 | |
| 29 | - The user asks to "improve", "level up", "fix", "polish", or "bring up to standard" an existing skill |
| 30 | - A skill was authored outside skill-creator (hand-written, imported, inherited) and must meet the current bar |
| 31 | - A skill has **drifted** — predates the standard, or edits left it failing `quick_validate.py` or below the 85/8 floor |
| 32 | - You are preparing such a skill for `asm publish` or a catalog |
| 33 | |
| 34 | **Not** for routine cleanup of fresh skill-creator output (publish-ready by construction — use `/skill-creator` to author). Assumes a SKILL.md exists. For a report only, run `asm eval` and `quick_validate.py` directly — not this skill. |
| 35 | |
| 36 | ## Prerequisites |
| 37 | |
| 38 | Verify all of the following before touching any files. Stop and tell the user if any fails. |
| 39 | |
| 40 | - `asm` is available on PATH (`command -v asm` or `which asm`) |
| 41 | - Python 3 is available, and `~/.claude/skills/skill-creator/scripts/quick_validate.py` exists (skill-creator must be installed locally) |
| 42 | - The target skill path contains a `SKILL.md` file |
| 43 | - The working tree has no unrelated uncommitted edits (dirty files get mixed into diffs) |
| 44 | - You have write access to the skill directory |
| 45 | |
| 46 | Resolve skill-creator's validator (required) and rubric (fail-soft) once and reuse them. The rubric is **fail-soft** — a locally-installed skill-creator may predate the repo and not ship it; a missing file only degrades Phase 2b to a warning and never aborts the run: |
| 47 | |
| 48 | ```bash |
| 49 | QV="$HOME/.claude/skills/skill-creator/scripts/quick_validate.py" |
| 50 | test -f "$QV" || { echo "skill-creator not installed at $QV"; exit 1; } |
| 51 | RUBRIC="$HOME/.claude/skills/skill-creator/references/predictability-rubric.md" |
| 52 | test -f "$RUBRIC" || echo "⚠ predictability rubric missing — Phase 2b degraded (gates unaffected)" |
| 53 | ``` |
| 54 | |
| 55 | ## Inputs |
| 56 | |
| 57 | The user provides one of: |
| 58 | |
| 59 | - A local skill path: `skills/foo` or `/abs/path/to/skill` |
| 60 | - A direct `SKILL.md` file path (treated as its parent directory) |
| 61 | - A GitHub shorthand: `github:owner/repo` or `github:owner/repo:path/to/skill` |
| 62 | |
| 63 | For GitHub inputs, ask the user to clone locally first or whether you should open a PR back to that repo. This skill's default path is **local editing** — remote editing is out of scope for v1. |
| 64 | |
| 65 | ## The Gates |
| 66 | |
| 67 | Keep two decision classes separate: **hard gates** (Gate 1, Gate 2) are mechanical and pass/fail — they alone decide PASS vs BLOCKER. **Predictability findings** (Phase 2b) are judgment-based and advisory — both gates green with open findings is still a PASS. |
| 68 | |
| 69 | ### Gate 1 — Skill-creator standard (must-pass floor) |
| 70 | |
| 71 | A skill passes this gate when **all** of these are true: |
| 72 | |
| 73 | - `python "$QV" "$SKILL_PATH"` exits 0 (no unexpected keys, name is kebab-case ≤64 chars, description is single-line ≤1024 chars, etc.) |
| 74 | - The Frontmatter Audit (full checklist in `refere |