# test-fixing

Structures how Claude Code diagnoses and repairs failing test suites by grouping errors from import issues to logic bugs.

- skill · `type=skill` · Claude Code · 85 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/development/test-fixing
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/test-fixing

## What it 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.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill development/test-fixing
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill test-fixing -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/test-fixing/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/test-fixing/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/test-fixing/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/test-fixing/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates test-fixing
```

2. **Manually: put the files in place**
- File: `.github/skills/test-fixing/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/test-fixing
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/test-fixing/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/development/test-fixing

## When to use it
- 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
- 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.

## Similar
- [improve-codebase-architecture](https://affpapa.org/en/nevibecode/skills/improve-codebase-architecture.md) — skill · 1163035 installs
- [design-taste-frontend](https://affpapa.org/en/nevibecode/skills/design-taste-frontend.md) — skill · 678700 installs
- [tdd](https://affpapa.org/en/nevibecode/skills/tdd.md) — skill · 1141062 installs
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [agent-browser](https://affpapa.org/en/nevibecode/skills/vercel-labs-agent-browser.md) — skill · 1200000 installs
- [prototype](https://affpapa.org/en/nevibecode/skills/prototype.md) — skill · 986201 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
