writing-api-docs

Document REST endpoints with request/response schemas and error codes.

205|26|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/LerianStudio/ring --skill writing-api-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-api-docs
Source: https://github.com/LerianStudio/ring/tree/main/tw-team/skills/writing-api-docs
Command: npx skills add https://github.com/LerianStudio/ring --skill writing-api-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns and structure for writing API reference documentation including endpoint descriptions, request/response schemas, and error documentation.

Core Features & Use Cases

  • Endpoint documentation structure and examples
  • Field descriptions and data types reference
  • Error documentation and standard formats

Quick Start

Write API docs for a new endpoint: /writing-api-docs write-endpoint.

Frequently Asked Questions about writing-api-docs

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

FAQPage Schema
How do I structure API endpoint documentation for REST services?

API endpoint documentation should include the HTTP method, resource path, description of what the endpoint does, request parameters with types, response schema with field definitions, and standard error codes. This structure ensures consistent, reusable patterns across all endpoints in your REST API.

What should I include in request and response schemas for API docs?

Request and response schemas must specify field names, data types, required vs. optional fields, and field descriptions. For responses, include the HTTP status code and example JSON. This ensures developers understand exactly what data to send and expect back.

How do I document API errors in a standardized way?

API error documentation should define error codes, HTTP status codes, error messages, and when each error occurs. Use a consistent JSON error schema across all endpoints so developers can handle failures predictably.

Can I use API documentation patterns for updating existing docs?

Yes. These documentation patterns and structures apply to both new API references and updating existing documentation. They ensure consistency when adding endpoints or revising schemas in live APIs.

What's the best way to version APIs in documentation?

API documentation should include explicit versioning—either in the URL path (/v1/, /v2/) or header—and document how versions differ. This clarifies which endpoints and schemas apply to each version for your users.