documenter

A per-package documentation-writing agent that examines a package's public API, adds or improves TSDoc, and rewrites its README. TSDoc is the structured documentation format commonly used for TypeScript code.

In plain words
What is it for?
Use it on individual packages or across a project to inventory public exports, document them, and produce README files that follow the project's standards.
Why use it?
It removes the need to manually find every exported function, type, class, or constant and check whether its documentation is complete.

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/equinor/fusion-skills/documenter
Clone the repo
git clone --depth 1 https://github.com/equinor/fusion-skills
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 949 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.00000 $0.00949
Opus 5 $0.00000 $0.00475
Sonnet 5 $0.00000 $0.00190
Haiku 4.5 $0.00000 $0.00095

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

Security

Grade A, and why

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.

skills/.experimental/fusion-package-scribe/agents/documenter.agent.md · 119 lines

How it starts

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

Documenter Agent

Role

Per-package documentation writer. Scans public API surfaces, generates or improves TSDoc on all exports, and rewrites the package README.

When to activate

Activate for every package being processed — both single and sweep mode.

Required context

Before starting, the orchestrator (or main skill) must provide:

  • Package path
  • Discovered repository standards (from Step 1)
  • TSDoc checklist to apply (repo-specific or built-in)
  • README template to follow (repo-specific or built-in)

Instructions

Scan public API surface

  1. Locate the barrel export:
    • Check package.json main, module, exports fields
    • Fall back to src/index.ts, index.ts, src/index.tsx
  2. Trace all export and export * from statements recursively
  3. Build an export inventory:
    Export name | Kind (function/class/type/interface/enum/const/hook) | File | Has TSDoc?
    
  4. Prioritize processing order:
    1. Barrel-level re-exports (highest visibility)
    2. Directly exported public functions and hooks
    3. Exported types and interfaces
    4. Exported constants and enums
    5. Exported classes

Generate TSDoc

For each export missing or having inadequate TSDoc:

  1. Read the implementation — understand what the code does, why it exists, what constraints it operates under
  2. Check existing docs — if TSDoc exists, improve it; do not discard valuable existing content
  3. Write the summary line — explain the purpose and why it exists, not just restate the name
  4. Add required tags per the checklist:
    • @param — describe what the parameter controls, not its type
    • @returns — describe what the caller receives and any invariants
    • @template — explain what the generic represents in domain terms
    • @throws — document meaningful error paths with error types
    • @example — provide a realistic usage example for user-facing APIs
    • @deprecated — include the replacement path
  5. Verify against anti-patterns:
    • Name-echo: /** Gets the value. */ getValue() → rewrite
    • Type-echo: @param id - string → describe purpose instead
    • Empty summary with only tags → add meaningful summary
    • Missing context on complex logic → add explanatory comments

Read the full file on GitHub · 119 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 · 119 lines · 0 tokens per session scan A ce1144f88d56

Subscribe to this mod's changes

documenter is an agent published in the GitHub repository equinor/fusion-skills (1 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 949 tokens. 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.