update-docs

A command that updates existing text files in a project's docs/ folder after code changes. It examines uncommitted changes or recent commits to identify documentation that may be out of date.

In plain words
What is it for?
Use it to inspect recent code changes and incrementally update Markdown, reStructuredText, or text documentation in docs/.
Why use it?
It helps keep documentation aligned with the code without requiring a full manual review. You can focus the update on a selected area or change history.

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/aojdevstudio/dev-utils-marketplace/update-docs
Clone the repo
git clone --depth 1 https://github.com/AojdevStudio/dev-utils-marketplace
Per session 16 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,167 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.00016 $0.01167
Opus 5 $0.00008 $0.00583
Sonnet 5 $0.00003 $0.00233
Haiku 4.5 $0.00002 $0.00117

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

Security

Grade A, and why

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

documentation/commands/update-docs.md · 153 lines

How it starts

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

Update Docs

Use the doc-curator subagent to surgically update existing documentation in the docs/ directory based on recent code changes. This command focuses on intelligent, incremental updates to keep documentation synchronized with code changes.

Variables

DOCS_DIR: docs COMMIT_DEPTH: {{if flags.depth}}{{flags.depth}}{{else}}10{{endif}} FOCUS_AREA: {{if flags.focus}}{{flags.focus}}{{else}}all{{endif}} ANALYZE_MODE: {{if flags.uncommitted}}uncommitted{{else}}all{{endif}}

Workflow

1. Quick Documentation Inventory

  • Check docs directory exists: !ls docs/ 2>/dev/null | head -5
  • List existing documentation files: !find docs/ -type f -name "*.md" -o -name "*.rst" -o -name "*.txt" | sort

2. Identify What Changed

Check for uncommitted changes first:
  • Working directory changes: !git status --short | head -20
  • Unstaged modifications: !git diff --stat | head -15
  • Staged changes: !git diff --cached --stat | head -15
  • Show uncommitted function changes: !git diff --function-context | grep -E "^@@|^\+\+\+|function|class|def|interface" | head -30
If no uncommitted changes, analyze recent commits:
  • Get recent commits: !git log --oneline -COMMIT_DEPTH --name-status | grep -E "^[AM]" | head -20
  • Show committed changes: !git diff HEAD~COMMIT_DEPTH --stat | head -15
  • Identify committed function changes: !git diff HEAD~COMMIT_DEPTH --function-context | grep -E "^@@|^\+\+\+|function|class|def|interface" | head -30

3. Launch Doc-Curator for Surgical Updates

Use the doc-curator subagent with specific instructions based on FOCUS_AREA:

Analyze these code changes (both uncommitted and recent commits) and update ONLY the affected sections in existing documentation:

Uncommitted changes:
- [Output from git diff for working directory]
- [Output from git diff --cached for staged changes]

Recent committed changes (if analyzing history):
- [Output from git diff HEAD~COMMIT_DEPTH]
- [Specific functions/APIs that changed]

Documentation focus: FOCUS_AREA
Target directory: docs/

Instructions:
1. Read existing documentation files in docs/
2. Identify which docs reference the changed code
3. Make surgical updates ONLY where needed:
   - Update function signatures if they changed
   - Update configuration options if modified
   - Update API endpoints if altered
   - Update example code if it's now incorrect
   - Add brief notes for new features
   - Mark deprecated features
4. Preserve all other content exactly as is
5. Do NOT rewrite entire sections unless absolutely necessary
6. Focus on accuracy over comprehensive rewrites

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

Subscribe to this mod's changes

update-docs is a command published in the GitHub repository AojdevStudio/dev-utils-marketplace (2 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 1,167 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-08-31.