Install any skill in seconds. Free to start, no credit card required.
Get Started Free →rshankras/tdd-refactor-guard
Pre-refactor safety checklist. Verifies test coverage exists before AI modifies existing code. Use before asking AI to refactor anything.
Passed 15 of 19 test cases with the skill, and 10 of 19 without it.
and 5 more in the full report
7 fixed10 passed either way4 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
Provide the exact Markdown table column headers required for the Coverage Summary section in a Refactor Guard Report.
| Checked | Without skill | With skill |
|---|---|---|
| Includes column headers Class, Public Methods, Tests, Coverage, and Verdict in the markdown table. | Missed | Passed |
The instructions your model reads when the skill loads.
A safety gate that runs before any AI-assisted refactoring. Ensures tests exist to catch regressions. If coverage is insufficient, generates characterization tests first.
Use this skill when the user:
Without guard: With guard:
"Claude, refactor this" "Claude, refactor this"
→ AI rewrites code → Guard checks for tests
→ Something breaks → Tests missing → generate them
→ You don't know what → Tests pass → proceed with refactor
→ Debugging nightmare → Tests fail → exact regression found
What code is being refactored?
Ask user: "Which files/classes are you planning to refactor?"
Or detect from context:
Glob: [files mentioned in conversation]
Read: each file to understand scope
test cases passed, vs 10 / 19 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.