update-docs

update-docs is a command for Claude Code from nmime/motiv-buy. It costs 0 tokens per session (3,146 once invoked), scanned A, original, MIT.

A command that examines recent project changes and updates the relevant documentation to describe the system as it currently works.

In plain words
What is it for?
It is for keeping project documentation aligned with the current code and architecture.
Why use it?
It reduces the need to manually find affected documentation and helps avoid writing about obsolete implementations.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions subagents.

Good fit It is for keeping project documentation aligned with the current code and architecture.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nmime/motiv-buy/update-docs
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.

Clone the repo
git clone --depth 1 https://github.com/nmime/motiv-buy

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/nmime/motiv-buy/update-docs.svg)](https://agentmods.dev/commands/nmime/motiv-buy/update-docs)
Your own site
<a href="https://agentmods.dev/commands/nmime/motiv-buy/update-docs"><img src="https://agentmods.dev/badge/commands/nmime/motiv-buy/update-docs.svg" alt="Measured on agentmods" height="20"></a>
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 3,146 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.03146
Opus 5 $0.00000 $0.01573
Sonnet 5 $0.00000 $0.00629
Haiku 4.5 $0.00000 $0.00315

Measured 2d ago against content hash 7e3e19379726, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 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.

.claude/commands/update-docs.md · 365 lines

How it starts

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

You have just completed work on the current project. Analyze changes based on the provided context and automatically update relevant documentation.

Auto-Loaded Project Context:

@/CLAUDE.md @/docs/ai-context/project-structure.md @/docs/ai-context/docs-overview.md

Core Documentation Principle: Document Current State Only

CRITICAL: Always document the current "is" state of the system. Never reference legacy implementations, describe improvements made, or explain what changed. Documentation should read as if the current implementation has always existed.

Documentation Anti-Patterns to Avoid:

  • ❌ "Refactored the voice pipeline to use streaming instead of batch processing"
  • ❌ "Improved performance by implementing caching"
  • ❌ "Previously used X, now uses Y for better results"
  • ❌ "Legacy implementation has been replaced with..."

Documentation Best Practices:

  • ✅ "The voice pipeline uses streaming for real-time processing"
  • ✅ "Implements caching for frequently accessed data"
  • ✅ "Uses Y for optimal results"
  • ✅ "The system architecture follows..."

Step 1: Analyze Changes Based on Input

Determine Analysis Mode:

  • No input (default): Analyze recent conversation context
  • Git commit ID (e.g., "3b8d24e" or full hash): Analyze specific commit
  • "uncommitted"/"staged"/"working": Analyze uncommitted changes
  • "last N commits" (e.g., "last 3 commits"): Analyze recent commits

Execute Analysis:

Based on the input parameter:

For Git Commit Analysis:
# Get commit details
git show --name-status [COMMIT_ID]
git diff [COMMIT_ID]^ [COMMIT_ID]
For Uncommitted Changes:
# Get staged and unstaged changes
git status --porcelain
git diff HEAD
git diff --cached
For Recent Commits:
# Get recent commit history
git log --oneline -n [N]
git diff HEAD~[N] HEAD
For Session Context (default):

Review your recent conversation and tool usage for significant changes.

Look for Evidence of Documentation-Relevant Changes:

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

Subscribe to this mod's changes

update-docs is a command published in the GitHub repository nmime/motiv-buy (0 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,146 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-09-04.