Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. Use when implementing API integrations, debugging API errors (400, 401, 404), replacing mock APIs, verifying data types, or when user mentions endpoints, API calls, or backend integration.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. Use when implementing API integrations, debugging API errors (400, 401, 404), replacing mock APIs, verifying data types, or when user mentions endpoints, API calls, or backend integration.
API Specification Analyzer
This Skill analyzes OpenAPI specifications to provide accurate API documentation, TypeScript interfaces, and implementation guidance for the caremaster-tenant-frontend project.
When to use this Skill
Claude should invoke this Skill when:
User is implementing a new API integration
User encounters API errors (400 Bad Request, 401 Unauthorized, 404 Not Found, etc.)
User wants to replace mock API with real backend
User asks about data types, required fields, or API formats
User mentions endpoints like "/api/users" or "/api/tenants"
Before implementing any feature that requires API calls
When debugging type mismatches between frontend and backend
Instructions
Step 1: Fetch API Documentation
Use the MCP server tools to get the OpenAPI specification:
Create ready-to-use TypeScript interfaces that match the API specification exactly:
/**
* User creation input
* Required fields: email, name, role
*/exportinterfaceUserCreateInput {
/** User's email address - must be unique */email: string/** Full name of the user (2-100 characters) */name: string/** User role - determines access permissions */role: "admin" | "manager" | "user"/** Account status - defaults to "active" */status?: "active" | "inactive"
}
/**
* User entity returned from API
*/exportinterfaceUser {
/** Unique identifier (UUID format) */id: stringemail: stringname: stringrole: "admin" | "manager" | "user"status: "active" | "inactive"/** ISO 8601 timestamp */createdAt: string/** ISO 8601 timestamp */updatedAt: string
}
User: "I need to implement user creation"
Claude: [Invokes api-spec-analyzer Skill]
1. Fetches OpenAPI spec for POST /api/users
2. Extracts request/response schemas
3. Generates TypeScript interfaces
4. Provides API service implementation
5. Shows TanStack Query hook example
6. Lists validation requirements
Example 2: User gets 400 error
User: "I'm getting a 400 error when creating a tenant"
Claude: [Invokes api-spec-analyzer Skill]
1. Fetches POST /api/tenants specification
2. Identifies required fields and formats
3. Compares user's implementation with spec
4. Points out data type mismatches
5. Provides corrected implementation
Example 3: Replacing mock API
User: "Replace mockUserApi with real backend"
Claude: [Invokes api-spec-analyzer Skill]
1. Fetches all /api/users/* endpoints
2. Generates interfaces for all CRUD operations
3. Shows how to implement each API function
4. Maintains same interface as mock API
5. Provides migration checklist
Notes
Always fetch fresh documentation when user reports API issues
Quote directly from OpenAPI spec when documenting requirements
Flag ambiguities or missing information in documentation
Prioritize type safety - use strict TypeScript types