AGENT
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination,…
Not all tests are equal. Choosing the right *level* for a given behavior is the difference between a suite that gives fast, reliable signal and one that is slow, flaky, and ignored.
$ npx -y skills add vanara-agents/skills --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Not all tests are equal. Choosing the right *level* for a given behavior is the difference between a suite that gives fast, reliable signal and one that is slow, flaky, and ignored.
Not all tests are equal. Choosing the right *level* for a given behavior is the difference between a suite that gives fast, reliable signal and one that is slow, flaky, and ignored.
/\ E2E / UI few, slow, high-confidence, brittle
/ \
/----\ Integration some, medium speed, real collaborators
/ \
/--------\ Unit many, fast, isolated, cheapPush the bulk of your assertions **down** to the unit level where they are fast and stable. Use the higher levels sparingly to prove the pieces wire together, not to re-test logic that unit tests already cover. An inverted pyramid (mostly E2E) is slow and flaky.
or I/O boundary are replaced with doubles.
dependency (a database, an in-memory queue, a local HTTP server).
framework request/response handling, transaction behavior.
the *wiring*, not the *rules*.
| Question | Level | |---|---| | Does `applyDiscount(49.99, 10)` round correctly? | Unit | | Does an invalid percentage throw `RangeError`? | Unit | | Does the repository persist and re-read an order from Postgres? | Integration | | Does `POST /orders` return `201` with a `Location` header? | Integration | | Can a user add to cart and complete checkout in the browser? | E2E |
The 80% target is a floor that flags untested regions, not a trophy. 100% line coverage with assertion-free tests proves nothing. Chase **branch and behavior** coverage — every error path and boundary — over raw line percentage. Use `scripts/check-coverage.mjs` to gate the floor in CI, and read the uncovered lines to find the cases you forgot.
🐒 Free agents, skills & packs for Claude Code One subscription. An army of Claude Code agents. 30 production-grade agents, skills, and packs for Claude Code — free, Apache-2.0, install with one command.
Repo: vanara-agents/skills
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination,…
This shows how the api-designer agent reviews a flawed draft. Findings are severity-ranked so the implementer fixes the contract-breakers first. Severity…
The contract is the deliverable. Express it as an **OpenAPI 3.1** document so it is human-readable *and* machine-checkable. This reference covers how to…
Run through this before declaring an API contract done. It is ordered the way you should *design*: resources first, cross-cutting rules last. Every box is a…
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version…
Copy-paste templates for leaving review comments. Keep each comment to one finding: an anchor, the problem, and the fix.