api-documentation

api-documentation is a skill for Claude Code, Codex from cosmicstack-labs/mercury-agent-skills. It costs 25 tokens per session (6,943 once invoked), scanned B, original, MIT.

A guide for documenting web APIs, which are interfaces that let software communicate with a service. It covers OpenAPI or Swagger specifications, Postman collections, reference pages, examples, errors, authentication, and versioning.

In plain words
What is it for?
Use it to plan or review API specifications, endpoint references, runnable examples, client documentation, and migration notes.
Why use it?
It helps keep API documentation accurate and useful when APIs change, so other developers can integrate them correctly.

Skill for Claude CodeCodex

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/cosmicstack-labs/mercury-agent-skills/api-documentation
Any agent
npx skills add cosmicstack-labs/mercury-agent-skills --skill api-documentation
Clone the repo
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills

Made for: Claude Code, Codex.

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/cosmicstack-labs/mercury-agent-skills/api-documentation.svg)](https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/api-documentation)
Your own site
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/api-documentation"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/api-documentation.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,943 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00025 $0.06943
Opus 5 $0.00013 $0.03472
Sonnet 5 $0.00005 $0.01389
Haiku 4.5 $0.00003 $0.00694

Measured 5d ago against content hash 5a9413c46e61, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

api-documentation scanned grade B with 2 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 5d 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

response = requests.post( "https://api.example.com/v2/charges",

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://api.example.com/v2/charges \
categories/development/api-documentation/SKILL.md · 1,039 lines

How it starts

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

API Documentation

Document APIs that developers love to integrate with — complete, accurate, and testable from the spec itself.

Core Principles

1. The Spec Is the Source of Truth

Your OpenAPI/Swagger specification should be the single source of truth for your API. Generate documentation, client libraries, and test suites from it. Never let docs drift from the spec.

2. Document the Experience, Not Just the Endpoints

Good API docs don't just list endpoints — they explain authentication, error handling, rate limits, pagination, and common workflows. Developer experience is documentation.

3. Every Endpoint Needs a Runnable Example

Every API endpoint should have at least one complete request/response example that a developer can copy, paste, and run. Show both success and error responses.

4. Version Everything, Deprecate Gracefully

APIs evolve. Documentation must clearly indicate which versions are active, deprecated, and sunset. Give consumers time to migrate with clear migration guides.


API Documentation Maturity Model

Level Completeness Accuracy Interactivity Versioning Client Generation
1: Minimal Endpoints listed only Often outdated None (static text) No versioning None
2: Basic Endpoints + parameters Occasionally accurate Static examples One active version Manual SDK examples
3: Structured Full OpenAPI spec Verified on each release Interactive docs (Swagger UI) Semantic versioning Generated SDKs
4: Comprehensive Spec + guides + tutorials Tested in CI Interactive console + code samples Multiple versions documented Multi-language SDK generation
5: Exemplary Spec + guides + tutorials + playground Contract-tested Live API playground Automated migration guides Published package managers

Target: Level 3 minimum for internal APIs. Level 4 for public APIs.

Read the full file on GitHub · 1,039 lines

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. 5d ago First seen · 1,039 lines · 25 tokens per session scan B 5a9413c46e61

Subscribe to this mod's changes

api-documentation is a skill published in the GitHub repository cosmicstack-labs/mercury-agent-skills (471 stars, last pushed 11d ago), licensed MIT. It adds 25 tokens to every session and 6,943 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

modern-saas-builder

Founder-minded senior product engineer and SaaS architect skill. Use when building, planning, architecting, validating, designing, testing, securing, deploying, or monetizing modern SaaS products, micro-SaaS, web apps, AI agents, Web3/Base applications, agent commerce, or Telegram bots/Mini Apps. Always active when…

lijnati/modern-saas-builder-skills · 98 tokens

claude-md-improver

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…

anthropics/claude-plugins-official · 82 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

atlas-obscura

Search Atlas Obscura for weird, wonderful, and hidden gem places near any destination. Find the interesting stuff, not boring plaques. Search by coordinates, get full details with descriptions and images.

borski/travel-hacking-toolkit · 44 tokens