Communitygithub.com

YepAPI/skills

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

Qu'est-ce que 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.

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

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

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

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

YepAPI/skills

Tool-use patterns, multi-step reasoning, agent orchestration, and structured outputs.

YepAPI/skills

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

YepAPI/skills

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

YepAPI/skills

Web analytics integration — event tracking, custom dashboards, privacy-first.

YepAPI/skills

Framer Motion — transitions, scroll animations, layout animations.

YepAPI/skills

Authentication security — bcrypt/argon2 hashing, brute force protection, secure password resets.

YepAPI/skills

Session auth, social providers, CSRF protection, and secure cookie patterns.

YepAPI/skills

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

YepAPI/skills

Link building research and backlink audit using YepAPI.

YepAPI/skills

MDX blog setup, RSS feed generation, sitemap.xml, structured data/JSON-LD, and related posts.

YepAPI/skills

Redis caching, CDN cache headers, stale-while-revalidate, cache invalidation, React Query.

YepAPI/skills

Recharts/Chart.js data visualization — bar, line, area, pie charts.

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

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

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Blog engine setup, CMS integration, SEO-optimized content workflows, and editorial calendars.

YepAPI/skills

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

Skills associés