git-precommit
БесплатноБез исполняемых скриптовНе проверенOrchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates, and MCP tool count sync. Triggers: GIT, gc, push, commit, 提交, 準備…
от u9401066★ 30 звёзд на GitHubОб этом скилле
Git 提交前工作流(編排器)
描述
協調多個 Skills 完成 Git 提交前的所有準備工作。 本專案同時使用 pre-commit framework 自動執行程式碼品質檢查,以及 AI orchestrator 處理文檔同步。
🔄 自演化循環 (Self-Evolution Cycle)
本專案的品質守門是一個自我演化的閉迴系統:
┌─────────────────────────────────────────────────────────────┐
│ 自演化循環 (Self-Evolution Cycle) │
├─────────────────────────────────────────────────────────────┤
│ │
│ ① Instructions (copilot-instructions.md) │
│ │ 定義規範、引導 AI 使用 Skills │
│ ▼ │
│ ② Skills (SKILL.md 檔案) │
│ │ 確保建構完整、創建新 Hook │
│ ▼ │
│ ③ Hooks (.pre-commit-config.yaml + scripts/hooks/) │
│ │ 自動執行檢查、自動修正 │
│ ▼ │
│ ④ Validate (check_evolution_cycle.py) │
│ │ 驗證 ①②③ 的一致性 │
│ ▼ │
│ ⑤ Feedback → 更新 Instructions & Skills │
│ │ 處理驗證失敗、補齊文檔、更新套件版本 │
│ └────→ 回到 ①(循環完成) │
│ │
└─────────────────────────────────────────────────────────────┘
循環觸發時機
| 事件 | 觸發動作 |
|---|---|
| 新增 Hook | Skill 創建 hook → evolution-cycle 驗證文檔及 instruction 是否同步 |
| 修改 Instruction | evolution-cycle 驗證 skill/hook 是否仍一致 |
pre-commit autoupdate |
套件版本更新 → 自動演化 |
| 驗證失敗 | 報告不一致處,強制修復後才能 commit |
架構:雙層防護 + 自演化
┌─────────────────────────────────────────────────────────────┐
│ Git Commit 防護架構 │
├──────────────────────┬──────────────────────────────────────┤
│ Layer 1: 自動化 │ Layer 2: AI 編排器 │
│ (pre-commit hooks) │ (agent orchestrator) │
├──────────────────────┼──────────────────────────────────────┤
│ ✅ ruff + ruff-format│ ✅ Memory Bank 同步 │
│ ✅ bandit security │ ✅ CHANGELOG 更新 │
│ ✅ vulture deadcode │ ✅ ROADMAP 更新 │
│ ✅ deptry deps │ ✅ README 更新 │
│ ✅ file-hygiene │ ✅ 架構文檔檢查 │
│ ✅ commit-size-guard│ ✅ Commit 訊息建議 │
│ ✅ file-hygiene │ │
│ ✅ commit-size-guard│ │
│ ✅ async-test-checker│ │
│ ✅ tool-count-sync │ │
│ ✅ skills-frontmatter│ │
│ ✅ evolution-cycle │ │
│ ✅ future-annotations│ │
│ ✅ no-print-in-src │ │
│ ✅ ddd-layer-imports│ │
│ ✅ no-type-ignore-bare│ │
│ ✅ docstring-tools │ │
│ ✅ no-env-inner-layers│ │
│ ✅ tenant-scoped-storage│ │
│ ✅ source-counts-guard│ │
│ ✅ todo-scanner │ │
│ ✅ instruction-drift│ │
│ ✅ yaml/toml/json │ │
│ ✅ no large files │ │
│ ✅ no debug stmts │ │
│ ✅ no private keys │ │
│ ✅ BOM / symlinks │ │
│ ✅ case conflicts │ │
│ ✅ Windows names │ │
│ ✅ mixed line ending│ │
│ ✅ no-commit-to-branch│ │
│ ✅ name-tests-test │ │
│ ── Pre-push ──────── │ │
│ ✅ mypy (pre-push) │ │
│ ✅ semgrep (manual)│ │
│ ✅ pytest (pre-push) │ │
├──────────────────────┼──────────────────────────────────────┤
│ 🔧 自動修復: │ 🔧 自動修復: │
│ trailing whitespace │ tool-count-sync (auto-stage) │
│ end-of-file newline │ │
│ ruff --fix │ │
│ ruff format │ │
│ future-annotations │ │
└──────────────────────┴──────────────────────────────────────┘
開發者設定 (一次性)
uv sync # 安裝所有依賴 (含 pre-commit)
uv run pre-commit insta
Установить git-precommit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл git-precommit?
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates, and MCP tool count sync. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.
Как установить скилл git-precommit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-precommit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic