api-contract-sync

Community

Keep backend and frontend API types in sync.

Authordjimontyp
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill automatically detects and synchronizes API contracts between your backend and frontend, preventing type mismatches and runtime errors when data structures, endpoints, or message formats change.

Core Features & Use Cases

  • Context-Driven Detection: Dynamically identifies the API contract type (Pydantic, GraphQL, OpenAPI, WebSocket) from your project context.
  • Automated Type Generation: Generates corresponding frontend types (TypeScript interfaces, Zod schemas, client SDKs) based on the detected backend contract.
  • Mismatch Validation & Resolution: Validates synchronization, identifies type drift, and suggests strategies for resolving breaking changes.
  • Use Case: You've updated a Pydantic model in your FastAPI backend. This skill automatically detects the change, generates the updated TypeScript interfaces for your React frontend, and ensures type safety across your full-stack application, saving you manual effort and preventing bugs.

Quick Start

This skill is typically invoked automatically when backend models change.

To manually trigger a sync for Pydantic models:

Invoke skill with:

contract_type: "Pydantic → TypeScript"

backend_model_files: ["backend/app/models/user.py", "backend/app/models/task.py"]

frontend_output_dir: "frontend/types/"

Dependency Matrix

Required Modules

pydantictypescriptgraphql-codegenopenapi-typescript

Components

scriptsreferencesassets

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: api-contract-sync
Download link: https://github.com/djimontyp/task-tracker/archive/main.zip#api-contract-sync

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository