AgentSkillsCN

flow-primitive-commit

为当前任务创建专注且有明确范围的Git提交。当工作流程需要提交工作、仅需暂存特定文件、提交信息必须清晰且采用现在时态,或在推送/归档前验证工作树状态时使用此功能。

SKILL.md
--- frontmatter
name: flow-primitive-commit
description: Create focused, scoped git commits for the current task. Use when the workflow requires committing work, when only specific files should be staged, when commit messages must be clear and present-tense, or when validating the worktree state before push/archive.

Flow Primitive Commit

Create a reliable commit snapshot that includes only files relevant to the active task.

Workflow

  1. Inspect status:
bash
git status -sb
  1. Stage only task-relevant files:
bash
git add <files...>
  1. Commit with a concise present-tense summary:
bash
git commit -m "Add Web UI release task to workplan"
  1. Verify post-commit state:
bash
git status -sb

Rules

  • Keep commits scoped to one task/PRD change.
  • Prefer explicit file staging over git add ..
  • Use present-tense commit subjects.
  • Split mixed deliverables into multiple commits when reviewability improves.
  • Do not amend or rewrite history unless explicitly requested.