knofler/api/api-contract
Claude Code and agent skill by knofler/api
- community
Checking that the SKILL.md file is still in the repository.
Define API contracts — endpoint specs with HTTP methods, paths, auth requirements, request/response schemas. Triggers: 'API contract', 'endpoint spec', 'define endpoints', 'API design', 'route planning'.
Install
npx vskill@latest install knofler/api/api-contractSKILL.md
The same SKILL.md was published earlier as knofler/myai/api-contract.
API Contract Definition
Define API contracts before any implementation begins. Contracts are the single source of truth shared between backend and frontend teams.
When to Use
- Starting a new feature that requires API endpoints
- Redesigning or versioning existing endpoints
- Coordinating frontend-backend work in parallel
Playbook
1. Gather Requirements
- Read the feature spec or user story (check
AI/plan/and any linked issue) - Identify the resources/entities involved
- Determine CRUD operations needed
- Clarify auth requirements (public, authenticated, role-based)
- Note any pagination, filtering, or sorting needs
2. Define Each Endpoint
For every endpoint, specify:
| Field | Example | |
|---|---|---|
| Method | POST | |
| Path | /api/v1/projects | |
| Auth | Bearer JWT — role: admin | |
| Request Body | Zod/Pydantic schema reference | |
| Query Params | ?page=1&limit=20&sort=createdAt | |
| Success Response | 201 { id, name, createdAt } | |
| Error Responses | 400 validation, 401 unauth, 409 duplicate |
3. Output Contract Format
Write the contract as a markdown table or OpenAPI-compatible YAML block in AI/plan/api-contracts/. One file per feature or domain:
Include:
- Base path and API version
- Authentication requirements per endpoint
- Request/response schemas with field types and required markers
- Pagination envelope format:
{ data: [], meta: { page, limit, total } } - Standard error envelope:
{ error: { code, message, details? } }
4. Validate with Stakeholders
- Tag
frontend-specialistto confirm request/response shapes work for the UI - Tag
database-specialistif schema changes are implied - Tag
security-specialistfor any public or elevated-permission endpoints
5. Finalize and Handoff
- Commit the contract file
- Reference it in
state/STATE.mdunder current sprint work - Implementation can now proceed via the
endpoint-implementationskill
Output Artifacts
AI/plan/api-contracts/<feature>.md— the contract document- Updated
state/STATE.md— reference to the new contract
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingAI/skills/api-contract/Users/rummanahmed/Dropbox/Dev/PROJECT/CODE/_MY_PROJECT/AI/skills/api-contract/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/knofler/api/api-contract)