api-contract-validator

Validate TypeScript interfaces against Pydantic models and generate mismatch reports.

1|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/okgoogle13/careercopilot --skill api-contract-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract-validator
Source: https://github.com/okgoogle13/careercopilot/tree/main/.claude/skills/api-contract-validator
Command: npx skills add https://github.com/okgoogle13/careercopilot --skill api-contract-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about api-contract-validator

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

FAQPage Schema
How do I validate API contracts between TypeScript and Python backend services?

API contract validation compares TypeScript interfaces with Pydantic models to catch type mismatches, field naming differences (camelCase vs snake_case), and optionality inconsistencies before deployment. This skill automates the detection across your fullstack application, generating a structured report with fixes.

What types of API mismatches can be detected between frontend and backend?

Detection identifies field name differences, type mismatches, missing fields, optionality inconsistencies, and enum value discrepancies between TypeScript interfaces and Pydantic models. The skill generates actionable fix suggestions in a comprehensive validation report.

Can I use this for contract testing before a release?

Yes. Run this skill before major releases to catch all potential API breaking changes and type inconsistencies between TypeScript and Pydantic definitions, preventing runtime errors and ensuring smooth deployment without user-facing bugs.

Does this handle camelCase and snake_case naming conventions?

The skill normalizes naming convention differences between camelCase (TypeScript) and snake_case (Python) during validation, automatically detecting and reporting field name mismatches caused by these convention variations.

What output does the validation report provide?

The skill generates an API_CONTRACT_VALIDATION.md report containing a contract health score, detailed mismatch descriptions categorized by issue type, and code suggestions for resolving each inconsistency.

Related Skills