Coordinate multiple AI agents working concurrently in the same workspace using GitButler's virtual branch model. Use for parallel development, sequential handoffs, and commit transfer patterns without checkout overhead.
/plugin marketplace add outfitter-dev/agents/plugin install gitbutler@outfitterThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Multiple agents → virtual branches → parallel execution → zero coordination overhead.
<when_to_use>
NOT for: single-agent workflows (use standard GitButler), projects needing PR automation (Graphite better) </when_to_use>
<core_advantage> Traditional Git Problem:
GitButler Solution:
# Agent 1
but branch new agent-1-auth
echo "auth code" > auth.ts
but rub auth.ts agent-1-auth
but commit agent-1-auth -m "feat: add authentication"
# Agent 2 (simultaneously, same workspace!)
but branch new agent-2-api
echo "api code" > api.ts
but rub api.ts agent-2-api
but commit agent-2-api -m "feat: add API endpoints"
# Result: Two independent features, zero conflicts
# Agent A: Initial implementation
but branch new initial-impl
# ... code ...
but commit initial-impl -m "feat: initial implementation"
# Agent B: Takes ownership and refines
but rub <agent-a-commit> refinement-branch
# ... improve code ...
but commit refinement-branch -m "refactor: optimize implementation"
# Instant ownership transfer
but rub <commit-sha> agent-b-branch # Agent A → Agent B
but rub <commit-sha> agent-a-branch # Agent B → Agent A
</patterns>
<naming>
## Branch Naming Convention
<agent-name>-<task-type>-<brief-description>
Examples:
- claude-feat-user-auth
- droid-fix-api-timeout
- codex-refactor-database-layer
Makes ownership immediately visible in but status and but log.
</naming>
<ai_integration>
1. Agents Tab (Claude Code)
2. Lifecycle Hooks
{
"hooks": {
"PreToolUse": [{"matcher": "Edit|MultiEdit|Write", "hooks": [{"type": "command", "command": "but claude pre-tool"}]}],
"PostToolUse": [{"matcher": "Edit|MultiEdit|Write", "hooks": [{"type": "command", "command": "but claude post-tool"}]}],
"Stop": [{"matcher": "", "hooks": [{"type": "command", "command": "but claude stop"}]}]
}
}
3. MCP Server
but mcp # Enables programmatic agent integration
Key Instruction for Agents:
"Never use the git commit command after a task is finished"
Let GitButler manage commits via hooks or MCP. </ai_integration>
<coordination> ## Coordination ProtocolsStatus Broadcasting:
# File-based coordination
but status > /tmp/agent-$(whoami)-status.txt
# Or use Linear/GitHub comments
# "[AGENT-A] Completed auth module, committed to claude-auth-feature"
Snapshot Cadence:
# Before risky operations
but snapshot --message "Before merging conflicting branches"
# If it breaks
but undo
Concurrent Safety:
but --json for programmatic state inspection
</coordination>
<rub_power>
but rub Power ToolSingle command handles four critical multi-agent operations:
| Operation | Example | Use Case |
|---|---|---|
| Assign | but rub m6 claude-branch | Organize files to branches post-hoc |
| Move | but rub abc1234 other-branch | Transfer work between agents |
| Squash | but rub newer older | Clean up history |
| Amend | but rub file commit | Fix existing commits |
| </rub_power> |
| Aspect | Graphite | Git Worktrees | GitButler |
|---|---|---|---|
| Multi-agent concurrency | Serial | N directories | Parallel ✓ |
| Post-hoc organization | Difficult | Difficult | but rub ✓ |
| PR Submission | gt submit ✓ | Manual | GUI only |
| Physical layout | 1 directory | N × repo | 1 directory ✓ |
| Context switching | gt checkout | cd | None ✓ |
| Conflict detection | Late (merge) | Late (merge) | Early ✓ |
| Disk usage | 1 × repo | N × repo | 1 × repo ✓ |
NEVER:
git commit — breaks GitButler state| Symptom | Cause | Solution |
|---|---|---|
| Agent commit "orphaned" | Used git commit | Find with git reflog, recover |
| Files in wrong branch | Forgot assignment | but rub <id> <correct-branch> |
| Conflicting edits | Overlapping files | Reassign hunks to different branches |
| Lost agent work | Branch deleted | but undo or restore from oplog |
# Find orphaned commits
git reflog
# Recover agent work
but oplog
but undo
# Extract from snapshot
git show <snapshot>:index/path/to/file.txt
</troubleshooting>
<limitations>
## Current Limitations
gh pr create after organizinggt up/gt down equivalentRecommendation: Use for exploratory multi-agent work. For production automation requiring PR submission, consider Graphite until CLI matures. </limitations>
<references> - [version-control skill](../version-control/SKILL.md) — core GitButler workflows - [stack-workflows skill](../stack-workflows/SKILL.md) — stacked branches - [GitButler AI Docs](https://docs.gitbutler.com/features/ai-integration/) — official AI integration - [Agents Tab Blog](https://blog.gitbutler.com/agents-tab) — Claude Code integration details </references>This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.