์Šคํ‚ฌ api-contract-design
๐Ÿ“‹

api-contract-design

์•ˆ์ „ โš™๏ธ ์™ธ๋ถ€ ๋ช…๋ น์–ด๐ŸŒ ๋„คํŠธ์›Œํฌ ์ ‘๊ทผ๐Ÿ“ ํŒŒ์ผ ์‹œ์Šคํ…œ ์•ก์„ธ์Šค๐Ÿ”‘ ํ™˜๊ฒฝ ๋ณ€์ˆ˜

Design Type-Safe APIs with OpenAPI Schema-First Approach

Frontend and backend teams often face integration issues when APIs are poorly defined or change frequently. This skill enables collaborative API design using OpenAPI specifications, generating TypeScript types and clients automatically for type-safe development across your entire stack.

์ง€์›: Claude Codex Code(CC)
๐Ÿ“Š 69 ์ ์ ˆํ•จ
1

์Šคํ‚ฌ ZIP ๋‹ค์šด๋กœ๋“œ

2

Claude์—์„œ ์—…๋กœ๋“œ

์„ค์ • โ†’ ๊ธฐ๋Šฅ โ†’ ์Šคํ‚ฌ โ†’ ์Šคํ‚ฌ ์—…๋กœ๋“œ๋กœ ์ด๋™

3

ํ† ๊ธ€์„ ์ผœ๊ณ  ์‚ฌ์šฉ ์‹œ์ž‘

ํ…Œ์ŠคํŠธํ•ด ๋ณด๊ธฐ

"api-contract-design" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. Create an OpenAPI specification for user authentication with JWT tokens

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

  • OpenAPI 3.1 specification with /auth/login, /auth/register, /auth/refresh, and /auth/logout endpoints
  • TypeScript types for LoginRequest, LoginResponse, UserProfile, and JWTPayload
  • Type-safe API client code with proper error handling and token management
  • Zod validation schemas for request body validation

"api-contract-design" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. Design an OpenAPI spec for a blog API with posts, comments, and tags

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

  • Complete paths definition for CRUD operations on posts, comments, and tags
  • Schema definitions with relationships between posts, authors, comments, and tags
  • Pagination and filtering parameters for list endpoints
  • Error response schemas for 400, 401, 403, and 404 scenarios

๋ณด์•ˆ ๊ฐ์‚ฌ

์•ˆ์ „
v5 โ€ข 1/17/2026

This is a documentation-only skill containing educational content about API contract design. All static findings are false positives triggered by code examples in documentation. No executable code, network calls, file access, or external commands exist in this skill.

3
์Šค์บ”๋œ ํŒŒ์ผ
799
๋ถ„์„๋œ ์ค„ ์ˆ˜
4
๋ฐœ๊ฒฌ ์‚ฌํ•ญ
5
์ด ๊ฐ์‚ฌ ์ˆ˜

ํ’ˆ์งˆ ์ ์ˆ˜

38
์•„ํ‚คํ…์ฒ˜
90
์œ ์ง€๋ณด์ˆ˜์„ฑ
87
์ฝ˜ํ…์ธ 
22
์ปค๋ฎค๋‹ˆํ‹ฐ
100
๋ณด์•ˆ
96
์‚ฌ์–‘ ์ค€์ˆ˜

๋งŒ๋“ค ์ˆ˜ ์žˆ๋Š” ๊ฒƒ

Build APIs with Parallel Development

Design API contracts first to enable frontend and backend teams to work in parallel with type safety.

Document Legacy REST APIs

Create OpenAPI specifications for existing APIs to add documentation and generate type-safe clients.

Establish Organization-Wide API Standards

Define consistent patterns, versioning strategies, and documentation standards across all services.

์ด ํ”„๋กฌํ”„ํŠธ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”

Basic Todo API
Create an OpenAPI 3.1 specification for a todo API with CRUD operations. Include endpoints for creating todos with title and description, listing todos with pagination, updating todo status, and deleting todos. Define proper 400 and 404 error responses.
E-commerce Product API
Design an OpenAPI specification for an e-commerce product API with filtering by category and price range, cursor-based pagination, search with fuzzy matching, image upload endpoints, and bulk operations. Include OAuth2 security and rate limiting headers.
Real-time Chat API
Create an OpenAPI 3.1 spec for a chat API with REST endpoints for user and room management, message threading, file attachments, read receipts, and typing indicators. Include WebSocket event documentation and HMAC webhook verification.
Multi-tenant SaaS Platform
Design a comprehensive multi-tenant SaaS API with tenant isolation via headers, 50+ RBAC permissions, webhook subscriptions with HMAC verification, GraphQL gateway integration, content negotiation versioning, request transformation middleware, and polymorphic response patterns using discriminator.

๋ชจ๋ฒ” ์‚ฌ๋ก€

  • Use descriptive operationId values that clearly indicate the action such as createUser or getUserById
  • Organize large specifications by splitting paths and schemas into separate files with clear naming conventions
  • Include comprehensive examples in your schemas to help consumers understand expected data formats and improve documentation

ํ”ผํ•˜๊ธฐ

  • Avoid mixing schema-first and code-first approaches within the same project as it leads to inconsistencies
  • Do not skip the team review process since API contracts should be agreed upon before implementation begins
  • Never expose sensitive data like passwords or API keys in your OpenAPI examples or documentation

์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ

Which OpenAPI version should I use?
Use OpenAPI 3.1.0 for new projects. It supports the latest JSON Schema features and is backwards compatible with most tools.
How do I handle API versioning?
Use URL versioning with paths like /v1 and /v2 or header-based versioning. Document deprecation policies clearly.
Can I integrate this with React Query?
Yes, use Orval to generate React Query hooks directly from your OpenAPI spec while maintaining full type safety.
Is my API specification data safe?
The skill only helps you write specifications locally. No API data or specifications are sent to external services.
What if generated types do not match my backend?
The schema-first approach ensures your backend implements the spec. Use generated types as the source of truth.
How does this compare to GraphQL?
OpenAPI excels at public APIs with standard REST patterns. GraphQL offers more flexibility for complex queries but requires more setup.

๊ฐœ๋ฐœ์ž ์„ธ๋ถ€ ์ •๋ณด

์ž‘์„ฑ์ž

Doyajin174

๋ผ์ด์„ ์Šค

MIT

์ฐธ์กฐ

main

ํŒŒ์ผ ๊ตฌ์กฐ

๐Ÿ“„ marketplace.json

๐Ÿ“„ SKILL.md