doc-generator

doc-generator is a skill for Claude Code, Codex from chandrudp29/skillhub. It costs 44 tokens per session (1,060 once invoked), scanned A, original, MIT.

A tool for writing documentation for software, including README files, API references, code comments, and release notes. It focuses on explaining what code does and how developers can use it.

In plain words
What is it for?
Use it to document a project, add function or class docstrings, describe an API, write installation and usage examples, or prepare changelog entries.
Why use it?
It helps turn undocumented code into practical instructions and reference material that users and contributors can follow.

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/chandrudp29/skillhub/doc-generator
Any agent
npx skills add chandrudp29/skillhub --skill doc-generator
Clone the repo
git clone --depth 1 https://github.com/chandrudp29/skillhub

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 doc-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/chandrudp29/skillhub/doc-generator.svg)](https://agentmods.dev/skills/chandrudp29/skillhub/doc-generator)
Your own site
<a href="https://agentmods.dev/skills/chandrudp29/skillhub/doc-generator"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/doc-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,060 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.00044 $0.01060
Opus 5 $0.00022 $0.00530
Sonnet 5 $0.00009 $0.00212
Haiku 4.5 $0.00004 $0.00106

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

Security

Grade A, and why

doc-generator 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 4d 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.

skills/doc-generator/SKILL.md · 161 lines

How it starts

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

Doc Generator

Generates documentation that developers actually read and use — not boilerplate that everyone ignores.

When to Use

  • "Write a README for this project"
  • "Add docstrings to these functions"
  • "Generate API documentation"
  • "Write a changelog entry for this release"
  • Before open-sourcing or sharing any code

README Generation

A README answers these questions in this order:

1. What is this? (one sentence) Not "a powerful, flexible, enterprise-grade solution" — what does it actually do?

2. Why would I use this? (one paragraph) What problem does it solve? What's the alternative? When should I NOT use it?

3. How do I install it? (one command)

pip install yourpackage

4. How do I use it? (minimal working example) The simplest thing that works, copy-pasteable, tested:

from yourpackage import Thing
result = Thing().do_something("input")
print(result)  # "expected output"

5. Full API / configuration reference Only after the quick example. Developers who need it will scroll; those who don't won't be overwhelmed.

6. Contributing / Development setup How to run tests, how to open a PR.

README Template

# project-name

One sentence: what it does.

## Install

\`\`\`bash
pip install project-name
\`\`\`

## Quick Start

\`\`\`python
[minimal working example]
\`\`\`

## Why project-name?

[problem it solves, who it's for, what makes it different]

## Usage

[fuller examples and configuration]

## API Reference

[function signatures and descriptions]

## Contributing

[how to set up dev environment, run tests, open PRs]

## License

MIT

Docstring Generation

Write docstrings that explain WHY and WHAT, not HOW (the code shows how):

Good:

def chunk_text(text: str, max_tokens: int = 512, overlap: int = 50) -> list[str]:
    """
    Split text into overlapping chunks for RAG ingestion.

    Overlap prevents context loss at chunk boundaries — a sentence split
    across two chunks is still fully recoverable during retrieval.

    Args:
        text: The document text to split. Handles Unicode correctly.
        max_tokens: Target chunk size. Actual chunks may be slightly larger
                    to avoid splitting mid-sentence.
        overlap: Tokens of overlap between consecutive chunks.

    Returns:
        List of text chunks, ordered by position in the original text.

    Raises:
        ValueError: If max_tokens < overlap.
    """

Read the full file on GitHub · 161 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 161 lines · 44 tokens per session scan A e2cba61494d8

Subscribe to this mod's changes

doc-generator is a skill published in the GitHub repository chandrudp29/skillhub (13 stars, last pushed 2mo ago), licensed MIT. It adds 44 tokens to every session and 1,060 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

documentation-writer

Write clear technical documentation including READMEs, API docs, architecture guides, and inline documentation. Use when creating or improving project documentation.

asgarovf/locusai · 31 tokens

scribe

Tactical documentation specialist ensuring all intelligence is properly logged and accessible. README, API docs, ADRs, changelogs, and runbooks.

Rikinshah787/clawarmy · 31 tokens

documentation-patterns

Technical documentation patterns for READMEs, ADRs, API docs (OpenAPI 3.1), changelogs, and writing style guides. Use when creating project documentation, writing architecture decisions, documenting APIs, or maintaining changelogs.

yonatangross/orchestkit · 53 tokens

document-writer

Write or update technical documentation grounded in the real codebase. Use when the user asks for README, API docs, architecture guides, user guides, CONTRIBUTING docs, migration notes, or JSDoc/code comments, or wants technical docs rewritten into natural Chinese with correct terminology. Not for general prose…

bahayonghang/my-ai-cli-toolkit · 75 tokens

pitchdocs

Generate marketing-quality repository documentation from codebase analysis. Scans 10 signal categories, extracts features with file-level evidence, and produces README, CHANGELOG, ROADMAP, and 15+ more docs. Zero runtime dependencies. For AI context file management, see ContextDocs.

littlebearapps/pitchdocs · 58 tokens

documentation

Technical writing, API docs, and documentation best practices.

miles990/claude-software-skills · 12 tokens