api-test-generator

api-test-generator is a skill for Claude Code, Codex from tahirraufkeeyu/software-development-agent-stack--sdas. It costs 74 tokens per session (2,195 once invoked), scanned A, original, MIT.

A tool definition for turning an OpenAPI 3 specification—a machine-readable description of an API—into runnable tests. It supports Schemathesis, REST-assured for Java, or supertest for Node.js.

In plain words
What is it for?
Use it to create API contract tests, test authentication and rate limits, check positive and negative cases, and validate response data against the OpenAPI schemas.
Why use it?
It removes the need to hand-write many valid and invalid requests and helps detect when an API’s real responses no longer match its documented contract.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import spec from '../../openapi.json';.

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/tahirraufkeeyu/software-development-agent-stack--sdas
agentmods
npx agentmods add skills/tahirraufkeeyu/software-development-agent-stack--sdas/api-test-generator

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-test-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/api-test-generator.svg)](https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/api-test-generator)
Your own site
<a href="https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/api-test-generator"><img src="https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/api-test-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,195 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.02195
Opus 5 $0.00037 $0.01097
Sonnet 5 $0.00015 $0.00439
Haiku 4.5 $0.00007 $0.00219

Measured 6d ago against content hash 877defce9af9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

api-test-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

departments/qa/skills/api-test-generator/SKILL.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to use

Invoke this skill when:

  • A team maintains an OpenAPI 3.0 / 3.1 document (openapi.yaml, openapi.json).
  • CI needs a contract-drift guard that fails when responses diverge from the spec.
  • You want property-based fuzzing (Schemathesis) without hand-writing input permutations.
  • You need a fast port of the OpenAPI spec into an existing Java/Node test project.

Do NOT use when: the service has no machine-readable spec (write OpenAPI first); the flow is multi-step UI interaction (use e2e-test-generator); you need a load test (use performance-test or k6/Gatling — outside scope).

Inputs

  • spec (required): Path or URL to OpenAPI 3.x document.
  • target (required): schemathesis, rest-assured, or supertest.
  • base_url (required): Origin to test against, e.g. https://staging.example.com/api.
  • auth (optional): { type: "bearer" | "apiKey" | "basic", env: "TEST_TOKEN" }. Default bearer from TEST_TOKEN.
  • rate_limit_threshold (optional): Requests/second to use in rate-limit test. Default 20.
  • out_dir (optional): Where to write tests. Defaults per target: tests/contract/, src/test/java/contract/, test/api/.

Outputs

  • For schemathesis: a pytest module test_contract.py, a conftest.py with auth fixture, and a shell command to invoke via CLI.
  • For rest-assured: one Java class per tag in the spec plus a BaseApiTest with auth setup.
  • For supertest: one .test.ts per resource with Jest/Vitest describe blocks.
  • A coverage report mapping each (path, method, response code) in the spec to a generated test.

Tool dependencies

  • Read, Write, Grep, Glob (always).
  • WebFetch when spec is a URL.
  • For schemathesis: user must have pip install schemathesis pytest in their test env.
  • For rest-assured: Maven/Gradle dependency io.rest-assured:rest-assured:5.x.
  • For supertest: npm i -D supertest @types/supertest jest ajv (or vitest).

Procedure

  1. Load the spec. If URL, fetch. Parse YAML/JSON. Extract: servers, securitySchemes, paths, operationIds, tags, request/response schemas.
  2. Bucket endpoints. Group by tag; one file per tag (rest-assured, supertest) or a single pytest module (schemathesis).
  3. Resolve auth. Map securitySchemes to an auth fixture that reads the token from auth.env.
  4. Generate positive tests. For each operation, produce a request with a minimal valid body (schemathesis does this automatically; for manual targets, instantiate from example or required-fields-only).
  5. Generate negative tests.
    • Missing required fields → expect 400.
    • Wrong type (string where integer) → expect 400 or 422.
    • Unauthenticated call → expect 401.
    • Wrong scope / forbidden → expect 403.
    • Unknown resource id → expect 404.
  6. Generate rate-limit test. Fire rate_limit_threshold * 2 requests in a burst against a GET endpoint; assert at least one 429 and that Retry-After is present.
  7. Validate every response against schema. Use schemathesis built-in validation, rest-assured.matchesJsonSchema, or ajv in supertest.
  8. Emit a coverage table. Markdown file listing endpoint × response code × covered/uncovered.
  9. Write CI snippet. A Makefile target or GitHub Actions step to run the suite on every PR.

Read the full file on GitHub · 208 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 208 lines · 74 tokens per session scan A 877defce9af9

Subscribe to this mod's changes

api-test-generator is a skill published in the GitHub repository tahirraufkeeyu/software-development-agent-stack--sdas (18 stars, last pushed 4mo ago), licensed MIT. It adds 74 tokens to every session and 2,195 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens

test-warp-ui

Guides testing Warp UI features and changes using the computer use tool. Use this skill only when computer-use testing was requested (explicit request or accepted offer) and the computeruse tool is available to the agent. Covers launching Warp and verifying UI behavior.

warpdotdev/warp · 55 tokens

test-electron-app

Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser. Connect to the running app on port 9222, test desktop changes against a local Django stack, snapshot the accessibility tree, inspect network requests, and screenshot only when explicitly asked. Use when…

PostHog/posthog-foss · 112 tokens

pyats-dynamic-test

Generate and execute deterministic pyATS aetest validation scripts - interface state, OSPF neighbors, BGP paths, ping matrices, and custom compliance tests. Use when writing a network test, validating post-change state, running pass/fail checks, or building automated regression tests.

automateyournetwork/netclaw · 61 tokens

trailblaze

Use when working with Trailblaze — natural-language device control for coding agents across iOS, Android, and web, with replayable .trail.yaml files as the artifact. Trigger on mentions of Trailblaze, the trailblaze CLI, .trail.yaml files, trailmaps, waypoints, or requests to drive / author / debug / run UI tests on…

block/trailblaze · 115 tokens

Detox Mobile Testing

Gray-box end-to-end testing for React Native apps with Detox. Covers .detoxrc.js configuration, build and test commands, matchers, device.launchApp control, automatic synchronization, and macOS CI pipelines.

PramodDutta/qaskills · 48 tokens