Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

api-spec

БесплатноБез исполняемых скриптовНе проверен

API仕様書作成エージェント。OpenAPI/Swagger形式のAPI定義、リクエスト/レスポンス仕様、認証仕様を作成。キーワード: API仕様, api spec, OpenAPI, Swagger, REST API, エンドポイント.

diegosouzapwот diegosouzapw★ 68 звёзд на GitHub

Об этом скилле

API仕様書作成エージェント

役割

RESTful APIの仕様書をOpenAPI形式で作成します。

仕様書構成

docs/api/
├── openapi.yaml             # メインOpenAPI定義
├── schemas/                 # スキーマ定義
│   ├── user.yaml
│   ├── order.yaml
│   └── common.yaml
├── paths/                   # エンドポイント定義
│   ├── auth.yaml
│   ├── users.yaml
│   └── orders.yaml
└── examples/                # リクエスト/レスポンス例
    ├── user-examples.yaml
    └── order-examples.yaml

OpenAPI テンプレート

メイン定義 (openapi.yaml)

openapi: 3.0.3
info:
  title: [プロジェクト名] API
  description: |
    [プロジェクトの説明]

    ## 認証
    Bearer Tokenによる認証を使用します。
    `Authorization: Bearer <token>` ヘッダーを付与してください。

  version: 1.0.0
  contact:
    name: API Support
    email: [email protected]

servers:
  - url: https://api.example.com/v1
    description: Production
  - url: https://api.staging.example.com/v1
    description: Staging
  - url: http://localhost:8000/v1
    description: Development

tags:
  - name: auth
    description: 認証関連
  - name: users
    description: ユーザー管理
  - name: orders
    description: 注文管理

security:
  - bearerAuth: []

paths:
  $ref: './paths/_index.yaml'

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

  schemas:
    $ref: './schemas/_index.yaml'

  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

エンドポイント定義 (paths/users.yaml)

/users:
  get:
    tags:
      - users
    summary: ユーザー一覧取得
    description: 登録されているユーザーの一覧を取得します
    operationId: getUsers
    parameters:
      - name: page
        in: query
        description: ページ番号
        schema:
          type: integer
          default: 1
          minimum: 1
      - name: limit
        in: query
        description: 1ページあたりの件数
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
      - name: status
        in: query
        description: ステータスでフィルタ
        schema:
          type: string
          enum: [active, inactive, suspended]
    responses:
      '200':
        description: 成功
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '../schemas/user.yaml#/User'
                pagination:
                  $ref: '../schemas/common.yaml#/Pagination'
      '401':
        $ref: '../openapi.yaml#/components/responses/Unauthorized'

  post:
    tags:
      - users
    summary: ユーザー作成
    description: 新規ユーザーを作成します
    operationId: createUser
    security: []  # 認証不要
    requestBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '../schemas/user.yaml#/CreateUserRequest'
          example:
            email: [email protected]
            password: SecurePass123!
            name: 山田太郎
    responses:
      '201':
        description: 作成成功
        content:
          application/json:
            schema:
              $ref: '../schemas/user.yaml#/User'
      '400':
        $ref: '../openapi.yaml#/components/responses/BadRequest'
      '409':
        description: メールアドレス重複
        content:
          application/json:
            schema:
              $ref: '../schemas/common.yaml#/Error'

/users/{userId}:
  get:
    tags:
      - users
    summary: ユーザー詳細取得
    operationId: getUser
    parameters:
      - name: userId
        in: path
        required: true
        description: ユーザーID
        schema:
          type: string
          format: uuid
    responses:
      '200':
        description: 成功
        content:
          application/json:
            schema:
              $ref: '../schemas/user.yaml#/User'
      '404':
        $ref: '../openapi.yaml#/components/responses/NotFound'

  put:
    tags:
      - users
    summary: ユーザー更新
    operationId: updateUser
    parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
    requestBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '../schemas/user.yaml#/UpdateUserRequest'
    responses:
      '200':
        description: 更新成功
        content:
          application/json:
            schema:
              $ref: '../schemas/user.yaml#/User'

  delete:
    tags:
      - users
    summary: ユーザー削除
    operationId: deleteUser
    parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
    responses:
      '204'
Полный SKILL.md на GitHub

Установить api-spec в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл api-spec?

API仕様書作成エージェント。OpenAPI/Swagger形式のAPI定義、リクエスト/レスポンス仕様、認証仕様を作成。キーワード: API仕様, api spec, OpenAPI, Swagger, REST API, エンドポイント.

Как установить скилл api-spec?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл api-spec запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить api-spec с