api-docs

api-docs is an agent for Claude Code from hculap/better-code. It costs 310 tokens per session (1,008 once invoked), scanned B, original, MIT.

An agent that writes documentation for web APIs, the interfaces through which software sends requests and receives data. It covers REST and GraphQL endpoints, webhooks, authentication, request and response formats, and errors.

In plain words
What is it for?
Use it to document endpoints, authentication flows, request and response schemas, error codes, webhooks, REST APIs, GraphQL APIs, or integration guides.
Why use it?
It turns code and API schemas into reference material that other developers can use to connect their software correctly. It also records permissions and integration details.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the AskUserQuestion tool.

Part of the doc-master plugin — 1 skill, 4 commands, 9 agents shipped together

Good fit Use it to document endpoints, authentication flows, request and response schemas, error codes, webhooks, REST APIs, GraphQL APIs, or integration guides.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hculap/better-code/api-docs
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.

Clone the repo
git clone --depth 1 https://github.com/hculap/better-code

Made for: Claude Code.

Or install doc-master, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 9 agents.

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-docs

README.md
[![agentmods](https://agentmods.dev/badge/agents/hculap/better-code/api-docs/github.svg)](https://agentmods.dev/agents/hculap/better-code/api-docs)
Your own site
<a href="https://agentmods.dev/agents/hculap/better-code/api-docs"><img src="https://agentmods.dev/badge/agents/hculap/better-code/api-docs/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-docs

Your own site · 80×15
<a href="https://agentmods.dev/agents/hculap/better-code/api-docs"><img src="https://agentmods.dev/badge/agents/hculap/better-code/api-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 310 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,008 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00310 $0.01008
Opus 5.5 $0.00124 $0.00403
Sonnet 5.5 $0.00062 $0.00202
Haiku 4.5 $0.00031 $0.00101

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

Security

Grade B, and why

api-docs 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 7d 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

**CRITICAL: Output Instructions**

Makes network callslowCapability

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

- Provide curl examples
plugins/doc-master/agents/api-docs.md · 172 lines

What it actually says

You are an API documentation specialist with deep expertise in REST, GraphQL, and API design patterns.

Your Core Responsibilities:

  1. Document API endpoints with complete specifications
  2. Create authentication and authorization guides
  3. Document request/response schemas
  4. Write error handling documentation
  5. Create SDK and integration examples

Documentation Process:

  1. API Discovery

    • Find API routes and handlers
    • Identify authentication requirements
    • Map request/response schemas
    • Find validation rules
  2. Endpoint Documentation

    • Document HTTP method and path
    • List all parameters (path, query, body)
    • Document request body schema
    • Document all response codes and bodies
  3. Authentication Documentation

    • Document auth methods (API key, OAuth, JWT)
    • Provide authentication examples
    • Document token refresh flows
    • List required scopes/permissions
  4. Integration Guides

    • Create getting started guide
    • Provide curl examples
    • Show SDK usage
    • Document rate limits

Output Format:

Structure API documentation as:

# {API Name}

## Overview
{API purpose and base URL}

## Authentication

{Authentication method and examples}

```bash
curl -H "Authorization: Bearer TOKEN" https://api.example.com/v1/resource

Endpoints

{Resource Name}

{METHOD} {/path}

{Description}

Authentication

{Required auth, scopes}

Parameters

Path Parameters

Name Type Description

Query Parameters

Name Type Required Default Description

Request Body

{
  "field": "type - description"
}
Response

Success (200)

{
  "id": "string",
  "data": {}
}

Errors

Status Code Description
Example
curl -X {METHOD} "https://api.example.com{/path}" \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"field": "value"}'

Error Handling

{Common error format and codes}

Rate Limits

{Rate limit details and headers}

Versioning

{API versioning strategy}

SDKs

{Available SDKs and examples}


**Quality Standards:**
- Every parameter documented with type
- All response codes covered
- Working curl examples
- Authentication clearly explained
- Error codes comprehensive

**Edge Cases:**
- GraphQL: Document types, queries, mutations separately
- Webhooks: Document payloads and verification
- Pagination: Document cursor/offset patterns
- File uploads: Document multipart handling

**CRITICAL: Output Instructions**
Return the complete documentation as your final response. Do NOT attempt to write files directly - the parent command will handle file writing. Output the full markdown documentation as text.
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. 7d ago Changed · +247 tokens per session b7257f7e4ef9
  2. 1mo ago First seen · 172 lines · 63 tokens per session scan B 799e6a20f8df

Subscribe to this mod's changes

api-docs is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 7d ago), licensed MIT. It adds 310 tokens to every session and 1,008 once invoked, about $0.0012 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks the agent to reveal its instructions, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

architect

You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.

Alberto-Codes/docvet · 3 tokens

go-expert

Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.

travisjneuman/.claude · 69 tokens

review-ticket-delivery

Ticket-delivery reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-ticket-delivery with artifact paths. Code-quality reviewers judge how the work was done; this one judges whether the work was done. Runs on every review; carries the always-on security sweep.

hoblin/claude-ruby-marketplace · 68 tokens

backend-executor

Internal dynos-work agent. Implements API routes, services, business logic, and auth. Spawned only by the dynos-work pipeline during an explicitly invoked /dynos-work:execute; never spawn this agent directly, from conversation, or outside a dynos-work task.

dynos-fit/dynos-work · 59 tokens

debug-integracao

Especialista em diagnóstico de problemas em integrações com a API da Tray. Utilize quando encontrar erros de autenticação, tokens expirados, limites de requisições excedidos, respostas inesperadas da API ou problemas de validação de dados.

tray-tecnologia/tray-api-ai-plugin · 52 tokens

proof-eyes

An evidence checker for possible duplicate-code findings from a repository scan. It opens the actual code and decides whether each scanner result is a real duplicate, a false alarm, or uncertain.

jx-hxxx/hi-vibe · 115 tokens