AGENT SKILL

commit-close

Commit successfully reviewed changes and close the associated GitHub issue. Trigger this skill when the user says "commit and close the issue", "finish up and close ticket

License 许可
MIT
最近更新
2026-09-05
Stars
★ 0
Forks
0

01 前言 Front Matter

name
commit-close
description
Commit successfully reviewed changes and close the associated GitHub issue. Trigger this skill when the user says "commit and close the issue", "finish up and close ticket

03 SKILL.md 正文

Commit and Close Issue

Use this skill to stage and commit your reviewed changes using the Conventional Commits format, and close the corresponding GitHub issue safely.

Core Directives

  1. Git Staging and Committing:

    • Identify the changed or unstaged files related to the completed task.
    • Stage these files using git add [files]. Do not stage unrelated config, temporary, or cache files.
    • Generate a clean commit message following the Conventional Commits specification (e.g., feat(scope): add feature, fix(scope): fix bug).
    • Run the commit command:
      git commit -m "<message>"
      
    • Do NOT push the changes to the remote repository. Stop execution immediately after the commit is created.
  2. Safe GitHub Issue Closing:

    • Identify the associated issue ID/number from the conversation context.
    • If no issue ID is found in context, prompt the user: "Which GitHub issue is associated with this change?"
    • Once the issue ID is identified, you must explicitly prompt the user for confirmation before running the close command. Present a message like:

      Confirmation Required: Would you like me to close GitHub issue #<issue-id> ("<Issue Title>")?

    • Wait for the user's explicit confirmation.
    • If confirmed, execute the close command using the GitHub CLI:
      gh issue close <issue-id>
      
    • If the user declines, leave the issue open.

04 同仓库更多 Skills