From gir-core
Advanced workflow patterns for Claude Code including Explore-Plan-Code-Commit (E-P-C-C), multi-Claude coordination, parallel development, and iterative refinement loops. Use when planning multi-step implementations or complex engineering tasks.
npx claudepluginhub rivit-studio/gir --plugin gir-coreThis skill uses the workspace's default tool permissions.
> Advanced workflow patterns and multi-Claude coordination (Anthropic best practices)
Orchestrates AI coding workflows with self-correction loops, pre-flight discipline rules, 18 hook events, 5 agents, orchestration patterns, and cross-agent support for Claude Code and Cursor.
Optimizes Claude Code workflows with context engineering, sub-agents, TDD loops, agent teams (/orchestrate), and verification (/handoff-verify,/commit-push-pr).
Coordinates multiple Claude Code instances as agent teams with shared tasks, inter-agent messaging, and management for parallel research, feature development, debugging, and cross-layer coordination.
Share bugs, ideas, or general feedback.
Advanced workflow patterns and multi-Claude coordination (Anthropic best practices)
Writer Claude: Implements features, writes tests, creates endpoints
Reviewer Claude (parallel): Reviews security, validates coverage, checks patterns
When: Large features, security-sensitive code, complex refactors, pre-production merges
Subtask automates parallel work via Git worktrees. Claude spawns subagents that work concurrently in isolated environments.
subtask draft fix-auth-bug # Create task for subagent
subtask draft implement-api # Another parallel task
subtask list # Monitor all tasks
subtask fix-auth-bug # Open TUI for specific task
Workflow:
Ideal for:
Integration: Use with Ralph loops for iterative parallel work. Deploy code-reviewer on merged results.
Agent Teams are a built-in Claude Code feature (experimental) that coordinate multiple Claude instances working together. One session acts as the team lead, spawning teammates that work independently and communicate directly.
Enable with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1in settings.json or environment.
# Tell Claude to create a team — it handles spawning and coordination
"Create an agent team to refactor the auth module. Spawn three teammates:
one for the API layer, one for the database layer, one for tests."
Workflow:
Controls:
Shift+Up/Down — cycle between teammates (in-process mode)Shift+Tab — toggle delegate mode (lead coordinates only, no coding)Ctrl+T — toggle task listEscape — interrupt a teammate's current turnBest use cases:
Not ideal for:
vs Subtask: Agent teams are built-in and support inter-agent communication. Subtask uses isolated git worktrees with a CLI. Use agent teams when teammates need to discuss and coordinate; use Subtask when tasks are fully independent and you want file isolation.
vs Subagents: Subagents run within a single session and report back. Agent teams are separate sessions that communicate peer-to-peer. Use subagents for quick, focused research; use agent teams for complex collaborative work.
Hooks for quality gates:
TeammateIdle — runs when a teammate finishes. Exit code 2 sends feedback and keeps them working.TaskCompleted — runs when a task is marked complete. Exit code 2 blocks completion with feedback.For manual worktree management without Subtask:
git worktree add .worktrees/feature-xyz feature-xyz
git worktree add .worktrees/fix-auth-bug fix-auth-bug
git worktree list
git worktree remove .worktrees/feature-xyz
git worktree prune
Use for: Non-overlapping components, migrations, parallel experiments
| Scenario | Single | Subagents | Subtask | Agent Teams |
|---|---|---|---|---|
| Small bug fix | Yes | — | — | — |
| Feature + tests | Yes | Optional | — | — |
| Focused research tasks | — | Yes | — | — |
| Multiple independent features | — | — | Yes | Optional |
| Large refactor + new feature | — | — | Yes | Yes |
| Code gen + review (parallel) | — | — | Yes | Yes |
| Cross-layer coordination | — | — | — | Yes |
| Debugging competing hypotheses | — | — | — | Yes |
| Multi-perspective review | — | — | — | Yes |
"Preserve context without losing efficiency" — Anthropic
Deploy subagents early and often to preserve main context.
Use for: Exploration, pattern discovery, verification, parallel investigations, detail-gathering
Keep in main: Tasks needing history, final implementations, direct Q&A, architecture decisions
| Agent | Purpose | When |
|---|---|---|
| Explore | Fast codebase nav | Finding patterns, understanding structure |
| Plan | Architecture | Before implementation |
| General-purpose | Complex tasks | Research, verification |
| claude-code-guide | Doc lookup | Claude Code features |
Explore → Plan → Implement:
Parallel Investigation: Deploy 3+ agents simultaneously (check commits, analyze logs, search issues), synthesize in main
Context Preservation: Don't pollute main with tangential investigation. Deploy agent, get findings, continue main work.
run_in_background: true for long tasks"Steps #1-#2 are crucial—without them, Claude jumps straight to coding" — Anthropic
Actions: Read files, deploy Explore subagent, search with rg, check CLAUDE-patterns.md, review activeContext
Exit: Understand existing code, patterns, changes needed, dependencies
Actions: Use sequential-thinking for complex decisions, create TodoWrite plan, deploy Plan agent if needed, present for approval
Exit: Plan documented, user approved, files identified, dependencies clear, clarification gate passed (see CLAUDE-specgates.md)
Actions: Implement per plan, track with TodoWrite, use Gemini-CLI for boilerplate, Context7 for docs, verify with build
Exit: All todos complete, build passes, solution verified
Actions: Pre-commit review (Gemini-CLI/CodeRabbit), conventional commit format, update memory bank, deploy to Vercel, document solutions
Exit: Code reviewed, committed, deployed, documented
Continuous iteration until completion criteria met. See RALPH-LOOPS.md for full guide.
When: TDD, build fixes, API implementations, long-running features, migrations, quality improvements
Not for: Frequent design decisions, ambiguous requirements, production debugging
Process:
Max iterations: Simple 10-15, Medium 15-25, Complex 25-40
Integration: Use in Code phase of Explore-Plan-Code-Commit
"Claude's outputs improve significantly with iteration" — Anthropic
For large-scale changes (deps, APIs, refactors):
Alternative: Deploy subagent for tangential tasks instead of polluting main
Controls: Escape (interrupt), Double-Escape (alternatives), Request undo, Ask questions
Rules:
Specificity improves results: Detailed prompts → better first attempts
| Method | Best For |
|---|---|
| Direct copy | Small snippets, errors |
| Pipe to Claude | Command output, logs |
| Tool retrieval | Codebase files |
| URL fetching | External docs |
git log -p -- src/auth/ | head -500 # Why?
git log --all --grep="auth" --oneline # When?
git diff --stagedgh pr create --title "feat: JWT" --body "$(git log main..HEAD --format='- %s')"
gh pr view 123 --comments
gh pr create --reviewer @security-team
git commit -m "fix: auth bug (fixes #123)"
| Task | Workflow | Tools |
|---|---|---|
| Small bug | Explore-Plan-Code-Commit | rg, Read, Edit |
| New feature | E-P-C-C + TDD | Subagents, TodoWrite |
| Long-running feature | E-P + Ralph Loop | Ralph, TodoWrite |
| Build/test fixes | Ralph Loop | npm scripts |
| API implementation | E-P + Ralph + TDD | Tests, TodoWrite |
| Large refactor | Checklist + Multi-session | Worktrees |
| Design implementation | Visual Iteration | Figma, v0 |
| Migration | Checklist + Ralph | TodoWrite, Subagents |
| Bug investigation | Subagent exploration | Explore agent, rg |
| Architecture decision | Sequential thinking | Plan agent |
| Multiple independent tasks | Subtask | Git worktrees, TUI |
| Parallel features | Subtask + E-P-C-C | Subagents per task |
| Feature + tests | Subtask (parallel) | Isolated worktrees |
| Cross-layer changes | Agent Teams | Lead + teammates |
| Parallel code review | Agent Teams | Multiple reviewers |
| Competing debug hypotheses | Agent Teams | Parallel investigation |
| Complex collaborative work | Agent Teams + E-P-C-C | Shared task list |
Updated: 2026-02-10 | Source: Anthropic Best Practices, Agent Teams Docs