# write-tests

The skill reads your uncommitted and untracked git changes and writes tests for them. Useful when the logic is done but coverage is not.

- 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/write-tests/SKILL.md
- Updated: 2026-08-26
- HTML: https://affpapa.org/en/nevibecode/skills/write-tests

## What it does

It starts with `git status -u` to list changed files, drops docs and configs, and keeps the ones with real logic. If the tree is clean, it falls back to `git show --name-status` on the latest commit. Then it picks a route: a single simple file gets tests written directly, while several files or one complex file go to subagents.

The workflow is a sequence of steps. The skill reads `README.md` and the project config, finds the commands for tests and coverage, and runs the full suite to get a baseline. In parallel it works out how to run one test file in isolation and has haiku agents summarise each change. Test creation goes to `review:test-coverage-reviewer` and `developer` agents, and the same reviewers check the result. Existing tests stay untouched — the skill only adds new ones.

You can pass an argument to narrow the scope to a module or a test suite. With no argument it takes the whole diff. The skill leans on two others from the same kit: `sadd` for agent management and a TDD skill for test-writing practices. Missing ones are skipped, though that costs you on complex changes.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill write-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/write-tests/SKILL.md

## When to use it
- cover fresh business logic before committing
- list changed files in git and filter out docs and configs
- raise coverage on one simple file without spawning subagents
- hand test writing to agents when several files changed
- confirm new tests did not break the existing suite

## Example prompts
- write tests for my uncommitted changes
- cover the latest commit with tests
- add tests for the auth module only

## Similar
- [write-e2e-tests](https://affpapa.org/en/nevibecode/skills/write-e2e-tests.md) — skill · 430 installs
- [fix-flaky-tests](https://affpapa.org/en/nevibecode/skills/fix-flaky-tests.md) — skill · 503 installs
- [adding-e2e-tests](https://affpapa.org/en/nevibecode/skills/adding-e2e-tests.md) — skill · 445 installs
- [run-acceptance-tests](https://affpapa.org/en/nevibecode/skills/run-acceptance-tests.md) — skill · 3700 installs
- [e2e-tests-studio](https://affpapa.org/en/nevibecode/skills/e2e-tests-studio.md) — skill · 2500 installs
- [running-release-tests](https://affpapa.org/en/nevibecode/skills/running-release-tests.md) — skill · 1400 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
