git-precommit
Skill3 starsChanged 8 months agoApache-2.0View on GitHub
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送, stage, 暫存, checkin, 簽入, submit, save, 準備發布, ready to commit, 要推了.
- Commits and pushes
4 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- u9401066/zotero-keeperedited, first seen Nov 8, 2026
- u9401066/pubmed-search-mcptheir own version, first seen Oct 20, 2026
- u9401066/asset-aware-mcpedited, first seen May 6, 2026
- u9401066/nsforge-mcpedited, first seen Jan 4, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- u9401066/zotero-keeper★ 725% same
- u9401066/nsforge-mcp★ 425% same
- u9401066/asset-aware-mcp★ 025% same
Wrote their own version · 1
- u9401066/pubmed-search-mcp★ 28same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- bug-fixSkill
- changelog-updaterSkill
- code-auditSkill
- code-refactorSkill
- code-reviewerSkill
- code-review-workflowSkill
- ddd-architectSkill
- feature-developmentSkill
- git-doc-updaterSkill
- memory-checkpointSkill
- memory-updaterSkill
- project-initSkill
- readme-i18nSkill
- readme-updaterSkill
- releaseSkill
- roadmap-updaterSkill
- security-reviewerSkill
- skill-generatorSkill
- skill-health-checkSkill
- test-generatorSkill
The file
Files
Git 提交前工作流(編排器)
描述
協調多個 Skills 完成 Git 提交前的所有準備工作。這是一個「編排器」Skill,負責調用其他 Skills。
觸發條件
- 「準備 commit」「GIT」「gc」
- 「要提交了」「git commit」
- 「推送」「push」
法規依據
- 憲法:CONSTITUTION.md 第三章
- 子法:.github/bylaws/git-workflow.md
🔧 操作步驟(編排流程)
Step 1: 收集變更資訊
git status --short
git diff --name-only --cached使用工具:
get_changed_files() # 取得變更清單Step 2: 執行 memory-updater(必要)
呼叫條件:永遠執行
調用 memory-updater skill:
- 更新 activeContext.md(當前焦點)
- 更新 progress.md(移動 Done/Doing)Step 3: 執行 readme-updater(條件)
呼叫條件:
- 新增功能(src/ 有新檔案)
- 依賴變更(pyproject.toml/package.json 變更)
- API 變更
若需要,調用 readme-updater skillStep 4: 執行 changelog-updater(條件)
呼叫條件:
- 有功能性變更(非純文檔)
- 有 bug 修復
- 有安全性修補
若需要,調用 changelog-updater skillStep 5: 執行 roadmap-updater(條件)
呼叫條件:
- 完成了 ROADMAP 中列出的功能
若需要,調用 roadmap-updater skillStep 6: 架構文檔檢查(條件)
呼叫條件:
- 有結構性變更(新增 domain/application 層)
若需要,更新 memory-bank/architect.mdStep 7: 生成 Commit Message
依據 Conventional Commits 格式:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]類型對照:
| 變更內容 | type |
| 新功能 | feat |
| Bug 修復 | fix |
| 文檔 | docs |
| 重構 | refactor |
| 測試 | test |
| 建構/CI | chore |
Step 8: 執行 Git 命令
# 檢查狀態
git status
# Stage 變更
git add .
# 提交
git commit -m "feat(auth): 新增用戶認證模組"
# 推送(如果用戶確認)
git push origin main📊 流程圖
┌─────────────────────────────────────────────────┐
│ Git Pre-Commit Orchestrator │
├─────────────────────────────────────────────────┤
│ Step 1: 收集變更 [分析] get_changed_files │
│ Step 2: memory-sync [必要] Memory Bank 同步 │
│ Step 3: readme [條件] README 更新 │
│ Step 4: changelog [條件] CHANGELOG 更新 │
│ Step 5: roadmap [條件] ROADMAP 更新 │
│ Step 6: architect [條件] 架構文檔檢查 │
│ Step 7: message [生成] Commit Message │
│ Step 8: commit [執行] git add/commit/push │
└─────────────────────────────────────────────────┘🎮 參數選項
| 指令 | 效果 |
「準備 commit」 | 完整流程 |
「快速 commit」 | 只執行 memory-sync |
「commit 跳過 readme」 | 跳過 README 更新 |
「只更新文檔然後 commit」 | 只執行文檔相關步驟 |
📝 輸出格式
🚀 Git Pre-Commit 工作流
[1/6] 變更分析
└─ 變更檔案:5 個
└─ 新增:src/auth/login.py
└─ 修改:README.md
[2/6] Memory Bank 同步 ✅
└─ progress.md: 新增 1 個 Done 項目
└─ activeContext.md: 已更新焦點
[3/6] README 更新 ✅
└─ 新增「用戶認證」功能說明
[4/6] CHANGELOG 更新 ✅
└─ 添加到 [Unreleased] > Added
[5/6] ROADMAP 更新 ⏭️ (無匹配項目)
[6/6] Commit 準備 ✅
📋 Staged files (5):
M README.md
M CHANGELOG.md
A src/auth/login.py
A src/auth/models.py
M memory-bank/progress.md
建議 Commit Message:
───────────────────────
feat(auth): 新增用戶認證模組
- 實作登入/登出功能
- 新增 User model
───────────────────────
確認提交?(y/n/edit)⚠️ 注意事項
- Memory Bank 同步是必要的:即使用 --quick,也要執行
- 不要自動 push:除非用戶明確要求
- 保留未 stage 的檔案:不要自動
git add .所有檔案 - 確認 Commit Message:讓用戶有機會修改
🔄 與其他 Skills 關係
這是編排器 Skill,負責調用:
git-precommit (編排器)
├── memory-updater (必要)
├── readme-updater (條件)
├── changelog-updater (條件)
├── roadmap-updater (條件)
└── ddd-architect (架構檢查參考)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

