Langsung ke konten
Skillpedia
API & server (backend)12k Β· #11405

api-designer

Fungsinya

Skill ini memandu agent AI untuk merencanakan sumber daya, endpoint, dan kontrak API sebelum membangunnya. Skill ini ditujukan untuk pengembang dan arsitek yang menginginkan desain API yang jelas.

Kapan dipakai

  • βœ“Saat Anda merancang API REST atau GraphQL baru.
  • βœ“Saat Anda membutuhkan spesifikasi OpenAPI yang ditulis dan diperiksa.
  • βœ“Saat Anda membutuhkan aturan untuk paginasi, penanganan error, atau versi yang ditetapkan.

Link skill

https://github.com/Jeffallan/claude-skills/blob/main/skills/api-designer/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/Jeffallan/claude-skills/blob/main/skills/api-designer/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œRancang API REST untuk aplikasi pemesanan saya dan tulis spesifikasi OpenAPI-nya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memodelkan sumber daya beserta hubungannya, mendefinisikan endpoint dan skema, lalu menulis file OpenAPI 3.1. Setelah itu agent memeriksa file dengan linter dan mengujinya pada server tiruan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

API Designer

Senior API architect specializing in REST and GraphQL APIs with comprehensive OpenAPI 3.1 specifications.

Core Workflow

  1. Analyze domain β€” Understand business requirements, data models, and client needs
  2. Model resources β€” Identify resources, relationships, and operations; sketch entity diagram before writing any spec
  3. Design endpoints β€” Define URI patterns, HTTP methods, request/response schemas
  4. Specify contract β€” Create OpenAPI 3.1 spec; validate before proceeding: npx @redocly/cli lint openapi.yaml
  5. Mock and verify β€” Spin up a mock server to test contracts: npx @stoplight/prism-cli mock openapi.yaml
  6. Plan evolution β€” Design versioning, deprecation, and backward-compatibility strategy

Reference Guide

Load detailed guidance based on context:

Topic Reference Load When
REST Patterns references/rest-patterns.md Resource design, HTTP methods, HATEOAS
Versioning references/versioning.md API versions, deprecation, breaking changes
Pagination references/pagination.md Cursor, offset, keyset pagination
Error Handling references/error-handling.md Error responses, RFC 7807, status codes
OpenAPI references/openapi.md OpenAPI 3.1, documentation, code generation

Constraints

MUST DO

  • Follow REST principles (resource-oriented, proper HTTP methods)
  • Use consistent naming conventions (snake_case or camelCase β€” pick one, apply everywhere)
  • Include comprehensive OpenAPI 3.1 specification
  • Design proper error responses with actionable messages (RFC 7807)
  • Implement pagination for all collection endpoints
  • Version APIs with clear deprecation policies
  • Document authentication and authorization
  • Provide request/response examples

MUST NOT DO

  • Use verbs in resource URIs (use /users/{id}, not /getUser/{id})
  • Return inconsistent response structures
  • Skip error code documentation
  • Ignore HTTP status code semantics
  • Design APIs without a versioning strategy
  • Expose implementation details in the API surface
  • Create breaking changes without a migration path
  • Omit rate limiting considerations

Templates

OpenAPI 3.1 Resource Endpoint (copy-paste starter)

openapi: "3.1.0"
info:
  title: Example API
  version: "1.1.0"
paths:
  /users:
    get:
      summary: List users
      operationId: listUsers
      tags: [Users]
      parameters:
        - name: cursor
          in: query
          schema: { type: string }
          description: Opaque cursor for pagination
        - name: limit
          in: query
          schema: { type: integer, default: 20, maximum: 100 }
      responses:
        "200":
          description: Paginated list of users
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items: { $ref: "#/components/schemas/User" }
                  pagination:
                    $ref: "#/components/schemas/CursorPage"
        "400": { $ref: "#/components/responses/BadRequest" }
        "401": { $ref: "#/components/responses/Unauthorized" }
        "429": { $ref: "#/components/responses/TooManyRequests" }
  /users/{id}:
    get:
      summary: Get a user
      operationId: getUser
      tags: [Users]
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string, format: uuid }
      responses:
        "200":
          description: User found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/User" }
        "404": { $ref: "#/components/responses/NotFound" }

components:
  schemas:
    User:
      type: object
      required: [id, email, created_at]
      properties:
        id:    { type: string, format: uuid, readOnly: true }
        email: { type: string, format: email }
        name:  { type: string }
        created_at: { type: string, format: date-time, readOnly: true }

    CursorPage:
      type: object
      required: [next_cursor, has_more]
      properties:
        next_cursor: { type: string, nullable: true }
        has_more:    { type: boolean }

    Problem:                       # RFC 7807 Problem Details
      type: object
      required: [type, title, status]
      properties:
        type:     { type: string, format: uri, exampl
Pertanyaan umum

Alat apa yang memeriksa spesifikasi?

Skill ini memakai linter untuk memvalidasi file OpenAPI dan server tiruan untuk menguji kontraknya.

Apakah ia mencakup versi API?

Ya. Skill ini merencanakan versi, penghentian bertahap, dan perubahan yang kompatibel mundur.

Apakah ia mencakup paginasi?

Ya. Skill ini mencakup pola paginasi cursor, offset, dan keyset.

Detail

Deskripsi asli dari pembuat

Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture. Invoke for resource modeling, versioning strategies, pagination patterns, error handling standards.

repo: Jeffallan/claude-skills

Popularitas

Bintang GitHub
12k
Peringkat
#11405
Lisensi
MIT
Diperbarui
30/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa