commit
Creates atomic commits by analyzing changes, detecting mixed concerns, and commenting on related GitHub issues. TDD-aware — defers to the /tdd loop's commit convention when a red/green cycle is in progress.
- License 许可
- MIT
- 所属仓库
- goffity/dev-km
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- commit
- description
- Creates atomic commits by analyzing changes, detecting mixed concerns, and commenting on related GitHub issues. TDD-aware — defers to the /tdd loop's commit convention when a red/green cycle is in progress.
- user-invocable
- true
02 资源文件 12
- 参考文档_meta.json127 B
- 参考文档checkout.md13.5 KB
- 参考文档crossmint-wallet.md2.7 KB
- 参考文档encrypted-card.md9.9 KB
- 参考文档heartbeat.md3.2 KB
- 参考文档management.md2.7 KB
- 参考文档skill-card.md3.8 KB
- 参考文档skill.json818 B
- 参考文档SOURCE.md240 B
- 参考文档spending.md2.4 KB
- 参考文档stripe-x402-wallet.md5.9 KB
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
Atomic Commit
Analyze changes and create clean, atomic commits. Self-contained — no plugin dependency.
Instructions
Language Setting
Check
LANGUAGEindocs/current.md. Ifth, translate output perreferences/language-guide.md. Seereferences/bash-helpers.mdfor detection snippet.
Step 0: TDD Loop Check
If the branch is mid TDD cycle, commits belong to the loop — not to after-the-fact grouping:
bash ~/.claude/skills/tdd/scripts/tdd-phase.sh
redorgreen: a/tddcycle is in progress. Do NOT batch-commit — follow the/tddskill's commit convention for the current phase (test(red):,feat(green):/fix(green):,refactor:) and commit only the current slice's files. Then stop.unknownorrefactor(or the script is missing): no cycle in progress — proceed with the atomic workflow below.
Step 1: Analyze Changes
git branch --show-current && git status && git diff && git diff --staged
An atomic commit: does exactly one thing, leaves the codebase in a working state (build + tests pass), can be reverted independently, mixes no unrelated concerns.
Step 2: Detect Mixed Concerns
Look for changes mixing: multiple features · bug fix + feature · refactoring + new functionality · unrelated bug fixes · code + unrelated docs · tests for multiple features.
Step 3: Group Commits
Group files by shared purpose and present the grouping to the user for confirmation:
Group 1: "Add slip-only flag" → user-api/handler/account.go, user-repository/account.go, user-api/handler/account_test.go
Group 2: "Fix maintenance window check" → user-api/service/maintenance.go, user-api/service/maintenance_test.go
Step 4: Create Each Commit
For each group:
- Stage explicitly:
git add <file1> <file2>— nevergit add .or-a - Review:
git diff --cached - Test + build:
make test && make build— must pass before committing - Commit with Conventional Commit format:
feat|fix|refactor|docs|test|chore|perf|style - Verify:
git log -1 --oneline
Step 5: Final Review
git log --oneline -n <N>
Commit Message Rules
- Conventional commit format; include ticket ref when known:
feat: <desc> (RUAYS-XXXX)or(#42) - NO footer — no "Generated with...", "Co-Authored-By...", or similar
- Concise and descriptive; no vague messages, no debug code
Post-Commit: Issue Comment
After commits are created, automatically comment on the related GitHub issue:
- Find Issue Number - Check
docs/current.mdforISSUE: #Nor extract from branch name/commits - If issue found, comment with:
gh issue comment <issue-number> --body "$(cat <<'EOF'
## Implementation Update
### Changes Made
[List files changed and what was modified]
### Commits
[List commit hashes and messages]
### Status
- Branch: `<branch-name>`
- Ready for: review / merge / testing
EOF
)"
- If no issue found, skip commenting silently
04 同仓库更多 Skills
wait-what
Stop. That last message did not land: re-pitch it.
tdd
Test-driven development loop (red-green-refactor) with commit-based phase state and Jira traceability. Use when the user wants to build a feature or fix a bug test-first, mentions "tdd", "red-green-refactor", or "test-first". Replaces the tdg plugin — combines its commit/phase discipline with seam-based test quality rules from kb Testing Standards.
td
Creates post-task retrospectives with Before/After context and session documentation.
summary
Generates weekly or monthly session summaries from retrospectives and activity logs.
share
Shares knowledge across projects by copying to shared-knowledge directory with cross-project metadata.
session-analyzer
Analyzes git changes and creates retrospective drafts with Before/After context.