{"data":{"slug":"github-donchitos-claude-code-game-studios-claude-skills-skill-improve-63670e447da8","title":"Improve Skill by Test-Fix-Retest Loop","summary":"Improve a skill via a test-fix-retest loop \u2014 static checks, targeted fixes, keep or revert on score change. The deliverable is an improved skill file with changes marked as before\/after blocks, and a decision to keep or revert based on score improvement.","url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-skill-improve-63670e447da8","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-donchitos-claude-code-game-studios-claude-skills-skill-improve-63670e447da8","markdown_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-skill-improve-63670e447da8.md","download_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-skill-improve-63670e447da8\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running the improvement loop, ensure the skill file `.claude\/skills\/[name]\/SKILL.md` exists and is readable. If the skill has a `references\/` folder, fixes to phase steps should be made in the corresponding `references\/` files, not in `SKILL.md` itself. The user must decide whether to keep or revert changes based on the combined score after retesting.","instructions":"---\nname: skill-improve\ndescription: \"Improve a skill via a test-fix-retest loop \u2014 static checks, targeted fixes, keep or revert on score change.\"\nargument-hint: \"[skill-name]\"\nuser-invocable: true\nallowed-tools: Read, Glob, Grep, Write, Bash(bash \"*\/.claude\/skills\/skill-improve\/..\/..\/hooks\/yaml-helper.sh\" resolve_config *)\nmodel: sonnet\n---\n\n!`bash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" resolve_config --keys automation`\n\n**Automation mode**: Resolve `modes.automation` (`project.local.yaml` \u2192\n`project.yaml` \u2192 default `collaborative`). Every `AskUserQuestion` call and\nevery file write follows `.claude\/docs\/automation-modes.md`\n(collaborative asks always \u00b7 guided major-only \u00b7 autonomous logs and proceeds;\n`automation_always_ask` categories always prompt).\n\n# Skill Improve\n\nRuns an improvement loop on a single skill:\ntest \u2192 fix \u2192 retest \u2192 keep or revert.\n\nIts score comes from `\/skill-test` static and category checks, which read the\nskill rather than run it: a better score means a better-written skill, not proof\nthat it behaves better. To check behaviour, run the skill on a real request\nbefore and after the change.\n\n---\n\n## Phase 1: Parse Argument\n\nRead the skill name from the first argument. If missing, output usage and stop:\n\n```\nUsage: \/skill-improve [skill-name]\nExample: \/skill-improve tech-debt\n```\n\nVerify `.claude\/skills\/[name]\/SKILL.md` exists. If not, stop with:\n\"Skill '[name]' not found.\"\n\nGlob `CCGS Skill Testing Framework\/catalog.yaml`. When it exists, say so first:\n\"`CCGS Skill Testing Framework\/` was renamed `studio-tests\/` in 1.2.0, and this\nskill reads only `studio-tests\/`. Move any specs you wrote there; UPGRADING.md\n(v1.1.3 \u2192 v1.2.0, `studio-tests\/`) says how.\" Then go on.\n\n---\n\n## Phase 2: Baseline Test\n\nRun `\/skill-test static [name]` and record the baseline score:\n- Count of FAILs\n- Count of WARNs\n- Which specific checks failed (Check 1\u20137)\n\nDisplay to the user:\n```\nStatic baseline:   [N] failures, [M] warnings\nFailing: Check 4 (no ask-before-write), Check 5 (no handoff)\n```\n\nIf the static result is **NOT ASSESSED** (the skill file could not be read or\nparsed), stop and report it with its reason: there is no score to improve, and\n0 FAILs from a file nobody could read is not a clean result.\n\nIf baseline is 0 FAILs and 0 WARNs, note it and proceed to Phase 2b.\n\n### Phase 2b: Category Baseline\n\nLook up the skill's `category:` field in `studio-tests\/catalog.yaml`.\n\nIf no `category:` field is found, display:\n\"Category: not yet assigned \u2014 skipping category checks.\"\nand skip to Phase 3.\n\nIf category is found, run `\/skill-test category [name]` and record the category baseline:\n- Count of FAILs\n- Count of WARNs\n- Which specific category rubric metrics failed\n\nDisplay to the user:\n```\nCategory baseline: [N] failures, [M] warnings  ([category] rubric)\n```\n\nA category result of **NOT ASSESSED** (a rubric section the skill-test could not\nfind or apply) is reported with its reason and is not a zero: the category\ndimension is then excluded from \"already passes\" below.\n\nIf BOTH static and category baselines are 0 FAILs and 0 WARNs \u2014 and neither is\nNOT ASSESSED \u2014 stop:\n\"This skill already passes all static and category checks. No improvements needed.\"\n\n---\n\n## Phase 3: Diagnose\n\nRead the full skill: `.claude\/skills\/[name]\/SKILL.md` and every file in its `references\/` folder,\nif it has one \u2014 the longest skills keep each phase there. Name the file each\ngap is in.\n\nFor each failing or warning **static** check, identify the exact gap:\n\n- **Check 1 fail** \u2192 which frontmatter field is missing\n- **Check 2 fail** \u2192 how many phases found vs. minimum required\n- **Check 3 fail** \u2192 no verdict keywords anywhere in the skill body\n- **Check 4 fail** \u2192 Write or Edit in allowed-tools but no ask-before-write language\n- **Check 5 warn** \u2192 no follow-up or next-step section at the end\n- **Check 6 warn** \u2192 `context: fork` set but fewer than 5 phases found\n- **Check 7 warn** \u2192 argument-hint is empty or doesn't match documented modes\n\nFor each failing or warning **category** check (if category was assigned in Phase 2b),\nidentify the exact gap in the skill's text. For example:\n- If G2 fails (gate mode, director panel width): skill body does not size the\n  PHASE-GATE panel from `modes.workflow` (PR at `minimal`, TD + PR at `standard`,\n  all 4 at `full`)\n- If A2 fails (authoring, no per-section May-I-write): skill asks once at the end, not\n  before each section write\n- If T3 fails (team, BLOCKED not surfaced): skill doesn't halt dependent work on blocked agent\n\nShow the full combined diagnosis to the user before proposing any changes.\n\n---\n\n## Phase 4: Propose Fix\n\nWrite a targeted fix for each failure and warning. Show the proposed changes\nas clearly marked before\/after blocks. Only change what is failing \u2014 do not\nrewrite sections that are passing. In a skill with a `references\/` folder, a\nfix to a phase's steps goes in that phase's `references\/` file, not back into\n`SKILL.md`; the question below then names each file the fix changes.\n\nAsk: \"May I write this improved version to `.claude\/skills\/[name]\/SKILL.md`?\"\n\nIf the user says no, stop here.\n\n---\n\n## Phase 5: Write and Retest\n\nRecord the current content of each file the fix changes \u2014 the exact text, kept\nin this conversation \u2014 so Phase 6 can restore it.\n\nWrite the improved skill to `.claude\/skills\/[name]\/SKILL.md`, and to each\n`references\/` file the fix changes.\n\nRe-run `\/skill-test static [name]` and record the new static score \u2014 measured by that run, never stated from the edit.\nIf a category was assigned, also re-run `\/skill-test category [name]` and record the new category score.\n\nDisplay the comparison:\n```\nStatic:   Before [N] failures, [M] warnings  \u2192  After [N'] failures, [M'] warnings\nCategory: Before [N] failures, [M] warnings  \u2192  After [N'] failures, [M'] warnings  (if applicable)\nCombined: [before] \u2192 [after] (improved \/ no change \/ worse)\n```\n\n`[before]` and `[after]` are the Phase 6 combined counts \u2014 failures plus\nwarnings, both dimensions \u2014 e.g. `Combined: 3 \u2192 0 (improved)`.\n\n---\n\n## Phase 6: Verdict\n\nCount the combined failure total: static FAILs + category FAILs + static WARNs + category WARNs.\n**A re-test that comes back NOT ASSESSED** (for example, the edit broke the\nfrontmatter so the file no longer parses) is never an improvement, whatever its\ncounts: take the \"did not improve\" branch below.\n\n**If combined score improved (combined failure count is lower than baseline):**\nReport: \"Score improved. Changes kept.\"\nShow a summary of what was fixed in each dimension.\n\n**If combined score is the same or worse:**\nReport: \"Combined score did not improve.\"\nShow what changed and why it may not have helped.\nAsk: \"May I restore `.claude\/skills\/[name]\/SKILL.md` to the content it had before this run?\"\n\u2014 naming every file Phase 5 wrote.\nIf yes: write the content recorded in Phase 5 back to each file with Write; if no, leave the files as written. Never\n`git checkout` it \u2014 that returns the last *committed* version and discards any edits\nmade before this run that were not yet committed.\n\n---\n\n## Phase 7: Next Steps\n\n- Run `\/skill-test static all` to find the next skill with failures.\n- Run `\/skill-improve [next-name]` to continue the loop on another skill.\n- Run `\/skill-test audit` to see overall coverage progress.\n","use_cases":["Fixing a skill that fails static checks like missing frontmatter fields or missing verdict keywords.","Improving a skill's category score by addressing rubric failures like incorrect gate mode sizing.","Enhancing a skill's workflow by adding ask-before-write language or follow-up sections."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Donchitos\/Claude-Code-Game-Studios\/blob\/abc0de79d6ceb0b5d7aa693945849b3937afbe6a\/.claude\/skills\/skill-improve\/SKILL.md","source_commit":"abc0de79d6ceb0b5d7aa693945849b3937afbe6a","license":null,"version":null,"listing_approved_at":"2026-11-18","created_at":"2026-11-17T19:32:24.000000Z","updated_at":"2026-11-18T12:52:01.000000Z","seo_title":"Improve Skill via Test-Fix-Retest Loop","seo_description":"Improve a skill by running static and category checks, fixing issues, and retesting for improvements. The process includes targeted fixes, score evaluation, and a choice:","seo_keywords":["improve skill test fix retest","skill static checks","category rubric improvements","ask-before-write language","follow-up section addition"]}}