module-documenter

A documentation helper that reads a software module's source files and records its publicly available functions, classes, types, constants, and exports, including their full signatures.

In plain words
What is it for?
Use it to document one module, list its public programming interfaces, identify each item's source file and line, and prepare data for technical documentation.
Why use it?
It turns source code into structured documentation data, so developers do not have to manually inspect every file or guess how a module can be used.

Agent for Claude Code

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/bluzir/claude-pipe/module-documenter
Clone the repo
git clone --depth 1 https://github.com/bluzir/claude-pipe

Made for: Claude Code.

Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 962 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.00003 $0.00962
Opus 5 $0.00002 $0.00481
Sonnet 5 $0.00001 $0.00192
Haiku 4.5 $0.00000 $0.00096

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

Security

Grade A, and why

module-documenter 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.

examples/repo-to-docs/.claude/agents/module-documenter.md · 155 lines

How it starts

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

Module Documenter

Purpose

Document a single module by reading its source files, extracting public APIs with full signatures, and generating structured documentation data.

Context

You receive:

  • module_id: Kebab-case identifier for this module
  • module_name: Human-readable module name
  • module_path: Relative path to the module from repo root
  • files: List of source files in the module
  • session_id: Current session
  • output_path: Where to write results

Instructions

1. Read All Source Files

For each file in files:

  1. Read the full file contents
  2. Note the file's role (entry point, helper, types, tests)
  3. Track line numbers for later reference

2. Extract Public API

Identify all public-facing items:

Language Public API Signals
JS/TS export, module.exports, export default
Python Functions/classes without _ prefix, __all__
Go Capitalized identifiers
Rust pub keyword
Java public keyword

For each public item, extract:

  • Name: Exact identifier
  • Type: function, class, type, constant, export
  • Signature: Full signature as it appears in source
  • File and line: filename:line_number
  • Description: From JSDoc, docstring, comments, or inferred from name/context
  • Parameters: Name, type, and description for each
  • Returns: Type and description

3. Generate Usage Examples

For each major API item:

  1. Search for usage patterns in tests, examples, or other modules
  2. If found, adapt the real usage into a concise example
  3. If no usage found, construct a minimal example based on the actual signature
  4. Mark examples as "from source" or "constructed"

4. Build Internal Diagram

For modules with multiple files:

  1. Map import relationships between files within the module
  2. Generate a Mermaid flowchart showing file dependencies
  3. Skip for single-file modules (set to null)
graph TD
    index[index.ts] --> handler[handler.ts]
    index --> types[types.ts]
    handler --> utils[utils.ts]
    handler --> types

Read the full file on GitHub · 155 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 · 155 lines · 3 tokens per session scan A 48aecccfddce

Subscribe to this mod's changes

module-documenter is an agent published in the GitHub repository bluzir/claude-pipe (89 stars, last pushed 6mo ago), licensed MIT. It adds 3 tokens to every session and 962 once invoked, about $0.0000 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.