- Home
- Skills
- Workflow Automation
- Git Worktree Manager
Works with the AI tools you already use
Git Worktree Manager
Stash, switch, lose your build cache, forget what you stashed — the branch-juggling tax that worktrees were built to eliminate.
$8.99
Git Worktree Manager
Example session with this skill installed
I want to run three Claude Code agents in parallel on our pnpm monorepo (Next.js web app plus a Node API, Postgres in Docker). Right now they all share one checkout and keep overwriting each other's changes and ports.
- Read your context and instructions
- Compiled the git worktree manager
Worktree setup for three parallel agents: one checkout per agent, isolated ports and databases, fixed branch names and a cleanup routine.
Directory layout
~/code/shop/ main checkout, you only
~/code/shop-wt/agent-1/ worktree, branch agent/1-<task>
~/code/shop-wt/agent-2/
~/code/shop-wt/agent-3/
Create a worktree
git worktree add ../shop-wt/agent-1 -b agent/1-checkout-refactor origin/main
cd ../shop-wt/agent-1 && pnpm install --frozen-lockfile
Per-worktree environment
Each worktree gets its own .env.local (git-ignored):
WEB_PORT=3101 # agent-2: 3201, agent-3: 3301
API_PORT=4101
DATABASE_URL=postgres://dev:dev@localhost:5432/shop_agent1
COMPOSE_PROJECT_NAME=shop_agent1
Keep one Postgres container and give each agent its own database, created by a seed script.
Branch conventions
agent/<n>-<short-task>, always branched from freshorigin/main.- Agents commit only in their own worktree; you merge through PRs.
- Never check out the same branch in two worktrees.
Cleanup
git worktree remove ../shop-wt/agent-1
git branch -d agent/1-checkout-refactor
dropdb shop_agent1
git worktree prune
Next steps
- Add a
scripts/wt-new.shthat creates the worktree, env file and database in one step. - Add
shop-wt/paths to your agents' allowed working directories.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Stash, switch, lose your build cache, forget what you stashed — the branch-juggling tax that worktrees were built to eliminate. Most developers know worktrees exist; almost none use them well because the workflow isn't obvious. This skill manages your worktree setup end-to-end: creating and naming worktrees for concurrent branches, setting up the right directory structure so each worktree has its own node_modules and build cache, handling shared vs. isolated config, and cleaning up safely when you're done. It also helps you design a multi-worktree workflow for your specific project — hotfix alongside feature work, review alongside active development, without context-switching cost. Give it your repo structure and your current branch situation; it returns a worktree setup you can run immediately.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 3 months ago
- Passed all security checks, Safe to install