Agent skill · Backend & API

api-client-generator

สร้าง API client ที่ type-safe อัตโนมัติ จาก OpenAPI/Swagger specs หรือจาก API endpoints ที่มีอยู่

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/api/api-client-generator/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 🔌 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

What's inside
Steps it walks through
  1. 🎯 Purpose
  2. 📋 When to Use
  3. 🔧 Generation Methods
  4. 1. From OpenAPI/Swagger Spec
  5. 2. From Existing Endpoints
  6. 📝 Generated Client Template
  7. 🔧 With React Query
  8. 📊 OpenAPI to Types Mapping
  9. 🔄 Auto-Generation Workflow
  10. 📋 Generated Files Structure
  11. ✅ Generation Checklist
  12. 🔗 Related Skills
Ships with 1 file
  • metadata.json
Commands it runs
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
More from claude-skill-registry
All skills →
About this skill
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.

Keep going