api-contract

Create API contracts coordinating backend and frontend interfaces with TypeScript validation rules.

18|1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/damienlaine/agentic-sprint --skill api-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract
Source: https://github.com/damienlaine/agentic-sprint/tree/main/skills/api-contract
Command: npx skills add https://github.com/damienlaine/agentic-sprint --skill api-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The API contract defines a shared interface between backend and frontend agents, providing a single source of truth for endpoints, requests/responses, and error handling.

Core Features & Use Cases

  • Centralizes API shape in api-contract.md as the single source of truth.
  • Endpoints, request/response schemas, and error codes to align backend and frontend.
  • TypeScript interfaces to ensure type safety across teams.
  • Validation rules and clear error handling guidelines.

Quick Start

Create .claude/sprint/[N]/api-contract.md and fill in sections for Base URL, Authentication, Endpoints, TypeScript Interfaces, and Validation Rules. Use the examples in this skill as templates.

Frequently Asked Questions about api-contract

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

FAQPage Schema
How do I create a shared API contract between backend and frontend teams?

An API contract is a single source of truth document that defines endpoints, request/response schemas, authentication, and error handling. Create a markdown file in .claude/sprint/[N]/api-contract.md with sections for Base URL, Authentication, Endpoints, TypeScript Interfaces, and Validation Rules to align both teams on the API shape.

What should an API contract include for validation and error handling?

API contract validation rules define how requests are validated, what error codes are returned, and how errors are formatted. Include explicit validation rules, error codes, error response schemas, and handling guidelines so frontend and backend teams reference identical requirements.

How do I use TypeScript interfaces in an API contract?

TypeScript interfaces in an API contract ensure type safety across backend and frontend by defining request/response shapes. Define interfaces for each endpoint's input and output, making them accessible to both teams so types stay synchronized during implementation.

Can I use an API contract for endpoint documentation and QA testing?

Yes. An API contract serves as documentation for all endpoints, request/response schemas, and error codes, making it the reference for QA testing, feature development, migrations, and validation across the entire API lifecycle.

What versioning and authentication details should I include in an API contract?

An API contract specifies Base URL, API versioning strategy, authentication method, required headers, pagination approach, and rate-limiting rules. These core requirements ensure both teams implement consistent endpoints and handle requests identically.

When should I use an API contract instead of ad-hoc documentation?

Use an API contract when backend and frontend teams need a single validated reference that prevents misalignment on endpoints, data types, error codes, and validation logic. It replaces scattered documentation with a structured source of truth updated alongside feature changes.