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';.

Good fit 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.

Compare 6 skills from other repositories ↓
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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-test-generator

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00030 $0.00878
Sonnet 5.5 $0.00015 $0.00439
Haiku 4.5 $0.00007 $0.00219

Measured 1mo ago against content hash 877defce9af9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (19 stars, last pushed 5mo ago), licensed MIT. It adds 74 tokens to every session and 2,195 once invoked, about $0.0003 per session on Opus 5.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

eval-dataset-design

A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.

bojieli/ai-agent-book · 138 tokens

verify-omnigent

Drive Omnigent the way a user does and prove a behavior with recorded evidence, using an isolated server, runner, and mock model plus a feature map of every user entry point. Load before reproducing a user-facing bug, before claiming a fix works, or when reviewing whether a change covered every surface (session vs.…

omnigent-ai/omnigent · 100 tokens

test-master

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation…

Jeffallan/claude-skills · 104 tokens

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

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

critique

Adversarial design critique of the current work — render it, look at it, and argue for rejection. Run after the gates are green, never instead of them.

plugin87/ux-ui-agent-skills · 37 tokens