test-fixing — Claude Code skill: what it does, how to install
Structures how Claude Code diagnoses and repairs failing test suites by grouping errors from import issues to logic bugs.
npx claude-code-templates@latest --skill development/test-fixingWhat test-fixing does
This skill establishes an ordered debugging routine for broken test suites. Instead of editing arbitrary files, Claude Code starts with make test to capture failures and groups them by root cause: missing modules, changed call signatures, or failed assertions.
Repairs proceed in batches by dependency order. The agent resolves import errors and configuration problems first, applies API signature updates second, and addresses logic assertions last. It inspects recent edits using git diff, checks conventions in CLAUDE.md, and runs targeted checks with uv run pytest before moving to the next batch.
Without make test or pytest configured in the workspace, you will need to adjust the test commands manually. A final full run verifies that the targeted fixes introduced no regressions.
What it helps with
- group broken test runs by failure category after refactoring
- resolve import mismatches and dependency issues first
- verify isolated test batches with targeted pytest commands
- fix altered function signatures across test modules
Example prompts for the agent
- Fix the failing test suite and make sure make test passes.
- The tests broke after my recent refactor, group the errors and resolve them.
- Run the test suite and fix import failures before checking logic assertions.
How to install test-fixing
1claude-code-templates
npx claude-code-templates@latest --skill development/test-fixing2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill test-fixing -a claude-code3Manually: put the files in place
~/.claude/skills/test-fixing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/test-fixing/
Manually: put the files in place
.agents/skills/test-fixing/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/test-fixing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates test-fixing2Manually: put the files in place
.github/skills/test-fixing/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/test-fixingManually: put the files in place
.devin/skills/test-fixing/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about test-fixing
How to install test-fixing in Claude Code?
Run npx claude-code-templates@latest --skill development/test-fixing in your terminal.
What order does test-fixing follow when resolving errors?
It resolves infrastructure and import failures first, updates altered function signatures second, and tackles assertion logic issues last.
Which command-line tools does the skill expect?
It relies on git diff to inspect modifications, make test for full suite runs, and uv run pytest with file or pattern flags for focused checks.