generate-docs

generate-docs is a skill for Claude Code, Codex from mfbari/claude-skill-generate-docs. It costs 169 tokens per session (1,428 once invoked), scanned A, original, MIT.

A documentation pipeline that scans a codebase, creates about 15 reference documents, checks them against the source, and updates AI-agent context files.

In plain words
What is it for?
Use it to create architecture, API, database-schema, service, glossary, error, and security documentation, with Mermaid diagrams, in a docs/ folder.
Why use it?
It removes the need to build and maintain a complete map of an unfamiliar codebase by hand. Verification helps catch documentation that does not match the code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Good fit Use it to create architecture, API, database-schema, service, glossary, error, and security documentation, with Mermaid diagrams, in a docs/ folder.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mfbari/claude-skill-generate-docs/generate-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.

Any agent
npx skills add mfbari/claude-skill-generate-docs --skill generate-docs
Clone the repo
git clone --depth 1 https://github.com/mfbari/claude-skill-generate-docs

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mfbari/claude-skill-generate-docs/generate-docs/github.svg)](https://agentmods.dev/skills/mfbari/claude-skill-generate-docs/generate-docs)
Your own site
<a href="https://agentmods.dev/skills/mfbari/claude-skill-generate-docs/generate-docs"><img src="https://agentmods.dev/badge/skills/mfbari/claude-skill-generate-docs/generate-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 generate-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/mfbari/claude-skill-generate-docs/generate-docs"><img src="https://agentmods.dev/badge/skills/mfbari/claude-skill-generate-docs/generate-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00169 $0.01428
Opus 5.5 $0.00068 $0.00571
Sonnet 5.5 $0.00034 $0.00286
Haiku 4.5 $0.00017 $0.00143

Measured 3mo ago against content hash 22bc959d76d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-docs 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 3mo 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.

generate-docs/SKILL.md · 134 lines

How it starts

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

generate-docs

You are the orchestrator for a documentation-generation pipeline. Coordinate five phases — Bootstrap → Explore → Generate → Verify → Context Update — in an iterative loop until every document meets grade A on every rubric dimension, or the retry budget is exhausted.

Detailed instructions for each phase live in references/. Read the relevant reference file when you reach that phase (progressive disclosure — don't load them all up front).

Phase What it does Read
0 — Bootstrap Detect/back-up/create CLAUDE.md; note AGENTS.md references/context-files.md
1 — Explore Scan the codebase across 8 domains → docs/_exploration_report.md references/exploration.md
2 — Generate Write ~15 docs in docs/ with Mermaid diagrams references/generation.md
3 — Verify Grade every doc A–F against the source → docs/_verification_report.md references/verification.md + references/grading-rubric.md
4 — Context Update Update CLAUDE.md + write AGENTS.md (progressive disclosure) references/context-files.md

Configuration

  • Max retries: the first argument, if given (e.g. generate-docs 5). If blank or non-numeric, default to 3.
  • Output directory: docs/ at the project root.
  • Passing grade: A on every document and every rubric dimension.
  • Completion: when ALL docs score A across ALL dimensions, or max retries is reached.

How to run the phases (any harness)

This skill is harness-agnostic. Each phase is a batch of independent work that parallelizes cleanly:

  • If your harness supports subagents / parallel tasks (e.g. a Task tool, an agent-spawn primitive, or a workflow engine): dispatch the phase's work as parallel subagents — 8 explorers in Phase 1, up to 15 writers in Phase 2, 1 verifier in Phase 3. Give each subagent the matching references/ file as its instructions, plus its specific brief/doc. Prefer read-only tools for explorers and verifiers.
  • If your harness has no subagents: perform each phase's work yourself, sequentially, following the same references/ files. The output is identical; only the wall-clock time differs.

Read the full file on GitHub · 134 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. 3mo ago First seen · 134 lines · 169 tokens per session scan A 22bc959d76d7

Subscribe to this mod's changes

generate-docs is a skill published in the GitHub repository mfbari/claude-skill-generate-docs (6 stars, last pushed 4mo ago), licensed MIT. It adds 169 tokens to every session and 1,428 once invoked, about $0.0007 per session on Opus 5.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.

Related

generate-docs compared with skills from other repositories

generate-docs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
generate-docsmfbari/claude-skill-generate-docsSkill64mo agoMITA169Claude Code, Codex
claude-md-improveranthropics/claude-plugins-officialSkill49ktodayApache-2.0A82Claude Code
agent-platform-model-registrygoogle/skillsSkill26kyesterdayApache-2.0A60Claude Code, Codex
gke-reliabilitygoogle/skillsSkill26kyesterdayApache-2.0A85Claude Code, Codex
gke-workload-securitygoogle/skillsSkill26kyesterdayApache-2.0A171Claude Code, Codex
google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skillsSkill26kyesterdayApache-2.0A132Claude Code, Codex
glance-canonical-layoutsandroid/skillsSkill11kyesterdayApache-2.0A56Claude Code