AgentSkillsCN

git

在提交或创建分支时使用

SKILL.md
--- frontmatter
name: git
description: Use when committing or creating branches

Git Conventions

Commits

  • Stage the files you changed, then use Task tool (model: haiku, run_in_background: true) for the commit message and commit
  • If there are unstaged changes to tracked files after staging, mention them before handing off
  • If the user asks to include missed files, stage them and amend the previous commit
  • Follow existing project conventions (check recent commits, commitlint config, etc.)
  • If no conventions found: imperative mood, capitalized, max 50 chars
  • Body only when necessary (blank line, 72 char wrap)
  • Don't add attribution (e.g. "Co-Authored-By")

Branches

  • Work on feature branches, not main
  • Use worktrees for parallel work; clean up when done