advanced15 min read· Module 4, Lesson 10
🚀Advanced Claude Code Workflows
Agent teams, CI/CD integration, and power user tips
Advanced Claude Code Workflows
Agent Teams (Sub-Agents)
Claude Code can spawn multiple agents that work on different parts of a task simultaneously:
claude "refactor the auth module, update all tests, and update the docs — use sub-agents for each task"How it works:
- A lead agent analyzes the task
- It spawns sub-agents for independent sub-tasks
- Sub-agents work in parallel
- The lead agent merges results
CI/CD Integration
GitHub Actions
Claude Code can automate code review on every PR:
# .github/workflows/claude-review.yml
name: Claude Code Review
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Claude Review
run: |
claude -p "review the changes in this PR for bugs, security issues, and code quality"GitLab CI/CD
claude-review:
script:
- claude -p "review the changes in this MR"
only:
- merge_requestsAutomation Scripts
Morning PR Review:
#!/bin/bash
# review-prs.sh
gh pr list --state open --json number,title | \
claude -p "review each of these open PRs and summarize their status"Log Analysis:
# Pipe production logs for analysis
kubectl logs deployment/api --since=1h | \
claude -p "identify any errors or anomalies and suggest fixes"Dependency Audit:
npm audit --json | \
claude -p "analyze these vulnerabilities and create a plan to fix the critical ones"Scheduled Tasks
Run Claude on a schedule for recurring work:
# Using the /schedule command inside Claude Code
claude /scheduleOr use Routines (Anthropic-managed) for tasks that run even when your computer is off.
Remote Control
Continue a session from another device:
- Start a task in your terminal
- Open it on your phone via Remote Control
- Or use
claude --teleportto pull a web session into your terminal
Multi-Surface Workflows
| Start Here | Continue Here | How |
|---|---|---|
| Terminal | Desktop App | /desktop command |
| Web | Terminal | claude --teleport |
| Terminal | Phone | Remote Control |
| Slack | PR | @Claude mention |
Power User Tips
- Use
/compactregularly — keeps your context window efficient - Create CLAUDE.md early — saves repeating instructions
- Pipe everything — logs, diffs, data files
- Use
-pfor scripts — non-interactive mode for automation - Combine with Unix tools —
grep,awk,jq+ Claude = powerful - Set up hooks — automate formatting and linting
- Use sub-agents — parallelize large tasks
Next up: We'll learn core API skills for building applications.
Module 4
10/11