Use Git Worktrees for Parallel Tasks
When Claude spawns subagents for complex tasks, you can give each agent its own isolated copy of the repository using git worktrees. The agent works on a separate branch while your working directory stays completely untouched.
"In a worktree, refactor the auth middleware to use a policy pattern"
This is useful when you want Claude to:
- Prototype an approach without affecting your current work
- Run multiple experiments in parallel
- Make changes that might conflict with what you're doing
The worktree is automatically cleaned up if the agent makes no changes. If changes are made, the worktree path and branch are returned so you can review and merge.
You can also launch multiple worktree agents at once:
"In parallel worktrees:
1. Refactor the notification system to use events
2. Add caching to the tip listing query"
No configuration needed — just ask Claude to work in isolation and it handles the rest.
Log in to leave a comment.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.