API contract review
Review an API's real contract from its code and OpenAPI files: auth, request and response shapes per operation with the file and line for each, a BMAD model contract, and findings such as missing error responses, auth with no 401/403, untested auth and code disagreeing with the spec. Use for API reviews, endpoint inventories, OpenAPI drift, auth coverage, contract tests or documenting an existing API.
At a glance
- Kind
- Skill · Ananke
skill - Reference
neo-pragnya-mcp/api-contract-review·ananke://skill/neo-pragnya-mcp/api-contract-review@1.0.0- Files
- 1 · 1.8 KB
- How it's used
- Skills load on demand: the agent sees this skill's name and description, and opens SKILL.md (and any bundled references or scripts) when a task matches.
Where it fits
- Task
- Design an APIGenerate API testsPlan testsWrite a specificationWrite tests
- Lifecycle phase
- DesignRequirementsTestingVerification
- Role
- DeveloperQA engineerReviewer
- Domain
- APIsSecurity
- Platform
- Ananke PlexusClaude CodeGitHub Copilot
- Needs
- Nothing (text only)
Facets suggested from the item's own text and tags, not yet reviewed. Facets say where an item is relevant, not that it will run in your setup. How facets work
Checked by Dex
Verified, not self-reported: dex-trove 0.3.16 installed this item into each layout and checked that the tool can load it. Dex collects no download or usage data.
- Claude Code ✓ loads
- GitHub Copilot ✓ loads
Documentation
View upstream ↗Uses Ananke Plexus (ananke triage api-contract), which reads handlers (FastAPI, Starlette, Flask, aiohttp,
Tornado, Express, NestJS) and OpenAPI 3 or Swagger 2 files without running anything.
Steps
uvx --from ananke-plexus ananke triage api-contract --out contractwritesapi-contract.json,model-contract.yamlandapi-contract.md. Pass--spec api/openapi.yamlfor a spec elsewhere.- Read the table: each operation’s auth, request (path, query, header, body schema or the fields the handler
reads) and responses. Observed facts are written down (a type, a
response_model, the spec); inferred ones come from how the handler uses its input. - Work through the findings, high first: auth without 401/403, untested auth (no test calls it, or none checks the failed-auth response), auth the code and spec disagree on, missing error responses.
- Generate contract tests from the spec with
ananke triage api-tests openapi.yaml, and run them only against a service on this machine (--run http://127.0.0.1:8000). - Gate CI on it:
ananke triage api-contract --fail-on high.
Rules
- Frameworks listed as unsupported (Go, Spring, ASP.NET, Rails, Laravel, Rust) aren’t read; describe them in an OpenAPI file rather than assuming they have no API.
- Auth applied to a whole app elsewhere isn’t seen; confirm a “no auth” result in the code.