⚡AgentSkills
🔄 Agentic Methodology · Branch Isolation

Isolate parallel work with git worktrees

Separate directories per branch letting agents work concurrently without stepping on each other.

intermediate~25 minAgent Power UsersAI-Native EngineersTeams Shipping With Agents

Steps

  1. 1Create worktrees per workstream: git worktree add ../feat-x -b feat-x
  2. 2Install dependencies inside EACH worktree; they do not share node_modules
  3. 3Assign one agent per worktree; forbid cross-worktree checkouts mid-run
  4. 4Name worktree dirs after branches; delete immediately after merge
  5. 5Prune stale worktrees monthly: git worktree prune plus manual sweep
  6. 6Never create a worktree INSIDE another repository's working tree

Common Pitfalls

  • ▲Assuming installed deps carry across worktrees
  • ▲Two agents editing the same file via different worktrees then merging blindly

Commands

Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill branch-isolation-git-worktree-isolation
Install globally
$ npx skills add aniruddhaadak80/skills --skill branch-isolation-git-worktree-isolation -g

Tags

#git#worktrees#parallel#agentic-methodology#branch-isolation

Related skills

Verify claims, push back with evidence when wrong, apply instantly when right.

🔄 Agentic Methodology·~20m