typespec-patterns
CommunityDesign APIs first, generate everything else.
Authoraitchwhy
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill establishes an API-first development workflow using TypeSpec, ensuring that API contracts are the single source of truth. It automates the generation of OpenAPI specifications, TypeScript types, and client SDKs, reducing integration errors and accelerating development.
Core Features & Use Cases
- API-First Design: Defines API models, routes, and error types in TypeSpec, then compiles them to a standardized OpenAPI specification.
- Codegen Pipeline: Generates type-safe TypeScript types and client SDKs from the OpenAPI specification, ensuring consistency across frontend and backend.
- CI Validation: Integrates TypeSpec compilation and OpenAPI validation into CI/CD pipelines to catch contract discrepancies early, preventing breaking changes.
- Use Case: A team is starting a new microservice. They can use this skill to define their API in TypeSpec, generate OpenAPI documentation, and then automatically generate type-safe TypeScript client and server stubs, accelerating development and reducing integration errors.
Quick Start
Define a new 'Product' model in 'api/models/product.tsp' with fields for 'id', 'name', and 'price', including validation decorators for length and range.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: typespec-patterns Download link: https://github.com/aitchwhy/dotfiles/archive/main.zip#typespec-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.