| name | git |
| description | Git automation skill. Provides task selection UI when /git command is executed.
Choose from commit, push, sync, issue, pr, revert operations. GitHub-only —
there is no Local Mode; gh auth is a prerequisite.
|
| allowed-tools | ["Bash","Read","Glob","Grep","AskUserQuestion"] |
Git Automation Skill
Select a task when the /git command is executed. The harness is GitHub-only — gh auth status must succeed before Issue/PR/revert actions; the gh-auth-check.sh PreToolUse hook blocks gh commands when auth is missing.
Argument Parsing
Parse the args parameter when the skill is invoked to separate the action and message.
Parsing Rules
| Input Example | Parsing Result |
|---|
| (none) | action=none, message=none |
"Login feature" | action=none, message="Login feature" |
commit | action=commit, message=none |
commit "Login feature" | action=commit, message="Login feature" |
sync | action=sync, message=none |
sync "Login feature" | action=sync, message="Login feature" |
push | action=push |
issue | action=issue, message=none |
issue "Login feature" | action=issue, message="Login feature" |
pr | action=pr, message=none |
pr "Login feature" | action=pr, message="Login feature" |
revert | action=revert, message=none |
revert "42" | action=revert, message="42" (PR number to revert) |
Parsing Method
- If args starts with quotes → treat entire content as message (no action)
- If args starts with
commit, sync, push, issue, pr, revert → use that value as action, rest as message
- Otherwise → no action, treat entire content as message
Execution Flow
1. If no action → Display task selection UI
Channel Detection: When the request originates from an external channel message (<channel source="plugin:discord:discord" ...>):
AskUserQuestion is unavailable (terminal only)
- Send task selection options as text via Discord reply, then wait for user's response
Terminal: Call AskUserQuestion tool to provide task selection UI.
If no message:
{
"questions": [
{
"header": "Git Task",
"question": "Which Git operation would you like to perform?",
"multiSelect": false,
"options": [
{ "label": "commit", "description": "Analyze changes and commit" },
{ "label": "push", "description": "Push current branch" },
{ "label": "sync", "description": "Full workflow: add → commit → push" },
{ "label": "issue", "description": "Create GitHub Issue" },
{ "label": "pr", "description": "Create PR + squash merge to main" },
{ "label": "revert", "description": "Revert a merged PR via new revert PR" }
]
}
]
}
If message exists (e.g., /git "Login feature"):
{
"questions": [
{
"header": "Git Task",
"question": "Which Git operation would you like to perform? (message: \"Login feature\")",
"multiSelect": false,
"options": [
{ "label": "commit", "description": "Commit with provided message" },
{ "label": "sync", "description": "add → commit → push with provided message" },
{ "label": "issue", "description": "Create Issue with provided message" },
{ "label": "pr", "description": "Create PR with provided message" },
{ "label": "push", "description": "Push current branch (message not used)" },
{ "label": "revert", "description": "Revert PR #<message> via a new revert PR" }
]
}
]
}
When Other is selected from UI:
- Treat input as message for commit/sync operations
2. If action exists → Execute that operation directly
| action | message | behavior |
|---|
| commit | none | Auto-generate message and commit |
| commit | exists | Commit with provided message |
| sync | none | Auto-generate message then add → commit → push |
| sync | exists | add → commit → push with provided message |
| push | - | Push immediately |
| issue | none | Auto-generate title from context and create Issue |
| issue | exists | Create Issue with provided title |
| pr | none | Auto-generate PR body and create PR (base=main, squash) |
| pr | exists | Create PR with provided description (base=main, squash) |
| revert | required | Revert PR #<message>: create Issue + revert branch + revert PR |
3. Reference Documents by Operation
Common Rules
Commit Message Format (Conventional Commits)
<emoji> <type>[scope][!]: <description>
- [detailed change 1]
- [detailed change 2]
Type & Emoji Map
See references/commit-prefix-rules.md for the complete type/emoji table.
Commit Message Rules
- Subject under 72 characters (including emoji + type + scope)
- Imperative mood ("Add" not "Added")
- Atomic commits (single purpose)
- Split unrelated changes
Language Rules
- Commit messages, Issue titles, PR titles: Detect user's language from conversation context and write in the same language
- Variable/function names: English
- All user-facing output (summaries, status messages): Match user's language
Prohibited [Important]
- ❌ Do NOT use
Co-Authored-By pattern (e.g., Co-Authored-By: Claude ...)
- ❌ Do NOT use non-standard types (types not in the table above)
- ❌ Do NOT use
hotfix: type → Use revert action (revert PR is the trunk-based hotfix path) or fix for forward-fix
- ❌ Do NOT use
merge: type → Use Git auto-generated message
- ❌ No force push (Exception:
--force-with-lease after interactive rebase, with user confirmation)
Auth prerequisite
The harness is GitHub-only — gh auth status must succeed before Issue/PR/revert actions.
gh-auth-check.sh PreToolUse hook blocks every gh command when gh auth status fails, with a gh auth login remediation message.
- If you encounter the block, ask the user to run
! gh auth login in their terminal, then retry.
- There is no Local Mode fallback — a project that cannot reach GitHub is out of scope for this harness.
Reference Documents