API Contract Check

Validate API endpoint implementations against a documented api.md contract.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/jimmymalhan/codereview-pilot --skill api-contract-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: API Contract Check
Source: https://github.com/jimmymalhan/codereview-pilot/tree/main/.claude/skills/api-contract-check
Command: npx skills add https://github.com/jimmymalhan/codereview-pilot --skill api-contract-check

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents API contract drift by automatically verifying that code implementations match documented API specifications, catching inconsistencies before they impact production.

Core Features & Use Cases

  • Contract Validation: Compares code definitions of API endpoints against a central api.md contract.
  • Drift Detection: Identifies routes present in code but missing in documentation, or vice-versa.
  • Consistency Checks: Ensures error response formats and status codes align with the documented contract.
  • Use Case: After updating a route handler in src/routes/users.js, this Skill will immediately check if the changes align with the expected request/response structure defined in .claude/rules/api.md.

Quick Start

Run the API contract check skill to validate all backend API endpoints against the documented contract.

Frequently Asked Questions about API Contract Check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect API contract drift between my code and documentation?

API contract drift is detected by comparing code definitions in `src/server.js` and `src/routes/*.js` against a documented `api.md` specification to find missing routes, undocumented endpoints, and status code mismatches.

What is the best way to validate backend API endpoint implementations against a contract?

Validating backend API endpoints involves comparing route handler implementations against a central `api.md` contract to ensure request and response structures align consistently before reaching production.

How do I check for missing routes or undocumented endpoints in my Node.js backend?

Checking for undocumented endpoints involves comparing the route definitions in `src/server.js` and `src/routes/*.js` against the documented `api.md` specification to identify missing or mismatched routes.

Does API contract validation check for mismatches in error response status codes?

API contract validation checks for consistency by ensuring error response formats and status codes align exactly with the documented `api.md` contract specification across all route implementations.

Can I use this to verify route handler changes align with API documentation?

Verifying route handler changes against API documentation is supported by comparing the updated definitions in `src/routes/*.js` directly with the expected structure defined in the `api.md` contract.

What file format do I need for API contract validation to work?

API contract validation requires a central `api.md` specification file documenting the expected endpoints, alongside code definitions in `src/server.js` and `src/routes/*.js` for comparison.