api-documentation

api-documentation is a skill for Claude Code from camilooscargbaptista/cto-toolkit. It costs 114 tokens per session (946 once invoked), scanned A, original, MIT.

A guide for designing and documenting APIs, which are interfaces that let software systems exchange data. It covers OpenAPI and Swagger specifications, REST endpoints, and GraphQL schemas.

In plain words
What is it for?
Use it to write or review API documentation, design REST routes, create OpenAPI or Swagger specifications, and document GraphQL schemas.
Why use it?
It reduces uncertainty for developers building or integrating with an API by making endpoints, data formats, authentication, errors, and other rules explicit.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cto-toolkit plugin — 54 skills, 6 agents, 3 hooks shipped together

Good fit Use it to write or review API documentation, design REST routes, create OpenAPI or Swagger specifications, and document GraphQL schemas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/camilooscargbaptista/cto-toolkit/api-documentation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add camilooscargbaptista/cto-toolkit --skill api-documentation
Clone the repo
git clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkit

Made for: Claude Code.

Or install cto-toolkit, the plugin that ships this one along with the rest of its 54 skills, 6 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-documentation

README.md
[![agentmods](https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/api-documentation/github.svg)](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/api-documentation)
Your own site
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/api-documentation"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/api-documentation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-documentation

Your own site · 80×15
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/api-documentation"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/api-documentation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 946 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00114 $0.00946
Opus 5.5 $0.00046 $0.00378
Sonnet 5.5 $0.00023 $0.00189
Haiku 4.5 $0.00011 $0.00095

Measured 1mo ago against content hash aa9a4badd3f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-documentation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

api-documentation/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Documentation & Design

You are a senior API architect helping design, document, and review APIs. Good API documentation is the difference between an API developers love and one they dread. Write docs for the developer who's integrating at 11pm with a deadline tomorrow.

Quick Start: OpenAPI Spec Structure

See /references/openapi-spec-example.md for a complete OpenAPI 3.1.0 spec with info section (authentication, rate limiting, pagination, error format), servers, tags, and a fully documented endpoint example.

See /references/schema-definitions.md for reusable schema patterns and error response components (BadRequest, Unauthorized, RateLimited, etc.).

REST API Design Guidelines

URL Structure

# Resources are nouns, not verbs
GET    /payments          → List payments
POST   /payments          → Create payment
GET    /payments/{id}     → Get payment
PATCH  /payments/{id}     → Update payment
DELETE /payments/{id}     → Cancel/delete payment

# Sub-resources for relationships
GET    /payments/{id}/refunds     → List refunds for a payment
POST   /payments/{id}/refunds     → Create refund for a payment

# Actions (when CRUD doesn't fit)
POST   /payments/{id}/capture     → Capture authorized payment
POST   /payments/{id}/void        → Void authorized payment

# Filtering, sorting, pagination
GET    /payments?status=pending&sort=-created_at&limit=20&cursor=abc123

HTTP Methods and Status Codes

Method Success Meaning
GET 200 Return resource(s)
POST 201 Created (with Location header)
PATCH 200 Updated resource returned
DELETE 204 No content
Error When
400 Malformed request (invalid JSON, missing fields)
401 No authentication
403 Authenticated but not authorized
404 Resource not found
409 Conflict (duplicate, state conflict)
422 Valid request but business rule violation
429 Rate limited
500 Server error (never expose internals)

Read the full file on GitHub · 100 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 100 lines · 114 tokens per session scan A aa9a4badd3f1

Subscribe to this mod's changes

api-documentation is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 6mo ago), licensed MIT. It adds 114 tokens to every session and 946 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

openapi-expert

Expert-level OpenAPI/Swagger specification for API design, documentation, and code generation. Use when the user mentions swagger, API specs, REST, API design, or documentation, or when the task involves OpenAPI Specification, Webhooks, or Polymorphism.

personamanagmentlayer/pcl · 57 tokens

API Documentation Generator

Generates OpenAPI-compatible documentation for REST API endpoints from code or route definitions.

Notysoty/openagentskills · 20 tokens

api-documentation-generator

Generates OpenAPI 3.0/3.1 specs, TypeScript client types, and curl examples from existing route handler code. Supports Express, Next.js API routes, Fastify, and Hono. Produces complete documentation including auth requirements, rate limits, error codes, and request/response examples. Activate on: 'generate API docs'…

curiositech/windags-skills · 129 tokens

api-docs-generator

Generate API documentation from code - produce OpenAPI/Swagger specs, Markdown API references, request/response examples, and interactive documentation from source code analysis.

chainlesschain/chainlesschain · 34 tokens

nestjs-documentation

Automate Swagger/OpenAPI documentation and standardize API response schemas in NestJS. Use when generating OpenAPI specs, documenting paginated or generic responses, configuring the Nest CLI Swagger plugin, or publishing versioned API docs.

FilippoDeSilva/skills · 48 tokens

scalar-design-system

Scalar's design system — design tokens, theming (@scalar/themes), CSS variables, and the @scalar/components library. Use when designing or implementing Scalar UI, especially with Paper (code-to-design / design-to-code), so output matches real Scalar tokens, colors, typography, spacing, and components instead of…

scalar/scalar · 68 tokens