api-documentation

api-documentation is a skill for Claude Code, Codex 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/camilooscargbaptista/cto-toolkit/api-documentation
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00114 $0.00946
Opus 5 $0.00057 $0.00473
Sonnet 5 $0.00023 $0.00189
Haiku 4.5 $0.00011 $0.00095

Measured 4d ago against content hash aa9a4badd3f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 5mo ago), licensed MIT. It adds 114 tokens to every session and 946 once invoked, about $0.0006 per session on Opus 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.