Learning path map
Subagents — Concepts
The Task tool and isolation
True Parallelism
Multiple agents in action
Multi-Agent Patterns
Fan-out, pipelines, specialists
Git with AI — Version Control
Semantic commits and staging
Pull Requests and Code Review
Automated PRs with gh CLI
CI/CD and GitHub Actions
Continuous deployment with Claude
Detailed content
Subagents — Concepts
What subagents are, the Task tool, and when to use parallelism.
Subagents are Claude Code instances launched by the main agent to perform isolated tasks.
Allows you to scale work without cluttering the main agent's context.
Parent-child; context isolation; delegation.
Claude Code's internal tool for creating subagents with their own prompt and context.
It's the primary interface for orchestrating parallel work.
Task(prompt); result returned; limited scope.
Subagents can have different permission levels: read, write, or background.
Choosing the right type avoids conflicts and reduces risk.
Principle of least privilege; specialized agents.
The parent sends instructions and context; the child returns a text result when it finishes.
Understanding the workflow prevents information loss between agents.
Input prompt; structured output; no shared state.
Git worktrees let each subagent work on files without conflicting with others.
Without isolation, parallel agents step on each other’s toes.
git worktree; temporary branch; merge later.
Subagents have context overhead and cost. Not every task warrants parallelism.
Avoid wasting tokens on simple tasks.
Overhead vs. gains; independent tasks; minimal complexity.
True Parallelism
Launch multiple agents, collect results, and handle errors in parallel.
Trigger multiple Task tools simultaneously for independent tasks.
Identify tasks that don't depend on one another so they can run simultaneously.
Use git worktree add to create isolated workspaces for each agent.
Run long tasks in the background while the main agent continues working.
Gather the outputs from all subagents and consolidate them into a final result.
Strategies for handling partial failure: retry, skip, or abort.
Multi-Agent Patterns
Architectural patterns: fan-out/in, pipelines, specialists, and cost control.
Distribute work to N agents and bring the results together in one place.
Chain agents so that one agent’s output feeds the next.
One agent explores the codebase, another plans, and another executes. Separation of concerns.
Agents with specific prompts for tests, docs, lint, or security.
Retry, fallback, and circuit-breaker patterns adapted for AI agents.
Limit tokens per subagent, use smaller models for simple tasks, measure ROI.
Git with AI — Version Control
Semantic commits, smart staging, and merge conflicts with Claude.
Claude analyzes the diff and generates commit messages following the conventional commits standard.
Claude selects logically related files for atomic commits.
Ask Claude to review the diff before committing, catching bugs and inconsistencies.
Claude understands the context on both sides and resolves conflicts semantically.
Use short, focused branches that make it easier for the agent to work.
Protect secrets (.env, keys) and prevent the agent from committing sensitive files.
Pull Requests and Code Review
Automated PRs with gh CLI, AI review, and best practices.
Claude uses gh pr create to open PRs with automatic titles, descriptions, and labels.
Use Claude to review colleagues' PRs or the agent's own PRs before merging.
Integrate CI checks into the workflow so Claude only merges when everything is green.
Claude reads review comments and automatically makes the requested changes.
Maintain a linear, readable history with squash merges and interactive rebase.
Small, focused, well-described PRs with passing tests: the recipe for a fast merge.
CI/CD and GitHub Actions
Automate deployment, testing, and security with GitHub Actions and Claude.
GitHub event-based automations: push, PR, schedule.
Use Claude Code in GitHub Actions for automatic review, fixes, and deployment.
Run test suites on every push and block merges if they fail.
Automatic deployments after merge: Vercel, Railway, Docker, etc.
Dependabot, CodeQL, and secret scanning integrated into the pipeline.
Failure notifications, health checks, and automatic rollback.