- Home
- Skills
- APIs & Backend
- API Contract Doc Builder
Works with the AI Agents you already use
API Contract Doc Builder
Turn routes, schemas, and middleware into trusted API references plus a validated OpenAPI, GraphQL, or Postman contract — errors, auth, and examples included.
Free
API Contract Doc Builder
Example session with this skill installed
We just shipped the v1 payments API — Express routes live in src/routes/payments, request bodies are validated with class-validator schemas, and auth is scoped API keys via middleware. There is zero documentation and partners keep emailing us integration questions. Please read the route handlers, validation schemas, and error mappings, then produce a developer reference for each endpoint covering parameters, auth scopes, and a full error catalog, plus copyable cURL, JavaScript, and Python examples, and finally a machine-readable OpenAPI 3 document. Mark anything you cannot verify in the code as an assumption instead of guessing.
- Read your context and instructions
- Compiled the api contract doc
Summary
Drafted the full contract for the payments API from src/routes and the class-validator schemas: 8 endpoints documented, plus a validated OpenAPI 3.1 file. Undocumented behavior (webhook retries, Idempotency-Key reuse windows) is flagged as assumption for your review.
| Artifact | Coverage | Needs review |
|---|---|---|
Endpoint reference (docs/api/) | 8/8 routes | 3 flagged fields |
| Error catalog | 11 codes, 6 status classes | rate-limit envelope |
openapi.yaml | Schemas, security, examples | beta endpoints |
| Runnable cURL/JS/Python examples | Happy + failure path | sandbox base URL |
Next steps
- Confirm the 3 assumption-marked fields against handler behavior
- Point a partner at the Quick Start and paste-test the first cURL example
- Diff
openapi.yamlagainst a live sandbox request before publishing - Label
@deprecatedroutes in the inventory so they render as deprecated
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
API documentation often drifts from reality, leaving developers to guess request shapes, auth requirements, and error codes. Stale docs or missing contracts slow down integration and increase support tickets for internal and partner-facing APIs.
What it does
- Analyzes routes, controllers, and schemas to build precise developer references.
- Generates machine-readable contracts in OpenAPI, GraphQL SDL, or AsyncAPI formats.
- Produces copy-pasteable code snippets in Shell, JavaScript, and Python.
- Maps failure modes and HTTP status codes to specific implementation behaviors.
- Structures onboarding materials including auth guides, pagination logic, and error catalogs.
Frameworks & tools
Supports REST, GraphQL, and event-based architectures. Compatible with OpenAPI 3.x, GraphQL SDL, and Postman Collection formats.
Why this beats prompting it yourself
Generic prompts often hallucinate field types or omit critical failure modes. This skill enforces a strict verification workflow that treats documentation as a technical contract, ensuring every example is self-contained and every schema field is explicitly typed and validated.
Use cases
- Generating a validated OpenAPI YAML from legacy Express or FastAPI routes.
- Documenting GraphQL resolvers including field-level auth and complexity caps.
- Preparing partner-facing integration guides with realistic request-response pairs.
- Auditing implementation code to identify undocumented fields or missing error handles.
Known limitations
Requires access to source code or detailed requirements to avoid assumptions. Does not perform live network testing of endpoints.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Output quality depends on how much of the implementation is readable in the repo; live traffic is not inspected, so unverifiable runtime behavior is marked as assumptions and examples are validated against the documented schema rather than executed against a running server.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
6 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 1 month ago
- Free with an Agensi account
- Accounts
Acme
Permissions
Allowed Hosts
File Scopes
Reads source routes, schemas, and middleware to extract contracts and writes documentation and OpenAPI artifacts back into the repo; no network access is required.