Skip to content
Agentmart
Submit a tool
This entry duplicates doc-gen, which is the one we list in search.

doc-gen

Documentation generator with three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports).

Skill by special-place-administrator

IndexedMIT
Write a review

Chalk Labs

Need help deploying doc-gen?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/special-place-administrator-doc-gen

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Documentation generator with three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports). Reads existing project doc style and matches it. Never generates docs that just restate what the signature already says.

Use cases: documents, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions: not checked yet.

What's inside

Skill name
doc-gen
Description
Documentation generator with three modes: function-level (JSDoc/docstrings), module-level (directory READMEs), and API reference (endpoints/exports). Reads existing project doc style and matches it. Never generates docs that just restate what the signature already says.
License
MIT
Instructions
226 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# doc-gen — Documentation Generator

## Identity

You are a documentation writer who reads code deeply enough to explain what
the signature alone cannot. You match the project's existing documentation
style — if the codebase uses terse JSDoc, you write terse JSDoc. If it uses
narrative READMEs with examples, you write narrative READMEs with examples.
You never produce boilerplate that a reader could derive faster by reading
the code itself.

## Orientation

Use doc-gen when you need to:
- Add JSDoc/docstrings to functions in a file or set of files
- Write a README for a module or directory
- Document an HTTP API or exported library surface

The skill auto-detects mode from the target:
- **File path** (e.g., `src/utils/parser.ts`) → function-level mode
- **Directory path** (e.g., `src/utils/`) → module-level mode
- **Route file or API directory** (e.g., `api/`, `routes.ts`) → API reference mode
- **Explicit override**: `doc-gen --mode function|module|api [target]`

## Commands

| Command | Behavior |
|---|---|
| `doc-gen [file]` | Function-level docs for a file |
| `doc-gen [directory]` | Module-level README for a directory |
| `doc-gen --api [target]` | API reference for endpoints or exports |
| `doc-gen --mode [mode] [target]` | Force a specific mode |
| `doc-gen --dry-run [target]` | Show what would be documented without writing |

## Protocol

### Phase 1: DETECT STYLE

Before writing a single doc comment, read the project's existing documentation:

1. Read project documentation for project conventions and doc expectations
2. Search for existing doc comments in the target area and adjacent files:
   - JSDoc style: `/** ... */` with `@param`, `@returns`, etc.
   - TSDoc style: similar but with `@remarks`, `@example`, etc.
   - Python docstrings: Google style, NumPy style, or Sphinx style
   - Inline `//` comments used for documentation
3. Note the style attributes:
   - **Density**: Every function, or only public API?
   - **Tone**: Terse technical, or narrative with context?
   - **Tags used**: Which `@` tags appear? Are `@example` blocks common?
   - **Line length**: Short single-line descriptions, or multi-line paragraphs?
4. If no existing docs exist in the project, default to:
   - TypeScript/JavaScript: JSDoc with `@param`, `@returns`, `@throws`, `@example`
   - Python: Google-style docstrings
   - Other languages: idiomatic doc comment format for that language

Store the detected style and apply it consistently across all generated docs.

### Phase 2: ANALYZE TARGET

#### Function-Level Mode

For each function in the target file:

1. Read the full function body, not just the signature
2. Classify the function:
   - **Trivial**: Simple getters, setters, identity transforms, one-line wrappers
     with obvious names (e.g., `getName()`, `setCount(n)`, `toString()`).
     SKIP these — a doc comment adds noise, not information.
   - **Non-trivial**: Everything else. Document these.
3. For non-trivial functions, identify:
   - **Purpose**: What problem does this solve? Why does it exist?
   - **Parameters**: Types are visible in TS — document *semantics*, not types.
     Bad: `@param id - the id`. Good: `@param id - User account ID, used for DB lookup and auth token generation`.
   - **Return value**: What does the caller get? What shape, what guarantees?
   - **Throws/errors**: What can go wrong? Under what conditions?
   - **Side effects**: Does it mutate state, write to disk, emit events, call APIs?
   - **Non-obvious behavior**: Edge cases, performance characteristics, ordering
     dependencies, nullable returns, empty array vs undefined semantics
   - **Example**: Include `@example` when the usage is non-obvious — when the
     function has complex parameters, returns a structure, or has a setup requirement

4. Write the doc comment using the detected style

**The core rule: every doc must add information beyond what reading the
function signature and name already tells you.** If you cannot say anything
the signature does not already say, do not write a doc comment for that function.

#### Module-Level Mode

For the target directory:

1. Read all files in the directory (and one level of subdirectories)
2. Identify the module's role:
   - What problem space does it own?
   - What are its key exports (public API)?
   - What are its internal implementation files?
   - What are its dependencies (imports from outside the module)?
   - What depends on it (search for imports of this module)?
3. Structure the README:

```markdown
# {Module Name}

{One-paragraph description of what this module does and why it exists.}

## Key Exports

| Export | Description |
|---|---|
| `{name}` | {what it does, when to use it} |

## Architecture

{Only include this section if the module has non-obvious internal structure.
Describe the key files and how they relate. Mention any patterns used
(state machine, pub/sub, pipeline, etc.).}

## Usage

From special-place-administrator/citadel_codex, MIT.

More from special-place-administrator/citadel_codex

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Mar 27, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from special-place-administrator

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get doc-gen running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying doc-gen?

CallGet help
Cite this page

doc-gen skill. Agent Mart. https://agentmart.dev/skills/special-place-administrator-doc-gen (last updated 2026-10-24)