SuperAPI AI Directory

git-doc-updater

General & other

View repository

Updated 10-16 09:44

About this skill

Git Documentation Auto-Update Skill

Description

Before executing a Git commit, automatically check and update the project's key documentation to ensure documentation stays in sync with the code.

Trigger Conditions

Enable this skill when the user requests the following operations:

  • Git commit
  • Git push
  • Commit code
  • Prepare a release

Automatically Updated Documentation

1. README.md

  • Update project description (if changed)
  • Update installation/usage instructions
  • Update feature list
  • Update dependencies

2. CHANGELOG.md

  • Add new entries based on this change
  • Follow the Keep a Changelog format
  • Categorize as: Added, Changed, Deprecated, Removed, Fixed, Security
  • Include date and version number (if applicable)

3. ROADMAP.md

  • Mark completed feature items
  • Update the status of in-progress items
  • Adjust priorities (if needed)

4. ARCHITECTURE.md (ARCH)

  • Update architecture diagrams and descriptions (if there are structural changes)
  • Update component relationships
  • Update technical decision records

5. Memory Bank Documentation

Update the relevant files under the memory-bank/ directory:

  • activeContext.md - Current work focus
  • progress.md - Progress tracking (Done/Doing/Next)
  • decisionLog.md - Record important decisions
  • productContext.md - Project context (if changed)

Execution Flow

1. 分析本次程式碼變更內容
2. 執行 MCP 工具統計同步(若涉及工具變更)
3. 識別哪些文檔需要更新
4. 依序更新各文檔
5. 顯示更新摘要供用戶確認
6. 將文檔變更加入 Git staging

⚠️ Required Step: MCP Tool Count Synchronization

When the code involves adding, removing, or renaming MCP tools,you mustexecute:

uv run python scripts/count_mcp_tools.py --update-docs

This script automatically updates the tool count and list in 6 files.

Update Principles

  • Minimal changes: Only update content related to this commit
  • Maintain consistency: Preserve the existing documentation format and style
  • Automatic summary: Infer the change summary from the commit content
  • Version control: CHANGELOG uses semantic versioning

Example Output

When the user says "prepare to commit":

📝 文檔更新檢查:

✅ README.md - 無需更新
✅ CHANGELOG.md - 已添加 v1.2.0 條目
✅ ROADMAP.md - 已標記「用戶認證」為完成
⏭️ ARCHITECTURE.md - 無結構性變更,跳過
✅ memory-bank/progress.md - 已更新進度

準備提交以下文件變更...

Custom Options

The user can specify via a prompt:

  • --skip-readme Skip README update
  • --skip-changelog Skip CHANGELOG update
  • --skip-memory Skip Memory Bank update
  • --dry-run Only show what will be updated, without actually modifying it