What problem does it solve?
API contract mismatches between frontend (TypeScript) and backend (Pydantic) lead to runtime errors, broken features, and frustrating debugging sessions. This skill automates the detection of these inconsistencies, ensuring type safety across your fullstack application.
Core Features & Use Cases
- Automated Type Validation: Scans TypeScript interfaces and Pydantic models to ensure type and field consistency between your frontend and backend.
- Mismatch Detection: Identifies critical issues like field name differences (e.g.,
userId vs. user_id), type mismatches (e.g., string vs. int), missing fields, and optionality inconsistencies.
- Detailed Reports & Fixes: Generates a comprehensive
API_CONTRACT_VALIDATION.md report with a contract health score, detailed mismatch descriptions, and actionable code suggestions for resolution.
- Use Case: Before a major release, run this skill to catch all potential API breaking changes or inconsistencies, ensuring a smooth deployment and preventing user-facing bugs.
Quick Start
Validate API contracts between frontend TypeScript interfaces and backend Pydantic models. Generate a report with all detected mismatches and suggested fixes.