From zenbu-powers
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
npx claudepluginhub zenbuapps/zenbu-powers --plugin zenbu-powersThis skill is limited to using the following tools:
Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.
Automates conventional git commits: analyzes diffs for type/scope, generates messages, intelligent staging, interactive overrides. Activates on commit requests or /git-commit.
Generates conventional commit messages from git diffs by analyzing changes for type, scope, and subject. Validates messages against spec and executes git commits after confirmation.
Reviews git changes, stages intended work with patch mode, splits into logical commits, and writes Conventional Commits messages with verification.
Share bugs, ideas, or general feedback.
Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
| Type | Purpose |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting/style (no logic) |
refactor | Code refactor (no feature/fix) |
perf | Performance improvement |
test | Add/update tests |
build | Build system/dependencies |
ci | CI/config changes |
chore | Maintenance/misc |
revert | Revert commit |
# Exclamation mark after type/scope
feat!: remove deprecated endpoint
# BREAKING CHANGE footer
feat: allow config to extend other configs
BREAKING CHANGE: `extends` key behavior changed
若此 SKILL 被呼叫但沒有其他 prompt 說明時:
若所有異動屬於同一個 type/scope/目的,做一次原子 commit:
git add . 暫存所有異動當變更檔案較多,且涉及不同 type 或不相關的 scope 時,必須拆分為多個原子 commit,不可全部擠進同一個 commit。
觀察 git status 與 git diff 的結果,若符合以下任一條件即應拆分:
feat + fix + docs)*.test.*、*.spec.*)與對應的生產程式碼同時異動git status --porcelain 與 git diff 取得完整變更清單build / ci / chore(基礎建設)先 commitfeat / fix / refactor(功能本體)接著 committest(測試)緊跟在對應功能後docs(文件)最後 commitgit add <specific files> 只 stage 當前 commit 的檔案# 變更清單:
M src/auth/login.ts → feat(auth)
M src/auth/login.test.ts → test(auth)
M src/cart/checkout.ts → fix(cart)
M docs/api.md → docs
M .github/workflows/ci.yml → ci
# 拆成 4 個 commit:
1. ci: 更新 CI workflow 設定
2. feat(auth): 實作登入邏輯
3. test(auth): 新增登入單元測試
4. fix(cart): 修正結帳流程問題
5. docs: 更新 API 文件
# If files are staged, use staged diff
git diff --staged
# If nothing staged, use working tree diff
git diff
# Also check status
git status --porcelain
If nothing is staged or you want to group changes differently:
# Stage specific files
git add path/to/file1 path/to/file2
# Stage by pattern
git add *.test.*
git add src/components/*
# Interactive staging
git add -p
Never commit secrets (.env, credentials.json, private keys).
Analyze the diff to determine:
產出的 commit 以繁體中文為主
# Single line
git commit -m "<type>[scope]: <description>"
# Multi-line with body/footer
git commit -m "$(cat <<'EOF'
<type>[scope]: <description>
<optional body>
<optional footer>
EOF
)"
Closes #123, Refs #456