update-docs

A pre-commit and pre-pull-request checklist for keeping project documentation aligned with code changes. It covers features, bug fixes, configuration, architecture, integrations, and related guides.

In plain words
What is it for?
Use it to inspect Git changes, decide which documents are affected, and update the relevant project documentation.
Why use it?
It helps prevent README files, setup instructions, references, and architecture documents from becoming outdated after code changes.

Command for Claude Code

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/istarwyh/mcpadvisor/update-docs
Clone the repo
git clone --depth 1 https://github.com/istarwyh/mcpadvisor

Made for: Claude Code.

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,545 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.01545
Opus 5 $0.00000 $0.00772
Sonnet 5 $0.00000 $0.00309
Haiku 4.5 $0.00000 $0.00154

Measured 2d ago against content hash a035862d9754, 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 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 · 183 lines

How it starts

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

请在每次提交代码或创建PR前运行此文档更新流程,确保所有相关文档都已正确更新。

参数:$ARGUMENTS(变更描述,可选)

🔍 第一步:分析变更影响

1.1 检查代码变更

git status
git diff --cached
git diff HEAD

1.2 识别变更类型并确定需要更新的文档

根据您的变更类型,检查以下文档:

🆕 新功能 (feat)

  • docs/GETTING_STARTED.md - 使用说明和配置
  • docs/TECHNICAL_REFERENCE.md - 技术实现细节
  • README.md / README_zh.md - 功能列表和示例
  • docs/ARCHITECTURE.md - 架构变更(如适用)

🐛 Bug修复 (fix)

  • docs/TROUBLESHOOTING.md - 问题解决方案
  • 相关功能文档 - 更新受影响的说明

🔧 配置变更 (config)

  • docs/GETTING_STARTED.md - 环境变量和配置
  • docs/TECHNICAL_REFERENCE.md - 配置参考
  • .env.example - 新环境变量

🏗️ 架构变更 (refactor)

  • docs/ARCHITECTURE.md - 系统架构图和组件
  • docs/TECHNICAL_REFERENCE.md - 技术实现
  • CONTRIBUTING.md - 开发指南(如适用)

🔌 新集成/提供者

  • docs/TECHNICAL_REFERENCE.md - 新提供者文档
  • docs/GETTING_STARTED.md - 配置指南
  • docs/ARCHITECTURE.md - 架构图更新

📝 第二步:系统性更新文档

使用Glob和Read工具检查当前文档内容,然后使用Edit/MultiEdit进行更新:

2.1 核心文档检查清单

README.md / README_zh.md

  • 项目描述准确
  • 功能列表最新
  • 快速开始有效
  • 示例代码正确
  • 链接有效

docs/GETTING_STARTED.md

  • 安装说明完整
  • 配置选项详细
  • 环境变量更新
  • 使用示例清晰
  • 常见问题覆盖

docs/TECHNICAL_REFERENCE.md

  • 技术实现详细
  • API参考准确
  • 搜索提供者完整
  • 配置参考表更新
  • 性能建议相关

docs/ARCHITECTURE.md

  • 架构图最新(mermaid)
  • 组件说明准确
  • 数据流图正确
  • 技术实现一致

CONTRIBUTING.md

  • 开发环境设置
  • 编码标准更新
  • 测试指南完整
  • 新工具和流程

docs/TROUBLESHOOTING.md

  • 新问题和解决方案
  • 错误代码说明
  • 性能问题排查
  • 调试技巧更新

🔗 第三步:验证链接和引用

3.1 检查文档链接

grep -r "docs/" . --include="*.md" --exclude-dir=node_modules

3.2 检查废弃文档引用

grep -r "docs/INSTALLATION.md\|docs/USER_GUIDE.md\|docs/TECHNICAL_DETAILS.md\|docs/SEARCH_PROVIDERS.md\|docs/DEVELOPER_GUIDE.md\|docs/BEST_PRACTICES.md\|docs/TESTING.md" . --include="*.md" --exclude-dir=node_modules

3.3 验证交叉引用

  • README → 其他文档
  • GETTING_STARTED → TECHNICAL_REFERENCE
  • TROUBLESHOOTING → 相关文档
  • CONTRIBUTING → 开发文档
  • ARCHITECTURE → 技术文档

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

Subscribe to this mod's changes

update-docs is a command published in the GitHub repository istarwyh/mcpadvisor (89 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,545 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-30.