docs-update

A documentation maintenance command that compares recently changed source code with related documentation and identifies outdated parts.

In plain words
What is it for?
Use it to update stale documentation or add JSDoc comments—structured explanations placed beside exported functions, classes, and interfaces.
Why use it?
It helps prevent documentation from describing removed features, old interfaces, or missing functionality.

Command

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/nxtg-ai/forge-plugin/docs-update
Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin
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 1,249 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.01249
Opus 5 $0.00000 $0.00624
Sonnet 5 $0.00000 $0.00250
Haiku 4.5 $0.00000 $0.00125

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

Security

Grade A, and why

docs-update 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 yesterday.

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.

docs/commands/docs-update.md · 133 lines

How it starts

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

/forge:docs-update

Identify stale documentation by comparing source and doc timestamps, then update docs to match current code or add missing JSDoc comments.

Level L1 Vibe Coder
Category Documentation
Syntax /forge:docs-update [--file <path>] [--dry-run] [--jsdoc] [--all]

What It Does

/forge:docs-update is the documentation fixer. It compares recently changed source files (from the last 20 commits or 7 days) against documentation files to find staleness, then reads both the outdated doc and the current source code to identify discrepancies -- new functions, changed interfaces, removed features. For each stale doc, it shows what will change, updates the content to match the current source, and preserves the existing doc structure and formatting.

The --jsdoc mode focuses on source code documentation. It finds exported functions, classes, and interfaces that are missing JSDoc comments, reads the implementation to understand what they do, and generates appropriate JSDoc annotations directly in the source files. This is the fastest way to boost your documentation coverage percentage.

Without this command, keeping docs current is a manual process: you notice something is wrong, find the doc, read the source, figure out what changed, and update. Most of the time, you do not notice until someone reads the wrong information. /forge:docs-update proactively finds staleness and fixes it.

Syntax & Options

/forge:docs-update [--file <path>] [--dry-run] [--jsdoc] [--all]
Option Description
--file <path> Update a specific documentation file instead of scanning all
--dry-run Show what would be updated without making any changes
--jsdoc Focus on adding and updating JSDoc comments in source files
--all Update all documentation files regardless of staleness

When to Use It

  • After a feature lands: Source code changed but docs did not. Run docs-update to sync them.
  • Before a release: Ensure all documentation reflects the current state of the code.
  • JSDoc blitz: Use --jsdoc to add documentation to all undocumented exports in one pass.

Read the full file on GitHub · 133 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. yesterday First seen · 133 lines · 0 tokens per session scan A 4efb6478de8e

Subscribe to this mod's changes

docs-update is a command published in the GitHub repository nxtg-ai/forge-plugin (5 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,249 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.