ui-contract

Generate TypeScript types from Pydantic models for FastAPI contracts.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/krazyuniks/guitar-tone-shootout-archive --skill ui-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ui-contract
Source: https://github.com/krazyuniks/guitar-tone-shootout-archive/tree/main/.claude/skills/ui-contract
Command: npx skills add https://github.com/krazyuniks/guitar-tone-shootout-archive --skill ui-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill defines and maintains complete API contracts between backend and frontend, ensuring consistent data shapes, type mappings, and standardized error responses across stacks.

Core Features & Use Cases

  • Pydantic to TypeScript mapping: Generate TypeScript types from Pydantic models to keep clients in sync with server models.
  • Standardized contracts: Consistent request/response schemas, error formats, and pagination contracts across the API surface.
  • Use Case: When building a React frontend against a FastAPI backend, use this skill to keep models, validation, and errors aligned without manual duplication.

Quick Start

Use the ui-contract skill to generate TypeScript types from Python models and to validate that frontend contracts match backend schemas.

Frequently Asked Questions about ui-contract

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

FAQPage Schema
How do I generate TypeScript types from Pydantic models for a FastAPI backend?

Generating TypeScript types from Pydantic models involves mapping FastAPI backend schemas to frontend client interfaces. This ensures consistent data shapes and typed contracts without manual duplication across the stack.

What is the best way to align API contracts between a Python backend and a TypeScript frontend?

Aligning API contracts between Python and TypeScript requires standardized request and response schemas. This enforces consistent data shapes, typed mappings, and standardized error formats across the entire API surface.

How do I standardize error schemas and pagination contracts across my API?

Standardizing error schemas and pagination contracts requires defining reusable contract templates across your API. This enforces consistent data shapes and standardized error responses for frontend-backend integration.

Can I use this approach to validate that frontend contracts match backend schemas in React?

Yes, you can validate that frontend contracts match backend schemas in React. Building a React frontend against a FastAPI backend keeps models, validation, and errors aligned without manual duplication.

Do I need FastAPI and Pydantic to maintain consistent API data shapes?

Yes, FastAPI and Pydantic are required to maintain consistent API data shapes in this setup. The API contract definitions target Python FastAPI backends and TypeScript clients to enable Pydantic to TypeScript mappings.