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.
npx agentmods add commands/fatihkan/badi/api-docgit clone --depth 1 https://github.com/fatihkan/badiWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00884 |
| Opus 5 | $0.00000 | $0.00442 |
| Sonnet 5 | $0.00000 | $0.00177 |
| Haiku 4.5 | $0.00000 | $0.00088 |
Grade A, and why
api-doc 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API documentation generation. Scans route definitions and produces structured API docs.
Required Tools
- Bash (filesystem) -- Read (source code) -- Grep (routes/endpoints) -- Glob (file detection) -- Write (doc file) -- Agent (api-designer: detailed API analysis)
Agent Delegation
The main work is delegated to the api-designer agent. If the agent is unavailable, apply the steps below directly.
1. Framework Detection
1a — Project structure: package.json framework dependency -- supported: Express (express, app.get/post/put/delete), Fastify (fastify, fastify.route), NestJS (@nestjs/core, @Controller, @Get/@Post), Koa (koa-router, router.get/post), Next.js API (pages/api/ or app/api/), Django/Flask/FastAPI
1b — Route files: typical locations per framework -- routes/, controllers/, api/, endpoints/ -- middleware files
2. Endpoint Extraction
2a — Route scan (grep):
- Express:
router\.(get|post|put|patch|delete)\( - NestJS:
@(Get|Post|Put|Patch|Delete)\( - Next.js:
export (async )?function (GET|POST|PUT|DELETE) - Per match: file path + line number + the full route expression
2b — Endpoint info: HTTP method (GET/POST/PUT/PATCH/DELETE) -- URL path (including path params) -- middleware chain (auth, validation, rate-limit) -- controller function name
2c — Parameters: URL (:id, [slug]) -- query (extract from code) -- body (TS types, Zod, Joi) -- headers (Authorization, Content-Type, etc.)
3. Response Shapes
3a — Type detection: TS interfaces/types -- DTO classes -- sample response objects -- error response format
3b — Status codes: the HTTP codes each endpoint returns -- success (200, 201, 204) -- errors (400, 401, 403, 404, 500) -- custom error responses
4. OpenAPI/Swagger Skeleton
4a — OpenAPI 3.0:
openapi: "3.0.0"
info:
title: "[Project Name] API"
version: "[version]"
description: "[description]"
paths:
/api/[resource]:
get:
summary: "[description]"
parameters: [...]
responses:
"200":
description: "[description]"
content:
application/json:
schema: [...]
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.
- 2d ago First seen · 98 lines · 0 tokens per session scan A 50b75cb848f7
api-doc is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 884 tokens. 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.
Other commands, from other repositories
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
sonarqube
Analyze SonarCloud quality issues for a specific PR.
land-and-deploy
Merge PR, wait for CI, verify deploy, run canary — the complete landing pipeline.
methodology-advisor
Analyzes your codebase and asks 3 targeted questions to recommend the right AI-assisted development methodology stack.
scaffold
Interactive coach that asks 4-5 questions to determine whether you need an agent, command, skill, hook, or rule — then generates a ready-to-use template. Usage: /scaffold (no arguments — starts the coaching session).
investigate
Systematic root-cause debugging — find the cause before writing any fix.