api-contract-normalizer
Unifies API response patterns across endpoints including pagination format, error structure, status codes, response envelopes, and versioning strategy. Provides contract documentation, shared TypeScript types, middleware utilities, and migration plan. Use when standardizing "API contracts", "response formats", "API conventions", or "API consistency".
npx skills add majiayu000/claude-skill-registry --skill api-endpoint-generator --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# API Contract Normalizer Standardize API contracts across all endpoints for consistency and developer experience. ## Core Workflow 1. **Audit existing APIs**: Document current inconsistencies 2. **Define standards**: Response format, pagination, errors, status codes 3. **Create shared types**: TypeScript interfaces for all contracts 4. **Build middleware**: Normalize responses automatically 5. **Document contract**: OpenAPI spec with examples 6. **Migration plan**: Phased rollout strategy 7. **Versioning**: API version strategy ## Standard Response Envelope ```typescript // types/api-contract.ts export interface ApiResponse<T = unknown> { success: boolean; data?: T; error?: ApiError; meta?: ResponseMeta; } export interface ApiError { code: string; message: string; details?: Record<string, string[] | string>; trace_id?: string; } export interface ResponseMeta { timestamp: string; request_id: string; version: string; } export interface PaginatedResponse<T> extends ApiResponse<T[]> { meta: ResponseMeta & PaginationMeta; } export interface PaginationMeta { page: number; limit: number; total: number; total_pages: number; has_next: boolean; has_prev: boolean; } ``` ## Pagination Standar
- Core Workflow
- Standard Response Envelope
- Pagination Standards
- Error Standards
- Response Normalization Middleware
- Status Code Standards
- Versioning Strategy
- Migration Strategy
- Contract Documentation
- Shared Utilities
- Best Practices
- Output Checklist
What does the api-contract-normalizer skill do?
Unifies API response patterns across endpoints including pagination format, error structure, status codes, response envelopes, and versioning strategy. Provides contract documentation, shared TypeScript types, middleware utilities, and migration plan. Use when standardizing "API contracts", "response formats", "API conventions", or "API consistency".
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-endpoint-generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
