Git Branch
Overview
Create and checkout a new git branch following the naming convention: <category>/<issue-id>_<branch-name> or <category>/<branch-name> when no issue ID is provided. Links to issue tracking when available.
Arguments
Definitions
- •
[category](optional): Branch type. Common values: poc, feature, fix, chore, doc, refactor. Accepts any value. Defaults tofeature. - •
[name](optional): Short kebab-case description of the work. Infer from context if not provided, default toagentic/<random-id>. - •
[base](optional): Base branch to create from. If not provided, branch from current location.
Values
$ARGUMENTS
Core Principles
- •Use kebab-case for branch names (lowercase, hyphens)
- •Keep branch names concise but descriptive
- •Include issue ID when context provides one
- •Never prompt interactively - extract from context or use defaults
- •Accept any category value provided
Instructions
- •Parse the provided arguments to extract category, name, and base (if present)
- •If arguments are incomplete, infer from conversation context:
- •Look for GitHub issue references (#123, issue 123)
- •Derive branch name from the task description
- •Default category to
featureif not provided - •Default name to
agentic/<random-id>if not provided
- •Use the provided category or default to
feature. Common categories: poc, feature, fix, chore, doc, refactor - •Determine base branch:
- •If base is provided, checkout that branch first
- •Otherwise branch from current location
- •Construct the branch name:
- •With issue:
<category>/<issue-id>_<name> - •Without issue:
<category>/<name>
- •With issue:
- •Execute:
git checkout -b <constructed-branch-name>(from base if provided) - •Return JSON output with branch details
Output Guidance
Return JSON with branch creation details:
json
{
"success": true,
"branch": "{{branch}}",
"base": "{{base}}",
"category": "{{category}}",
"issue_id": "{{issue_id}}"
}