[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JKYZWGDQ85KG2WJ1K61E6Z":3,"skill-same:01M6JKYZWGDQ85KG2WJ1K61E6Z":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":13,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6JKYZWGDQ85KG2WJ1K61E6Z","api-contract-design",null,"Design APIs using schema-first approach with OpenAPI\u002FSwagger. Use when creating new APIs, documenting existing ones, or when frontend\u002Fbackend teams need to work in parallel. Covers OpenAPI spec, validation, and code generation.","superhealth\u002Fskills-hub","superhealth","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6292112?v=4","01M6JA6E7F21BYK5W3E4P270TT","01M6JA6EC0W8MPHKDJVBZDSEZ0",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fdoyajin174\u002Fapi-contract-design\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"design","contract","api contract design","api","api contract","Existing","frontend","with","generation","schema","use","work","parallel","Bash","team","first","openapi","code","teams","antigravity","2026-11-10 10:12:30",false,"---\nname: api-contract-design\ndescription: Design APIs using schema-first approach with OpenAPI\u002FSwagger. Use when creating new APIs, documenting existing ones, or when frontend\u002Fbackend teams need to work in parallel. Covers OpenAPI spec, validation, and code generation.\nallowed-tools: Read, Glob, Grep, Edit, Write, Bash\nlicense: MIT\nmetadata:\n  author: antigravity-team\n  version: \"1.0\"\n---\n\n# API Contract Design\n\nOpenAPI(Swagger) 기반 스키마 우선 API 설계 스킬입니다.\n\n## Core Principle\n\n> **\"코드보다 계약(Contract)이 먼저다.\"**\n> **\"프론트엔드와 백엔드가 동시에 개발할 수 있게 API를 먼저 정의한다.\"**\n\n## Schema-First vs Code-First\n\n| 접근법 | 장점 | 단점 |\n|--------|------|------|\n| **Schema-First** (권장) | 병렬 개발 가능, 명확한 계약 | 초기 설계 시간 필요 |\n| Code-First | 빠른 시작 | 문서와 코드 불일치 위험 |\n\n## OpenAPI 기본 구조\n\n### `openapi.yaml`\n\n```yaml\nopenapi: 3.1.0\ninfo:\n  title: My API\n  version: 1.0.0\n  description: API for My Application\n\nservers:\n  - url: https:\u002F\u002Fapi.example.com\u002Fv1\n    description: Production\n  - url: http:\u002F\u002Flocalhost:3000\u002Fapi\n    description: Development\n\npaths:\n  \u002Fusers:\n    get:\n      summary: Get all users\n      operationId: getUsers\n      tags:\n        - Users\n      parameters:\n        - name: page\n          in: query\n          schema:\n            type: integer\n            default: 1\n        - name: limit\n          in: query\n          schema:\n            type: integer\n            default: 20\n            maximum: 100\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUserListResponse'\n        '401':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FUnauthorized'\n\n    post:\n      summary: Create a new user\n      operationId: createUser\n      tags:\n        - Users\n      requestBody:\n        required: true\n        content:\n          application\u002Fjson:\n            schema:\n              $ref: '#\u002Fcomponents\u002Fschemas\u002FCreateUserRequest'\n      responses:\n        '201':\n          description: User created\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\n        '400':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FBadRequest'\n        '409':\n          description: Email already exists\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n  \u002Fusers\u002F{userId}:\n    get:\n      summary: Get user by ID\n      operationId: getUserById\n      tags:\n        - Users\n      parameters:\n        - name: userId\n          in: path\n          required: true\n          schema:\n            type: string\n            format: uuid\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\n        '404':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FNotFound'\n\ncomponents:\n  schemas:\n    User:\n      type: object\n      required:\n        - id\n        - email\n        - name\n        - createdAt\n      properties:\n        id:\n          type: string\n          format: uuid\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n          minLength: 1\n          maxLength: 100\n        avatarUrl:\n          type: string\n          format: uri\n          nullable: true\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n\n    CreateUserRequest:\n      type: object\n      required:\n        - email\n        - name\n        - password\n      properties:\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n          minLength: 1\n          maxLength: 100\n        password:\n          type: string\n          minLength: 8\n\n    UserListResponse:\n      type: object\n      required:\n        - data\n        - pagination\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\n        pagination:\n          $ref: '#\u002Fcomponents\u002Fschemas\u002FPagination'\n\n    Pagination:\n      type: object\n      required:\n        - page\n        - limit\n        - total\n        - totalPages\n      properties:\n        page:\n          type: integer\n        limit:\n          type: integer\n        total:\n          type: integer\n        totalPages:\n          type: integer\n\n    Error:\n      type: object\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: string\n        message:\n          type: string\n        details:\n          type: object\n\n  responses:\n    BadRequest:\n      description: Bad request\n      content:\n        application\u002Fjson:\n          schema:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n    Unauthorized:\n      description: Unauthorized\n      content:\n        application\u002Fjson:\n          schema:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n    NotFound:\n      description: Resource not found\n      content:\n        application\u002Fjson:\n          schema:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n  securitySchemes:\n    BearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\n\nsecurity:\n  - BearerAuth: []\n```\n\n## 폴더 구조\n\n```\napi\u002F\n├── openapi.yaml          # 메인 스펙\n├── paths\u002F                # 엔드포인트별 분리\n│   ├── users.yaml\n│   ├── posts.yaml\n│   └── auth.yaml\n├── schemas\u002F              # 스키마 분리\n│   ├── user.yaml\n│   ├── post.yaml\n│   └── common.yaml\n└── generated\u002F            # 자동 생성 코드\n    ├── types.ts\n    └── client.ts\n```\n\n### 분리된 스펙 (paths\u002Fusers.yaml)\n\n```yaml\n# api\u002Fpaths\u002Fusers.yaml\n\u002Fusers:\n  get:\n    $ref: '..\u002Foperations\u002Fusers\u002FgetUsers.yaml'\n  post:\n    $ref: '..\u002Foperations\u002Fusers\u002FcreateUser.yaml'\n```\n\n### 메인 스펙에서 참조\n\n```yaml\n# api\u002Fopenapi.yaml\npaths:\n  \u002Fusers:\n    $ref: '.\u002Fpaths\u002Fusers.yaml#\u002F~1users'\n```\n\n## TypeScript 타입 생성\n\n### openapi-typescript\n\n```bash\nnpm install -D openapi-typescript\n```\n\n```bash\n# 타입 생성\nnpx openapi-typescript .\u002Fapi\u002Fopenapi.yaml -o .\u002Fsrc\u002Ftypes\u002Fapi.ts\n```\n\n### 생성된 타입 사용\n\n```typescript\nimport type { paths, components } from '.\u002Ftypes\u002Fapi';\n\ntype User = components['schemas']['User'];\ntype CreateUserRequest = components['schemas']['CreateUserRequest'];\n\n\u002F\u002F API 응답 타입\ntype GetUsersResponse = paths['\u002Fusers']['get']['responses']['200']['content']['application\u002Fjson'];\n```\n\n## API 클라이언트 생성\n\n### openapi-fetch (권장)\n\n```bash\nnpm install openapi-fetch\n```\n\n```typescript\n\u002F\u002F lib\u002Fapi-client.ts\nimport createClient from 'openapi-fetch';\nimport type { paths } from '.\u002Ftypes\u002Fapi';\n\nexport const api = createClient\u003Cpaths>({\n  baseUrl: process.env.NEXT_PUBLIC_API_URL,\n});\n\n\u002F\u002F 사용\nconst { data, error } = await api.GET('\u002Fusers', {\n  params: {\n    query: { page: 1, limit: 20 },\n  },\n});\n\nconst { data: user } = await api.POST('\u002Fusers', {\n  body: {\n    email: 'user@example.com',\n    name: 'John',\n    password: 'password123',\n  },\n});\n```\n\n### Orval (코드 생성)\n\n```bash\nnpm install -D orval\n```\n\n```typescript\n\u002F\u002F orval.config.ts\nexport default {\n  api: {\n    input: '.\u002Fapi\u002Fopenapi.yaml',\n    output: {\n      mode: 'tags-split',\n      target: '.\u002Fsrc\u002Fapi',\n      schemas: '.\u002Fsrc\u002Fapi\u002Fschemas',\n      client: 'react-query',\n    },\n  },\n};\n```\n\n## 요청 검증\n\n### Zod + OpenAPI\n\n```typescript\n\u002F\u002F 스키마에서 Zod 스키마 생성\nimport { z } from 'zod';\n\n\u002F\u002F OpenAPI 스펙 기반 Zod 스키마\nexport const CreateUserRequestSchema = z.object({\n  email: z.string().email(),\n  name: z.string().min(1).max(100),\n  password: z.string().min(8),\n});\n\n\u002F\u002F API 라우트에서 검증\nexport async function POST(request: Request) {\n  const body = await request.json();\n\n  const result = CreateUserRequestSchema.safeParse(body);\n  if (!result.success) {\n    return Response.json(\n      { code: 'VALIDATION_ERROR', message: result.error.message },\n      { status: 400 }\n    );\n  }\n\n  \u002F\u002F result.data는 타입 안전\n  const user = await createUser(result.data);\n  return Response.json(user, { status: 201 });\n}\n```\n\n## API 문서 UI\n\n### Swagger UI\n\n```bash\nnpm install swagger-ui-react\n```\n\n```tsx\n\u002F\u002F app\u002Fapi-docs\u002Fpage.tsx\n'use client';\n\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react\u002Fswagger-ui.css';\n\nexport default function ApiDocs() {\n  return \u003CSwaggerUI url=\"\u002Fapi\u002Fopenapi.yaml\" \u002F>;\n}\n```\n\n### Scalar (모던 대안)\n\n```bash\nnpm install @scalar\u002Fnextjs-api-reference\n```\n\n```tsx\n\u002F\u002F app\u002Fapi-docs\u002Fpage.tsx\nimport { ApiReference } from '@scalar\u002Fnextjs-api-reference';\n\nexport default function ApiDocs() {\n  return (\n    \u003CApiReference\n      configuration={{\n        spec: {\n          url: '\u002Fapi\u002Fopenapi.yaml',\n        },\n      }}\n    \u002F>\n  );\n}\n```\n\n## 버전 관리\n\n### URL 버전 관리\n\n```yaml\nservers:\n  - url: https:\u002F\u002Fapi.example.com\u002Fv1\n  - url: https:\u002F\u002Fapi.example.com\u002Fv2\n```\n\n### 헤더 버전 관리\n\n```yaml\nparameters:\n  - name: API-Version\n    in: header\n    schema:\n      type: string\n      enum: ['2024-01-01', '2024-06-01']\n```\n\n## Workflow\n\n### Schema-First 개발 흐름\n\n```\n1. API 스펙 작성 (openapi.yaml)\n   ↓\n2. 팀 리뷰 (PR)\n   ↓\n3. 타입 생성 (openapi-typescript)\n   ↓\n4. 병렬 개발\n   - Frontend: Mock 서버로 개발\n   - Backend: 스펙 기반 구현\n   ↓\n5. 통합 테스트\n```\n\n### Mock 서버\n\n```bash\n# Prism (Stoplight)\nnpm install -D @stoplight\u002Fprism-cli\n\n# Mock 서버 실행\nnpx prism mock .\u002Fapi\u002Fopenapi.yaml\n```\n\n## Checklist\n\n### 스펙 작성\n\n- [ ] 모든 엔드포인트 정의\n- [ ] Request\u002FResponse 스키마 정의\n- [ ] 에러 응답 정의\n- [ ] 인증 방식 정의\n- [ ] 예제 데이터 포함\n\n### 타입 안전성\n\n- [ ] TypeScript 타입 생성\n- [ ] 요청 검증 (Zod)\n- [ ] 응답 타입 체크\n\n### 문서화\n\n- [ ] API 문서 UI 제공\n- [ ] 변경 이력 관리\n- [ ] 버전 관리 전략\n\n## References\n\n- [OpenAPI Specification](https:\u002F\u002Fspec.openapis.org\u002Foas\u002Flatest.html)\n- [openapi-typescript](https:\u002F\u002Fgithub.com\u002Fdrwpow\u002Fopenapi-typescript)\n- [openapi-fetch](https:\u002F\u002Fgithub.com\u002Fdrwpow\u002Fopenapi-typescript\u002Ftree\u002Fmain\u002Fpackages\u002Fopenapi-fetch)\n- [Prism Mock Server](https:\u002F\u002Fstoplight.io\u002Fopen-source\u002Fprism)\n","# API Contract Design\n\nOpenAPI(Swagger) 기반 스키마 우선 API 설계 스킬입니다.\n\n## Core Principle\n\n> **\"코드보다 계약(Contract)이 먼저다.\"**\n> **\"프론트엔드와 백엔드가 동시에 개발할 수 있게 API를 먼저 정의한다.\"**\n\n## Schema-First vs Code-First\n\n| 접근법 | 장점 | 단점 |\n|--------|------|------|\n| **Schema-First** (권장) | 병렬 개발 가능, 명확한 계약 | 초기 설계 시간 필요 |\n| Code-First | 빠른 시작 | 문서와 코드 불일치 위험 |\n\n## OpenAPI 기본 구조\n\n### `openapi.yaml`\n\n```yaml\nopenapi: 3.1.0\ninfo:\n  title: My API\n  version: 1.0.0\n  description: API for My Application\n\nservers:\n  - url: https:\u002F\u002Fapi.example.com\u002Fv1\n    description: Production\n  - url: http:\u002F\u002Flocalhost:3000\u002Fapi\n    description: Development\n\npaths:\n  \u002Fusers:\n    get:\n      summary: Get all users\n      operationId: getUsers\n      tags:\n        - Users\n      parameters:\n        - name: page\n          in: query\n          schema:\n            type: integer\n            default: 1\n        - name: limit\n          in: query\n          schema:\n            type: integer\n            default: 20\n            maximum: 100\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUserListResponse'\n        '401':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FUnauthorized'\n\n    post:\n      summary: Create a new user\n      operationId: createUser\n      tags:\n        - Users\n      requestBody:\n        required: true\n        content:\n          application\u002Fjson:\n            schema:\n              $ref: '#\u002Fcomponents\u002Fschemas\u002FCreateUserRequest'\n      responses:\n        '201':\n          description: User created\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\n        '400':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FBadRequest'\n        '409':\n          description: Email already exists\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n  \u002Fusers\u002F{userId}:\n    get:\n      summary: Get user by ID\n      operationId: getUserById\n      tags:\n        - Users\n      parameters:\n        - name: userId\n          in: path\n          required: true\n          schema:\n            type: string\n            format: uuid\n      responses:\n        '200':\n          description: Successful response\n          content:\n            application\u002Fjson:\n              schema:\n                $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\n        '404':\n          $ref: '#\u002Fcomponents\u002Fresponses\u002FNotFound'\n\ncomponents:\n  schemas:\n    User:\n      type: object\n      required:\n        - id\n        - email\n        - name\n        - createdAt\n      properties:\n        id:\n          type: string\n          format: uuid\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n          minLength: 1\n          maxLength: 100\n        avatarUrl:\n          type: string\n          format: uri\n          nullable: true\n        createdAt:\n          type: string\n          format: date-time\n        updatedAt:\n          type: string\n          format: date-time\n\n    CreateUserRequest:\n      type: object\n      required:\n        - email\n        - name\n        - password\n      properties:\n        email:\n          type: string\n          format: email\n        name:\n          type: string\n          minLength: 1\n          maxLength: 100\n        password:\n          type: string\n          minLength: 8\n\n    UserListResponse:\n      type: object\n      required:\n        - data\n        - pagination\n      properties:\n        data:\n          type: array\n          items:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FUser'\n        pagination:\n          $ref: '#\u002Fcomponents\u002Fschemas\u002FPagination'\n\n    Pagination:\n      type: object\n      required:\n        - page\n        - limit\n        - total\n        - totalPages\n      properties:\n        page:\n          type: integer\n        limit:\n          type: integer\n        total:\n          type: integer\n        totalPages:\n          type: integer\n\n    Error:\n      type: object\n      required:\n        - code\n        - message\n      properties:\n        code:\n          type: string\n        message:\n          type: string\n        details:\n          type: object\n\n  responses:\n    BadRequest:\n      description: Bad request\n      content:\n        application\u002Fjson:\n          schema:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n    Unauthorized:\n      description: Unauthorized\n      content:\n        application\u002Fjson:\n          schema:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n    NotFound:\n      description: Resource not found\n      content:\n        application\u002Fjson:\n          schema:\n            $ref: '#\u002Fcomponents\u002Fschemas\u002FError'\n\n  securitySchemes:\n    BearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: JWT\n\nsecurity:\n  - BearerAuth: []\n```\n\n## 폴더 구조\n\n```\napi\u002F\n├── openapi.yaml          # 메인 스펙\n├── paths\u002F                # 엔드포인트별 분리\n│   ├── users.yaml\n│   ├── posts.yaml\n│   └── auth.yaml\n├── schemas\u002F              # 스키마 분리\n│   ├── user.yaml\n│   ├── post.yaml\n│   └── common.yaml\n└── generated\u002F            # 자동 생성 코드\n    ├── types.ts\n    └── client.ts\n```\n\n### 분리된 스펙 (paths\u002Fusers.yaml)\n\n```yaml\n# api\u002Fpaths\u002Fusers.yaml\n\u002Fusers:\n  get:\n    $ref: '..\u002Foperations\u002Fusers\u002FgetUsers.yaml'\n  post:\n    $ref: '..\u002Foperations\u002Fusers\u002FcreateUser.yaml'\n```\n\n### 메인 스펙에서 참조\n\n```yaml\n# api\u002Fopenapi.yaml\npaths:\n  \u002Fusers:\n    $ref: '.\u002Fpaths\u002Fusers.yaml#\u002F~1users'\n```\n\n## TypeScript 타입 생성\n\n### openapi-typescript\n\n```bash\nnpm install -D openapi-typescript\n```\n\n```bash\n# 타입 생성\nnpx openapi-typescript .\u002Fapi\u002Fopenapi.yaml -o .\u002Fsrc\u002Ftypes\u002Fapi.ts\n```\n\n### 생성된 타입 사용\n\n```typescript\nimport type { paths, components } from '.\u002Ftypes\u002Fapi';\n\ntype User = components['schemas']['User'];\ntype CreateUserRequest = components['schemas']['CreateUserRequest'];\n\n\u002F\u002F API 응답 타입\ntype GetUsersResponse = paths['\u002Fusers']['get']['responses']['200']['content']['application\u002Fjson'];\n```\n\n## API 클라이언트 생성\n\n### openapi-fetch (권장)\n\n```bash\nnpm install openapi-fetch\n```\n\n```typescript\n\u002F\u002F lib\u002Fapi-client.ts\nimport createClient from 'openapi-fetch';\nimport type { paths } from '.\u002Ftypes\u002Fapi';\n\nexport const api = createClient\u003Cpaths>({\n  baseUrl: process.env.NEXT_PUBLIC_API_URL,\n});\n\n\u002F\u002F 사용\nconst { data, error } = await api.GET('\u002Fusers', {\n  params: {\n    query: { page: 1, limit: 20 },\n  },\n});\n\nconst { data: user } = await api.POST('\u002Fusers', {\n  body: {\n    email: 'user@example.com',\n    name: 'John',\n    password: 'password123',\n  },\n});\n```\n\n### Orval (코드 생성)\n\n```bash\nnpm install -D orval\n```\n\n```typescript\n\u002F\u002F orval.config.ts\nexport default {\n  api: {\n    input: '.\u002Fapi\u002Fopenapi.yaml',\n    output: {\n      mode: 'tags-split',\n      target: '.\u002Fsrc\u002Fapi',\n      schemas: '.\u002Fsrc\u002Fapi\u002Fschemas',\n      client: 'react-query',\n    },\n  },\n};\n```\n\n## 요청 검증\n\n### Zod + OpenAPI\n\n```typescript\n\u002F\u002F 스키마에서 Zod 스키마 생성\nimport { z } from 'zod';\n\n\u002F\u002F OpenAPI 스펙 기반 Zod 스키마\nexport const CreateUserRequestSchema = z.object({\n  email: z.string().email(),\n  name: z.string().min(1).max(100),\n  password: z.string().min(8),\n});\n\n\u002F\u002F API 라우트에서 검증\nexport async function POST(request: Request) {\n  const body = await request.json();\n\n  const result = CreateUserRequestSchema.safeParse(body);\n  if (!result.success) {\n    return Response.json(\n      { code: 'VALIDATION_ERROR', message: result.error.message },\n      { status: 400 }\n    );\n  }\n\n  \u002F\u002F result.data는 타입 안전\n  const user = await createUser(result.data);\n  return Response.json(user, { status: 201 });\n}\n```\n\n## API 문서 UI\n\n### Swagger UI\n\n```bash\nnpm install swagger-ui-react\n```\n\n```tsx\n\u002F\u002F app\u002Fapi-docs\u002Fpage.tsx\n'use client';\n\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react\u002Fswagger-ui.css';\n\nexport default function ApiDocs() {\n  return \u003CSwaggerUI url=\"\u002Fapi\u002Fopenapi.yaml\" \u002F>;\n}\n```\n\n### Scalar (모던 대안)\n\n```bash\nnpm install @scalar\u002Fnextjs-api-reference\n```\n\n```tsx\n\u002F\u002F app\u002Fapi-docs\u002Fpage.tsx\nimport { ApiReference } from '@scalar\u002Fnextjs-api-reference';\n\nexport default function ApiDocs() {\n  return (\n    \u003CApiReference\n      configuration={{\n        spec: {\n          url: '\u002Fapi\u002Fopenapi.yaml',\n        },\n      }}\n    \u002F>\n  );\n}\n```\n\n## 버전 관리\n\n### URL 버전 관리\n\n```yaml\nservers:\n  - url: https:\u002F\u002Fapi.example.com\u002Fv1\n  - url: https:\u002F\u002Fapi.example.com\u002Fv2\n```\n\n### 헤더 버전 관리\n\n```yaml\nparameters:\n  - name: API-Version\n    in: header\n    schema:\n      type: string\n      enum: ['2024-01-01', '2024-06-01']\n```\n\n## Workflow\n\n### Schema-First 개발 흐름\n\n```\n1. API 스펙 작성 (openapi.yaml)\n   ↓\n2. 팀 리뷰 (PR)\n   ↓\n3. 타입 생성 (openapi-typescript)\n   ↓\n4. 병렬 개발\n   - Frontend: Mock 서버로 개발\n   - Backend: 스펙 기반 구현\n   ↓\n5. 통합 테스트\n```\n\n### Mock 서버\n\n```bash\n# Prism (Stoplight)\nnpm install -D @stoplight\u002Fprism-cli\n\n# Mock 서버 실행\nnpx prism mock .\u002Fapi\u002Fopenapi.yaml\n```\n\n## Checklist\n\n### 스펙 작성\n\n- [ ] 모든 엔드포인트 정의\n- [ ] Request\u002FResponse 스키마 정의\n- [ ] 에러 응답 정의\n- [ ] 인증 방식 정의\n- [ ] 예제 데이터 포함\n\n### 타입 안전성\n\n- [ ] TypeScript 타입 생성\n- [ ] 요청 검증 (Zod)\n- [ ] 응답 타입 체크\n\n### 문서화\n\n- [ ] API 문서 UI 제공\n- [ ] 변경 이력 관리\n- [ ] 버전 관리 전략\n\n## References\n\n- [OpenAPI Specification](https:\u002F\u002Fspec.openapis.org\u002Foas\u002Flatest.html)\n- [openapi-typescript](https:\u002F\u002Fgithub.com\u002Fdrwpow\u002Fopenapi-typescript)\n- [openapi-fetch](https:\u002F\u002Fgithub.com\u002Fdrwpow\u002Fopenapi-typescript\u002Ftree\u002Fmain\u002Fpackages\u002Fopenapi-fetch)\n- [Prism Mock Server](https:\u002F\u002Fstoplight.io\u002Fopen-source\u002Fprism)\n",{"name":5,"license":14,"metadata":43,"description":7,"allowed-tools":46},{"author":44,"version":45},"antigravity-team","1.0","Read, Glob, Grep, Edit, Write, Bash","master","08cc2532077058aa50e6e18f54695bc256c88152","skills\u002Fdoyajin174\u002Fapi-contract-design","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub","https:\u002F\u002Fgithub.com\u002Fsuperhealth","java engineer","2026-04-06 22:07:23",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add superhealth\u002Fskills-hub --skill api-contract-design",{"tool":60,"command":61},"bunx","bunx skills add superhealth\u002Fskills-hub --skill api-contract-design",{"tool":63,"command":64},"pnpm","pnpm dlx skills add superhealth\u002Fskills-hub --skill api-contract-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fdoyajin174\u002Fapi-contract-design\u002FSKILL.md",true,[68,74],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"marketplace.json","REFERENCE","参考文档",8342,"https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fdoyajin174\u002Fapi-contract-design\u002Fmarketplace.json",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"skill-report.json",16710,"https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fdoyajin174\u002Fapi-contract-design\u002Fskill-report.json",[79,105,128,140,154,168],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":38},"01M6MC9F3WHV8S8FZ2W4TRB0FE","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fzhanlincui\u002Fvercel-react-best-practices\u002FSKILL.md",[],[86,87,88,89,90,91,35,92,93,94,95,96,97,98,99,100,101,102,103,104],"react","vercel react best practices","best practices","vercel","react best practices","data fetching","triggers","pages","next","patterns","refactoring","data","Optimization","tasks","guidelines","react components","components","performance","writing",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":38},"01M6MB8KWE1Q5A5KERR7RFTQWP","vue-testing-best-practices","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-testing-best-practices\u002FSKILL.md",[],[112,113,114,88,115,116,117,118,119,28,120,95,121,122,123,124,125,126,127],"vue testing best practices","testing best practices","vue","testing","testing patterns","js","e2e","vitest","component","test","mocking","for","utils","e2e testing","github","playwright",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":38},"01M6MB8GK06M6GA4KVYNDV1BZP","vue-router-best-practices","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-router-best-practices\u002FSKILL.md",[],[88,114,135,136,137,95,138,139,120,126],"router","vue router best practices","route","navigation","lifecycle",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":38},"01M6MB8DQF21TZMQ9XC3745ERW","vue-pinia-best-practices","Pinia stores, state management patterns, store setup, and reactivity with stores.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-pinia-best-practices\u002FSKILL.md",[],[147,148,114,88,25,149,95,150,151,152,153,126],"vue pinia best practices","pinia","store","management","state","state management","setup",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":38},"01M6MB8A7MC08747J9TV4GWQ9A","vue-options-api-best-practices","Vue 3 Options API style (data(), methods, this context). Each reference shows Options API solution only.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-options-api-best-practices\u002FSKILL.md",[],[114,161,162,21,88,163,164,165,166,97,126,167],"options","vue options api best practices","methods","reference","only","context","style",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":38},"01M6MB85ZTQC24Q04X49MM4YXN","vue-development-guides","A collection of best practices and tips for developing applications using Vue.js. This skill MUST be apply when developing, refactoring or reviewing Vue.js or Nuxt projects.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-development-guides\u002FSKILL.md",[],[175,114,176,177,126,178,179,123,180,181,182,117,96,183,184,88],"development","guides","vue development guides","tips","apply","project","nuxt","projects","collection","applications"]