# api-test-suite-builder

api-test-suite-builder is a Claude Code skill that creates API test scaffolds from OpenAPI and checks endpoint coverage. Use it to add tests, audit assertions, or spot contract drift.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 111 installs · ★ 1183 repo stars
- Author: borghei
- License: LicenseRef-MIT-Commons-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/borghei/Claude-Skills/tree/HEAD/engineering/api-test-suite-builder/SKILL.md
- Updated: 2026-11-08
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/borghei-api-test-suite-builder

## What it does

The skill scans API routes and inspects request and response schemas. From a specification or source files, it creates test files for authentication, validation, error cases, and contracts. It can also produce k6 load-test scripts.

Three scripts handle the work: `test_generator.py` creates scaffolds, `coverage_analyzer.py` counts called endpoints and those with body or header assertions, and `contract_validator.py` compares saved responses with the schema. Specs must be JSON; supported formats are OpenAPI 3.x and Swagger 2.0. The scripts run with Python.

A generated scaffold does not establish that a response is correct: body checks contain TODOs, and the coverage analyzer counts only body or header assertions. Contract checks need response samples. The scripts return an error when a spec or JSON file cannot be read.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill api-test-suite-builder -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill api-test-suite-builder -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill api-test-suite-builder -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install borghei/Claude-Skills engineering/api-test-suite-builder/SKILL.md
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill api-test-suite-builder -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/borghei/Claude-Skills --path engineering/api-test-suite-builder
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill api-test-suite-builder -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/borghei/Claude-Skills/tree/HEAD/engineering/api-test-suite-builder/SKILL.md

## When to use it
- generate test scaffolds from an OpenAPI spec
- find endpoints whose tests lack response assertions
- compare saved API responses with their schemas
- create authentication and validation error tests

## Example prompts
- Generate a `vitest` scaffold from `openapi.json`.
- Measure endpoint coverage using `openapi.json` and `tests/api`.
- Check the responses in `responses/` against `openapi.json`.

## Similar
- [api-test-suite-generator](https://affpapa.org/en/nevibecode/skills/api-test-suite-generator.md) — skill · 319 installs
- [k6-docs](https://affpapa.org/en/nevibecode/skills/takuan-osho-k6-docs.md) — skill · 1 install
- [qe-contract-testing](https://affpapa.org/en/nevibecode/skills/qe-contract-testing.md) — skill · 115 installs
- [api-reference-quality](https://affpapa.org/en/nevibecode/skills/api-reference-quality.md) — skill · 10500 installs
- [api-contract-testing](https://affpapa.org/en/nevibecode/skills/secondsky-api-contract-testing.md) — skill · 498 installs
- [k6-perf-test-website](https://affpapa.org/en/nevibecode/skills/k6-perf-test-website.md) — skill · 3800 installs

## Other versions with the same name
- [api-test-suite-builder · alirezarezvani](https://affpapa.org/en/nevibecode/skills/api-test-suite-builder.md) — 660 installs

From the same set: [borghei/claude-skills](https://affpapa.org/en/nevibecode/by/borghei/claude-skills.md) — 120 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
