AgentSkillsCN

committing-changes

提交信息的格式与任务关闭的工作流程。当准备提交代码或关闭任务时,可使用此技能。

SKILL.md
--- frontmatter
name: committing-changes
description: Commit message format and task close workflow. Use when ready to commit or closing tasks.
category: core

Committing Changes - Commit and Close Workflow

This skill covers the commit message format and how to properly close tasks.

Commit and Close Workflow

Step 1: Stage Changes

bash
git add <specific-files>

Prefer staging specific files over git add -A.

Step 2: Commit with Task ID

bash
git commit -m "[task-id] type: description"

Include the task ID in brackets at the start of the message.

Step 3: Close the Task

python
call_tool("gobby-tasks", "close_task", {
    "task_id": "<task-id>",
    "commit_sha": "<commit-sha>"
})

Commit Message Format

code
[<task-id>] <type>: <description>

<optional body>

Valid Commit Types

TypeUse For
featNew feature
fixBug fix
refactorCode restructuring
testAdding tests
docsDocumentation
choreMaintenance

Examples

code
[abc123] feat: add user authentication
[xyz789] fix: resolve password reset bug
[def456] refactor: extract auth logic to service
[ghi012] test: add unit tests for auth module

Closing Without Commits

For tasks that don't require code changes (research, planning, obsolete tasks):

python
call_tool("gobby-tasks", "close_task", {
    "task_id": "<task-id>",
    "reason": "obsolete"  # or "already_implemented", "duplicate", "wont_fix", "out_of_repo"
})

Common Mistakes

Wrong: Close Before Commit

python
# This will fail
call_tool("gobby-tasks", "close_task", {"task_id": "abc"})

Right: Commit First, Then Close

bash
git commit -m "[abc] feat: implement feature"
python
call_tool("gobby-tasks", "close_task", {
    "task_id": "abc",
    "commit_sha": "a1b2c3d"
})

Task Lifecycle

code
open → in_progress → review → closed

Tasks may enter review status instead of closed when:

  • Task has requires_user_review=true
  • Validation criteria fail

User must explicitly close reviewed tasks.