Communitygithub.com

YepAPI/skills

OpenAPI 3.1 from Zod schemas, interactive docs with Swagger/Scalar, versioning, and example requests for every endpoint.

What is skills?

skills is a Claude Code agent skill that openAPI 3.1 from Zod schemas, interactive docs with Swagger/Scalar, versioning, and example requests for every endpoint.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/api-documentation

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

API Documentation

Rules

  • OpenAPI 3.1 spec as the single source of truth — generate from code, not manually written
  • Zod schemas to OpenAPI: use zod-openapi or @asteasolutions/zod-to-openapi — define once, validate and document
  • Interactive docs: Scalar (modern, fast) or Swagger UI — serve at /docs or /api-docs
  • Every endpoint must have: summary, description, request body schema, all response codes with examples
  • Example request/response for every endpoint — use realistic data, not "string" placeholders
  • Versioning strategy: URL path (/api/v1/, /api/v2/) for breaking changes — simpler than header versioning
  • Error responses: document all error shapes consistently — { error: string, code: string, details?: object }
  • Authentication: document auth scheme (Bearer token, API key) in security schemes section
  • Group endpoints by resource: /users, /products, /orders — use tags for grouping in docs UI

Patterns

// zod-to-openapi with Hono/Express
import { z } from "zod";
import { extendZodWithOpenApi } from "@asteasolutions/zod-to-openapi";
extendZodWithOpenApi(z);

const UserSchema = z.object({
  id: z.string().uuid().openapi({ example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }),
  name: z.string().openapi({ example: "Jane Smith" }),
  email: z.string().email().openapi({ example: "[email protected]" }),
}).openapi("User");

const CreateUserSchema = UserSchema.omit({ id: true }).openapi("CreateUser");

// Register endpoint
registry.registerPath({
  method: "post",
  path: "/api/v1/users",
  summary: "Create a user",
  request: { body: { content: { "application/json": { schema: CreateUserSchema } } } },
  responses: {
    201: { description: "User created", content: { "application/json": { schema: UserSchema } } },
    400: { description: "Validation error" },
  },
});

Avoid

  • Writing OpenAPI YAML by hand — generate from Zod schemas or route definitions
  • Missing error response documentation — document 400, 401, 403, 404, 500
  • Generic examples like "string" or 0 — use realistic values that show the shape of real data
  • Docs that drift from implementation — generate spec from the same schemas used for validation

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

Related Skills