Skip to main content
skill CX Codex

parallel-test-fixing — Claude Code skill: what it does, how to install

The skill runs your test suite and assigns each failing test file to a separate subagent for parallel fixes. It helps when multiple test files break simultaneously across a codebase.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add spencerpauly/awesome-cursor-skills --skill parallel-test-fixing -a claude-code
Open on GitHub

What parallel-test-fixing does

The skill executes npm test -- --no-coverage 2>&1 || true and extracts failing files from test output across Jest, Vitest, or Pytest. Each file becomes one task. It launches a dedicated generalPurpose subagent for each target. The subagent inspects the code, modifies the source, and verifies the individual test file.

Once subagents finish, the workflow collects file changes and checks for potential overlaps. A full run of npm test follows. If conflicting edits produce new failures, the agent resolves them sequentially. For large test suites with 50 or more failing tests, the guide suggests grouping 5 to 10 files per subagent instead of launching separate agents for each file.

Parallel fixing breaks down when two failing test files modify the same underlying source module. Concurrent edits will overwrite each other. In that scenario, shared source dependencies belong in a single subagent. For isolated worktrees during remediation, the workflow supports best-of-n-runner subagents.

What it helps with

  • dispatch failing Jest, Vitest, or Pytest files to parallel subagents
  • isolate fix attempts using best-of-n-runner worktrees
  • batch test failures into groups of 5–10 for large suites
  • catch merge conflicts by rerunning npm test after parallel edits

Example prompts for the agent

  • Run the test suite and assign failing files to parallel-test-fixing subagents.
  • Fix these broken Vitest test files in parallel, grouping any tests that share source files.
  • Batch the failing Pytest files into groups of five and repair them using parallel-test-fixing.

How to install parallel-test-fixing

1Skills CLI (Vercel)

npx skills add spencerpauly/awesome-cursor-skills --skill parallel-test-fixing -a claude-code

2Manually: put the files in place

~/.claude/skills/parallel-test-fixing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/parallel-test-fixing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about parallel-test-fixing

How do I install parallel-test-fixing in Claude Code?

Run npx skills add spencerpauly/awesome-cursor-skills --skill parallel-test-fixing -a claude-code. The skill file is placed at ~/.claude/skills/parallel-test-fixing/SKILL.md.

What does parallel-test-fixing do?

It runs your test suite, captures failing files from test runners like Vitest or Jest, and assigns each file to an independent subagent. After subagents apply fixes, it executes npm test to verify the full suite.

What happens if multiple failing tests share the same source file?

Assign those tests to the same subagent instead of running them in parallel. Running them separately risks conflicting file edits on the shared source code.

Source text

SKILL.md · CC0-1.0
---
name: parallel-test-fixing
description: When multiple tests fail, assign each failing test file to a separate subagent that fixes it independently in parallel.
user-invocable: true
---

# Parallel Test Fixing

Speed up fixing a broken test suite by distributing failing tests across parallel subagents.

## Workflow

### 1. Run the Full Test Suite

```bash
npm test -- --no-coverage 2>&1 || true
```

Capture the output and extract all failing test files.

### 2. Group Failures

Parse the test output for failing files:
- Jest: `FAIL src/components/Button.test.tsx`
- Vitest: `FAIL src/utils/format.test.ts`
- Pytest: `FAILED tests/test_api.py::test_create_user`

Group by file — each file becomes one task.

### 3. Launch Parallel Subagents

For each failing test file, launch a `generalPurpose` subagent:

```
Task: Fix the failing tests in <file>

The test file is: <path>
The test command is: <command to run just this file>
The error output was:
<paste the relevant failure output>

Steps:
1. Read the test file and the source file it tests
2. Understand why each test is failing
3. Fix the source code (preferred) or update the test if the test is wrong
4. Run the single test file to confirm it passes
5. Report what you changed and why
```

Launch all subagents simultaneously — they work in parallel since each touches different files.

### 4. Collect Results

As each subagent completes, collect:
- Which tests were fixed
- What files were changed
- Whether the fix might conflict with another subagent's changes

### 5. Verify

Run the full test suite one more time to confirm everything passes:

```bash
npm test
```

If there are new failures (from conflicting fixes), resolve them sequentially.

## Tips

- If two failing tests share the same source file, assign them to the same subagent to avoid edit conflicts
- Set a timeout — if a subagent is stuck for 5+ minutes, check its progress
- For large test suites (50+ failures), batch into groups of 5-10 per subagent rather than one-per-file
- Use `best-of-n-runner` subagents if you want isolated worktrees for each fix attempt

© spencerpauly · CC0-1.0 · spencerpauly/awesome-cursor-skills

Similar skills

All skills for Testing and QA →

From the same set60

converting-css-to-tailwind This skill walks a plain CSS file and rewrites its rules as Tailwind utility classes in your markup. Handy when a project moves off hand-written CSS. CX Codex +1 423installs detecting-port-conflicts Detects EADDRINUSE and port conflicts in terminal output, identifies blocking processes with lsof, and kills them or picks an open port for your dev server. CX Codex +1 418installs setting-up-ci A skill that writes a GitHub Actions pipeline with linting, tests, type-checking and a deploy step. Useful when the repo has no CI yet. CX Codex +1 415installs adding-api-docs This skill writes OpenAPI/Swagger documentation for an API: endpoint schemas, request and response types, and an interactive docs page. CX Codex +1 413installs profiling-performance This skill profiles web application CPU performance using browser MCP tools. It captures call stacks and pinpoints slow functions causing interface lag. CX Codex +1 410installs python-tdd-with-uv Runs your agent through red-green-refactor in Python and sets the project up on uv. Useful when tests come before the code. CX Codex +1 409installs recording-browser-flow-as-test Walks through browser interactions step by step via MCP and outputs a clean Playwright test based on accessibility tree selectors. CX Codex +1 406installs verifying-markdown-formatting Walks a Markdown file through a formatting checklist and fixes what it finds: headings, lists, links, code blocks, spacing. Useful before committing a README or docs. CX Codex +1 404installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor