api-documentation

Generate OpenAPI-based API documentation covering endpoints, schemas, authentication, and errors.

53|1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/cosmix/claude-code-setup --skill api-documentation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-documentation
Source: https://github.com/cosmix/claude-code-setup/tree/main/skills/api-documentation
Command: npx skills add https://github.com/cosmix/claude-code-setup --skill api-documentation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers API documentation generation, OpenAPI specs, endpoint documentation, and client SDK guidance.

Core Features & Use Cases

  • OpenAPI / Swagger: Document endpoints, schemas, and errors.
  • SDK Guides: Tutorials for client libraries and usage examples.
  • Error Handling: Standardized error schemas and codes.

Quick Start

Create a basic OpenAPI 3.1 spec for a user management API with paths for listing and creating users.

Frequently Asked Questions about api-documentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate OpenAPI documentation for my REST API?

OpenAPI documentation generation captures your REST endpoints, request/response schemas, authentication flows, and error handling in a machine-readable spec. Write or generate an OpenAPI 3.1 specification that defines all paths, parameters, security schemes, and response models, then use tools to produce interactive reference docs and developer portals from that spec.

What should I include in an OpenAPI spec for complete API documentation?

A complete OpenAPI spec includes base URLs, all endpoint paths with methods, request/response schemas using $ref for reusability, authentication details (API keys, OAuth), error mappings with status codes, rate limits, versioning strategy, and practical examples. This ensures developers have everything needed to integrate with your API.

Can I use OpenAPI to document error handling and authentication?

Yes. OpenAPI specs document security schemes (API keys, OAuth, JWT) in the components section and define error responses with standardized schemas and HTTP status codes for each endpoint. This standardizes how authentication and failures are communicated to API consumers.

How do I avoid duplicating schemas across API endpoints in OpenAPI?

Use the $ref keyword to reference reusable schemas defined once in the components section. Instead of copying schema definitions for each endpoint, reference them by path—this keeps your spec DRY, maintainable, and ensures consistent data models across all endpoints.

What's the best way to document client SDK usage alongside API endpoints?

Pair your OpenAPI endpoint documentation with SDK guides that show code examples, library installation, authentication setup, and common workflows. This guides developers from reference documentation to practical implementation in their chosen language.