AgentSkillsCN

commit-chunks

以有意义、原子化的块来审查和提交git更改。当用户要求审查未提交的更改、将其分组为逻辑提交、选择性暂存,以及创建常规提交消息时使用,包括运行状态/差异并显示最近日志。

SKILL.md
--- frontmatter
name: commit-chunks
description: Review and commit git changes in meaningful, atomic chunks. Use when a user asks to review uncommitted changes, group them into logical commits, stage selectively, and create conventional-commit messages, including running status/diff and showing recent log.

Commit Chunks

Overview

Create clean, atomic git commits by reviewing uncommitted changes, grouping related edits, and committing with conventional messages that explain intent.

Workflow

1) Inspect current changes

  • Run git status and git diff to inventory changes.
  • If the user asked for a review, read each changed file and identify risks, regressions, and test gaps.

2) Group changes into commits

  • Split by feature, file type, or purpose; keep each commit atomic.
  • Do not mix unrelated changes. If unsure how to group, ask a brief clarification.

3) Stage and commit per group

  • Stage only the relevant files for the group using git add <files>.
  • Commit with a conventional message:
    • Format: <type>(<scope>): <description>
    • Use feat, fix, chore, docs, refactor, style, or test.
    • Write descriptions that explain why, not just what.
  • Repeat for each group.

4) Wrap up

  • Show git log --oneline -10 after the last commit.
  • Summarize what was committed and any remaining uncommitted changes.