[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73NPJZVN7HFF22TPM5AF5HW":3,"skill-same:01M73NPJZVN7HFF22TPM5AF5HW":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M73NPJZVN7HFF22TPM5AF5HW","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.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fapi-contract-design\u002FSKILL.md",[],[],"2026-11-11 15:11:14",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":15,"metadata":24,"description":7,"allowed-tools":27},{"author":25,"version":26},"antigravity-team","1.0","Read, Glob, Grep, Edit, Write, Bash","master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fmarketplace\u002Fapi-contract-design",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill api-contract-design",{"tool":44,"command":45},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill api-contract-design",{"tool":47,"command":48},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill api-contract-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fapi-contract-design\u002FSKILL.md",true,[52,58],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"marketplace.json","REFERENCE","参考文档",8342,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fapi-contract-design\u002Fmarketplace.json",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"skill-report.json",56997,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fapi-contract-design\u002Fskill-report.json",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]