document

document is a command for Claude Code from nWave-ai/nWave. It costs 28 tokens per session (1,457 once invoked), scanned A, original, MIT.

Creates evidence-based documentation following DIVIO/Diataxis principles. Use when writing tutorials, how-to guides, reference docs, or explanations.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions subagents.

Part of the nw plugin — 12 commands shipped together

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 commands/nwave-ai/nwave/document
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave

Made for: Claude Code.

Or install nw, the plugin that ships this one along with the rest of its 12 commands.

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 document

README.md
[![agentmods](https://agentmods.dev/badge/commands/nwave-ai/nwave/document.svg)](https://agentmods.dev/commands/nwave-ai/nwave/document)
Your own site
<a href="https://agentmods.dev/commands/nwave-ai/nwave/document"><img src="https://agentmods.dev/badge/commands/nwave-ai/nwave/document.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00028 $0.01457
Opus 5 $0.00014 $0.00728
Sonnet 5 $0.00006 $0.00291
Haiku 4.5 $0.00003 $0.00146

Measured today against content hash 671bdbfdbb26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

document 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 today.

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.

plugins/nw/commands/document.md · 121 lines

How it starts

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

NW-DOCUMENT: DIVIO Documentation Creation

Wave: CROSS_WAVE | Agent: Orchestrator (self) Agents: Nova (nw-researcher)|Scholar (nw-researcher-reviewer)|Quill (nw-documentarist)|nw-documentarist-reviewer

Overview

Create evidence-based, DIVIO-compliant documentation by orchestrating research and writing phases with peer review at each gate. Cross-wave capability for any nWave phase.

Context Files Required

  • .nwave/trusted-source-domains.yaml — Embed inline in researcher prompt
  • ~/.claude/agents/nw/nw-researcher.md — Extract research methodology
  • ~/.claude/agents/nw/nw-documentarist.md — Extract DIVIO framework and templates

Command Syntax

/nw-document [topic] [--type=tutorial|howto|reference|explanation] [--research-depth=overview|detailed|comprehensive|deep-dive]

If --type omitted, ask user. If --research-depth omitted, auto-select: tutorial->overview|howto->detailed|reference->comprehensive|explanation->deep-dive.

Orchestration Phases

Sub-agents have no Skill tool access. Embed all domain knowledge inline in each Task prompt. Read from agent files and config at orchestration time.

Phase 1: Research           @nw-researcher
Phase 1.5: Research Review  @nw-researcher-reviewer
Phase 2: Documentation      @nw-documentarist
Phase 2.5: Doc Review       @nw-documentarist-reviewer
Phase 3: Handoff

Phase 0: Pre-Flight

  1. Validate topic non-empty, type/depth valid if provided
  2. If type not specified, present DIVIO selection: TUTORIAL ("Teach me")|HOW-TO ("Help me do X")|REFERENCE ("What is X?")|EXPLANATION ("Why is X?")
  3. Determine output: docs/{tutorials|howto|reference|explanation}/{topic-kebab-case}.md
  4. Read and cache: .nwave/trusted-source-domains.yaml|nw-researcher.md|nw-documentarist.md

Phase 1: Research (@nw-researcher)

Invoke via Task tool. Prompt includes: topic|doc type|research depth|complete .nwave/trusted-source-domains.yaml (inline)|type-specific research focus (from nw-researcher.md)|quality gates: trusted sources only, 3+ sources/claim, citation coverage >95%, source reputation >=0.80. Output: docs/research/{topic-kebab-case}-for-{type}-doc.md

Read the full file on GitHub · 121 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. today First seen · 121 lines · 28 tokens per session scan A 671bdbfdbb26

Subscribe to this mod's changes

document is a command published in the GitHub repository nWave-ai/nWave (605 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 1,457 once invoked, about $0.0001 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-09-06.