| name | git-workflow |
| description | Git workflow assistant for branching, commits, PRs, and conflict resolution. Use when user asks about git strategy, branch management, or PR workflow. |
Git Workflow
Help with Git operations and workflow best practices.
Capabilities
Branch Strategy
git branch -a
git log --oneline -20
git status
Recommend branching strategy based on project:
- Solo: main + feature branches
- Team: main + develop + feature/fix branches
- Release: GitFlow (main/develop/release/hotfix)
Commit Messages
Follow Conventional Commits:
feat(scope): add new feature
fix(scope): fix bug description
refactor(scope): restructure code
docs(scope): update documentation
test(scope): add/update tests
chore(scope): maintenance tasks
PR Workflow
git diff main --stat — Review changes
- Generate PR title and description
- Suggest reviewers based on changed files (
git log --format='%an' -- <files>)
PR link in summaries
When a PR has been opened, always include the full GitHub PR URL in any summary or status update you provide. This makes it easy for the user to click through to the PR directly.
Example summary format:
PR: https://github.com/owner/repo/pull/42
Use gh pr view --json url --jq .url to retrieve the URL if you do not already have it.
Non-interactive safety for agent-run Git/GitHub commands
When the agent runs git or gh, avoid opening an interactive editor or prompt.
A lot of Git entrypoints use different editor config keys, so avoid surprises by disabling both:
core.editor / GIT_EDITOR (commit, merge, tag message editing)
sequence.editor / GIT_SEQUENCE_EDITOR (interactive rebase todo-list editing)
Use this pattern for non-interactive flows:
GIT_EDITOR=true GIT_SEQUENCE_EDITOR=true git -c core.editor=true -c sequence.editor=true rebase --continue
Conflict Resolution
git diff --name-only --diff-filter=U — Find conflicted files
- Read each conflicted file
- Understand both sides of the conflict
- Resolve with minimal changes preserving intent from both sides
Interactive Rebase
Guide through git rebase -i for cleaning up history before PR.
If the agent is resolving conflicts during a rebase, continue with a non-interactive command such as:
GIT_EDITOR=true GIT_SEQUENCE_EDITOR=true git -c core.editor=true -c sequence.editor=true rebase --continue