afd-contracts

Official

Sync schemas across codebases.

Authorlushly-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents inconsistencies and runtime errors caused by schema drift between different codebases (e.g., frontend, backend, database) by using a single source of truth for type definitions.

Core Features & Use Cases

  • Single Source of Truth: Define your data models once using TypeSpec.
  • Automated Code Generation: Automatically generate OpenAPI specs, TypeScript types, and Python Pydantic models from your TypeSpec definitions.
  • Cross-Layer Type Safety: Ensures that your API contracts remain consistent across all layers of your application, preventing "schema drift bugs."
  • Use Case: When your Python backend and TypeScript frontend start throwing errors because the loraId field is expected as a string in one place and can be null in another, this skill enforces a unified definition.

Quick Start

Run the command to generate all contract types from your TypeSpec files.

Dependency Matrix

Required Modules

@typespec/compiler@typespec/openapi3@typespec/http@typespec/restopenapi-typescriptdatamodel-code-generator

Components

scriptsreferences

💻 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: afd-contracts
Download link: https://github.com/lushly-dev/afd/archive/main.zip#afd-contracts

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

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.