# fix-tests

This skill tracks down failing tests after logic changes or refactoring and guides fixes until the suite passes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 1787
- Author: NeoLabHQ
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/fix-tests/SKILL.md
- Updated: 2026-08-26
- HTML: https://affpapa.org/en/nevibecode/skills/fix-tests

## What it does

The skill reads `README.md` and the project configuration, finds test and coverage commands, then runs the full suite. It parses the failures, groups them by file, and checks how to run one test file in isolation. Developer agents then inspect each failing file, the project documentation, and the failure cause before making a fix.

Its main rule is to change tests while preserving what they are meant to verify. Assertions, setup, or mocks may be updated; business logic should change only when it is clearly broken. With two or more changed files, or with complex logic in one file, the skill orchestrates agents instead of writing tests itself. A single simple file change can be handled directly. After each pass, it runs the full suite again and returns to the remaining failures. That makes the business-logic boundary worth checking before you accept a fix.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill fix-tests -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill fix-tests -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill fix-tests -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NeoLabHQ/context-engineering-kit fix-tests
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill fix-tests -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NeoLabHQ/context-engineering-kit --path skills/fix-tests
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill fix-tests -a opencode
```

### 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/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/fix-tests/SKILL.md

## When to use it
- locate every failing test file
- find a reliable command for one test file
- update assertions after a refactor
- repair broken test setup or mocks
- rerun the full suite after fixes

## Example prompts
- Use `fix-tests` to find and repair every failing test after a business logic change.
- Run `fix-tests` for the tests in `src/orders`, verify the single-file command, then run the full suite.
- Apply `fix-tests` after a dependency update; preserve test intent and change business logic only if it is clearly broken.

## Similar
- [fix-flaky-tests](https://affpapa.org/en/nevibecode/skills/fix-flaky-tests.md) — skill · 503 installs
- [bmad-qa-generate-e2e-tests](https://affpapa.org/en/nevibecode/skills/bmad-qa-generate-e2e-tests.md) — skill · 11600 installs
- [run-acceptance-tests](https://affpapa.org/en/nevibecode/skills/run-acceptance-tests.md) — skill · 3700 installs
- [writing-mstest-tests](https://affpapa.org/en/nevibecode/skills/writing-mstest-tests.md) — skill · 3400 installs
- [om-integration-tests](https://affpapa.org/en/nevibecode/skills/om-integration-tests.md) — skill · 3000 installs
- [e2e-tests-studio](https://affpapa.org/en/nevibecode/skills/e2e-tests-studio.md) — skill · 2500 installs

From the same set: [neolabhq/context-engineering-kit](https://affpapa.org/en/nevibecode/by/neolabhq/context-engineering-kit.md) — 64 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
