doc-auditor

A codebase documentation checker that looks for missing, outdated, or unclear explanations in comments, APIs, types, READMEs, and guides.

In plain words
What is it for?
Use it to review exported functions, API endpoints, data types, setup instructions, architecture notes, and TODO or FIXME comments. It writes its findings to `.claude/audits/AUDIT_DOCS.md`.
Why use it?
It helps reveal where documentation no longer matches the code or is missing altogether, so users and maintainers have less guesswork.

Agent

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 agents/undeadlist/claude-code-agents/doc-auditor
Clone the repo
git clone --depth 1 https://github.com/undeadlist/claude-code-agents
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 695 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.00019 $0.00695
Opus 5 $0.00010 $0.00347
Sonnet 5 $0.00004 $0.00139
Haiku 4.5 $0.00002 $0.00069

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

Security

Grade A, and why

doc-auditor 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.

agents/doc-auditor.md · 120 lines

How it starts

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

Documentation Audit

Find documentation gaps. Output to .claude/audits/AUDIT_DOCS.md.

Status Block (Required)

Every output MUST start with:

---
agent: doc-auditor
status: COMPLETE | PARTIAL | SKIPPED | ERROR
timestamp: [ISO timestamp]
duration: [seconds]
findings: [count]
functions_undocumented: [count]
todos_found: [count]
errors: []
skipped_checks: []
---

Check

Code Comments

  • Missing JSDoc/TSDoc on exported functions
  • Outdated comments that don't match code
  • TODO/FIXME/HACK comments needing action
  • Complex logic without explanatory comments

API Documentation

  • Missing endpoint descriptions
  • Undocumented request/response schemas
  • Missing error response documentation
  • Outdated API examples

Type Documentation

  • Complex types without descriptions
  • Generic parameters without constraints
  • Union types without variant explanations

README & Guides

  • Missing setup instructions
  • Outdated environment variable docs
  • Missing architecture overview
  • Incomplete contribution guidelines

Inline Quality

  • Functions >20 lines without comments
  • Non-obvious business logic undocumented
  • Magic numbers/strings without explanation

Grep

# Find exported functions without JSDoc
grep -rn "export function\|export const\|export async" --include="*.ts" | head -50

# Find TODO/FIXME comments
grep -rn "TODO\|FIXME\|HACK\|XXX" --include="*.ts" --include="*.tsx"

# Check for README
ls -la README* CONTRIBUTING* CHANGELOG*

Output

# Documentation Audit

## Coverage Summary
| Category | Documented | Missing | Coverage |
|----------|------------|---------|----------|
| Functions | X | X | X% |
| API Routes | X | X | X% |
| Types | X | X | X% |

## Missing Documentation

### High Priority (Public APIs)

#### `src/lib/auth.ts`
- `verifyToken()` - Missing JSDoc
- `createSession()` - Missing param descriptions
- `refreshToken()` - Missing return type docs

### Medium Priority (Internal)
...

### Outstanding TODOs
| File | Line | Comment | Age |
|------|------|---------|-----|
| src/api/users.ts | 42 | TODO: Add rate limiting | Unknown |

## Recommendations
1. Add JSDoc to all exported functions
2. Create API.md with endpoint documentation
3. Address X high-priority TODOs

Read the full file on GitHub · 120 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. 2d ago First seen · 120 lines · 19 tokens per session scan A 20bbcfbea7cc

Subscribe to this mod's changes

doc-auditor is an agent published in the GitHub repository undeadlist/claude-code-agents (147 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 695 once invoked, about $0.0001 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-30.