AgentSkillsCN

git-commit

对有意义的代码差异进行阶段性标记,并以“为何而改”为核心撰写提交信息。当代理需要提交代码变更时使用此方法。

SKILL.md
--- frontmatter
name: git-commit
description: Stage meaningful diffs and create commits with WHY-focused messages. Use when agent needs to commit code changes.

INSTRUCTIONS

Use /git:commit slash command to stage meaningful diffs and create commits with WHY-focused messages.

DISCIPLINE

  • Only commit when:
    1. ALL tests are passing
    2. ALL compiler/linter warnings have been resolved
    3. The change represents a single logical unit of work
    4. Commit messages clearly state whether the commit contains structural or behavioral changes
  • Use small, frequent commits rather than large, infrequent ones