Przejdź do treści
Biblioteka skilli
Programowanie · Pisanie

api-docs

/api-docs

Tworzy dokładne specyfikacje OpenAPI 3.1 i dokumentację dla klientów API, czytając handlery, walidatory i modele z kodu.

Repozytorium
skillforge ↗
Licencja
MIT
Ostatnia zmiana repozytorium
09.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 09.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Tworzy dokładne specyfikacje OpenAPI 3.1 i dokumentację dla klientów API, czytając handlery, walidatory i modele z kodu.

Oryginalny opis (EN)

Produces accurate OpenAPI 3.1 specifications and developer-friendly API reference docs by reading the actual route handlers, validators and models, including examples, error formats, auth and pagination. Use when the user asks to document an API, generate or fix an OpenAPI or Swagger spec, write API reference docs, or describe endpoints for client developers.

Jak działa

  1. 1. Inventory the API from code
  2. 2. Write the spec (OpenAPI 3.1)
  3. 3. Validate
  4. 4. Human-readable reference
  5. 5. Report gaps
Sekcje z nagłówków SKILL.md, w oryginale · 76 linii, 427 słów
Podgląd SKILL.md
---
name: api-docs
description: Produces accurate OpenAPI 3.1 specifications and developer-friendly API reference docs by reading the actual route handlers, validators and models, including examples, error formats, auth and pagination. Use when the user asks to document an API, generate or fix an OpenAPI or Swagger spec, write API reference docs, or describe endpoints for client developers.
---

# API Documentation

Documentation that disagrees with the code is worse than none. Derive everything from the source.

## 1. Inventory the API from code
- Find the routing layer: Express/Fastify/Nest routers, FastAPI/Flask/Django URLconfs, Gin/Echo/chi, Spring `@RequestMapping`, Rails `routes.rb`, Laravel `routes/api.php`.
- If the framework already generates OpenAPI (FastAPI `/openapi.json`, NestJS `@nestjs/swagger`, springdoc, drf-spectacular), **improve the annotations** rather than hand-writing a parallel spec.
- For each endpoint, collect: method, path, path/query/header params, request body schema, validation rules, auth requirement, every status code the handler can return, and the response schema.
- Read the validators (zod, Joi, pydantic, class-validator, JSON Schema) for exact types, required fields, enums, formats, min/max.

## 2. Write the spec (OpenAPI 3.1)
```yaml
openapi: 3.1.0
info:
  title: Orders API
  version: 1.4.0
  description: Create and track customer orders.
servers:
  - url: https://api.example.com/v1
security:
  - bearerAuth: []
paths:
  /orders/{orderId}:
    get:
      operationId: getOrder
      summary: Get an order by ID
      tags: [Orders]
      parameters:
        - name: orderId
          in: path
          required: true
          schema: { type: string, format: uuid }
      responses:
        "200":
          description: The order.
          content:
            application/json:
              schema: { $ref: "#/components/schemas/Order" }
              example: { id: "6f1c...", status: "paid", totalCents: 4200, currency: "USD" }
        "404": { $ref: "#/components/responses/NotFound" }
components:
  securitySchemes:
    bearerAuth: { type: http, scheme: bearer, bearerFormat: JWT }
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/problem+json:
          schema: { $ref: "#/components/schemas/Problem" }
  schemas:
    Problem:   # RFC 9457 problem details
      type: object
      properties:
        type: { type: string, format: uri }
        title: { type: string }
        status: { type: integer }
        detail: { type: string }
```

Rules:
- Stable, unique `operationId`s in camelCase (SDK generators use them as method names).
- Reuse via `components` (`schemas`, `responses`, `parameters`); no copy-pasted schemas.
- Realistic `example`s for every request and success response; never real customer data or real keys.
- Document **all** error responses, including 401/403/422/429, with one consistent error shape.
- Document pagination (cursor vs. offset, limits), rate limits (headers), idempotency keys, and versioning policy.

## 3. Validate
Use what's available: `npx @redocly/cli lint openapi.yaml` or `npx @stoplight/spectral-cli lint openapi.yaml`. Fix every error. Spot-check by calling real endpoints locally where possible and comparing responses to the schema.

## 4. Human-readable reference
For each resource, a guide page with: overview, authentication, a copy-paste `curl` example, the same in one or two popular languages, the response, and common errors with their fixes. Render the spec with Redoc, Scalar or Swagger UI for browsing.

## 5. Report gaps
List mismatches found between code and existing docs, undocumented endpoints, and endpoints whose behavior looked inconsistent (e.g. some return 400 and others 422 for validation errors) as follow-up suggestions.

Wersje

RepozytoriumWynikLicencja
Ta strona · meyshad/skillforge100MIT
mono/SkiaSharp100MIT
Kuan-AI-com/agent-skills100MIT
omnigent-ai/omnigent100Apache-2.0
Sun-Lab-NBB/ataraxis100Apache-2.0
zjunlp/skills100MIT

Migawka bazy z 13.11.2026 · wersja paczki 0297d38600d8 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100api-generating
    Generuje kod i dokumentację endpointów API ze specyfikacji: nowe endpointy, handlery tras, szkielety REST API i specyfikacje OpenAPI lub Swagger z kodu.
  • 95api-documentation-generator
    Generuje specyfikacje OpenAPI i Swagger oraz dokumentację API z kodu albo projektu.
  • 100api-docs-writer
    Pisze precyzyjną dokumentację referencyjną API HTTP i specyfikacje OpenAPI 3.1: strony endpointów, schematy, parametry, uwierzytelnianie, paginacja, przykłady kodu i tabele błędów.
  • 100api-documentation-writer
    Generuje dokumentację API z opisami endpointów, przykładami żądań i odpowiedzi, przewodnikami uwierzytelniania, kodami błędów i SDK, w tym specyfikacje OpenAPI i Swagger.
  • 100api-documentation-writer
    Generuje dokumentację API z opisami endpointów, przykładami żądań i odpowiedzi, przewodnikami uwierzytelniania, kodami błędów i SDK, w tym specyfikacje OpenAPI i Swagger.
  • 100api-docs-generator
    Audytuje i uzupełnia dokumentację FastAPI i REST API: brakujące opisy, kody odpowiedzi, przykłady, docstringi, modele Pydantic i specyfikację OpenAPI.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.