api-client-generator
สร้าง API client ที่ type-safe อัตโนมัติ จาก OpenAPI/Swagger specs หรือจาก API endpoints ที่มีอยู่
npx skills add majiayu000/claude-skill-registry --skill api-client-generator --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 🔌 API Client Generator Skill --- name: api-client-generator description: Generate type-safe API clients from OpenAPI/Swagger specs or existing API endpoints --- ## 🎯 Purpose สร้าง API client ที่ type-safe อัตโนมัติ จาก OpenAPI/Swagger specs หรือจาก API endpoints ที่มีอยู่ ## 📋 When to Use - เชื่อมต่อกับ API ใหม่ - อัพเดท API client หลัง spec เปลี่ยน - สร้าง SDK จาก OpenAPI - Generate types จาก API response ## 🔧 Generation Methods ### 1. From OpenAPI/Swagger Spec ```bash # Using openapi-typescript npx openapi-typescript ./api-spec.yaml -o ./types/api.ts # Using swagger-typescript-api npx swagger-typescript-api -p ./swagger.json -o ./api -n api.ts ``` ### 2. From Existing Endpoints ```typescript // Analyze endpoint and generate types // GET /api/users → interface User { id: number; name: string; email: string; } // Generate client async function getUsers(): Promise<User[]> { const response = await fetch('/api/users'); return response.json(); } ``` ## 📝 Generated Client Template ```typescript // api/client.ts const BASE_URL = process.env.API_URL || 'http://localhost:3000'; interface RequestConfig { headers?: Record<string, string>; params?: Record<string, string>; } class ApiCl
- 🎯 Purpose
- 📋 When to Use
- 🔧 Generation Methods
- 1. From OpenAPI/Swagger Spec
- 2. From Existing Endpoints
- 📝 Generated Client Template
- 🔧 With React Query
- 📊 OpenAPI to Types Mapping
- 🔄 Auto-Generation Workflow
- 📋 Generated Files Structure
- ✅ Generation Checklist
- 🔗 Related Skills
Using openapi-typescript npx openapi-typescript ./api-spec.yaml -o ./types/api.ts Using swagger-typescript-api npx swagger-typescript-api -p ./swagger.json -o ./api -n api.ts
What does the api-client-generator skill do?
สร้าง API client ที่ type-safe อัตโนมัติ จาก OpenAPI/Swagger specs หรือจาก API endpoints ที่มีอยู่
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-client-generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
