simon-worktree

Creates isolated git worktrees so parallel Claude Code sessions avoid branch conflicts.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Simon-YHKim/eject-button --skill simon-worktree-simon-yhkim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simon-worktree
Source: https://github.com/Simon-YHKim/eject-button/tree/main/.claude/skills/simon-worktree
Command: npx skills add https://github.com/Simon-YHKim/eject-button --skill simon-worktree-simon-yhkim

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running multiple Claude Code sessions on the same repository without isolation causes commit collisions, tangled builds, and merge conflicts when two sessions touch the same branch. This Skill sets up git worktree isolation so each parallel session works in its own directory and branch. ## Core Features & Use Cases - Worktree Provisioning: Creates named worktrees (<repo>-<feature> directories with feat/<feature> branches) for each parallel task. - Environment Handling: Guides .env management via symlink or per-worktree copy, node_modules reinstallation, and per-worktree database separation to avoid migration timestamp collisions. - Cleanup Discipline: Provides safe teardown with git worktree remove, branch deletion, and orphan detection via git worktree list and prune. - Use Case: You want to develop an auth feature and a billing feature simultaneously. The Skill creates myapp-auth and myapp-billing worktrees, assigns a separate Claude session to each, and keeps the main worktree commit-free except through PRs. ## Quick Start Ask the agent to set up git worktrees so you can run two Claude sessions in parallel on separate features of this repository.

Frequently Asked Questions about simon-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run multiple Claude Code sessions on the same repo in parallel?

Create a separate git worktree per task with `git worktree add ../repo-feature -b feat/feature`, then assign each worktree its own Claude session. Each session commits only to its own branch, preventing commit conflicts and build tangles.

How do I handle .env files across multiple git worktrees?

Copy the .env into each worktree or symlink it with `ln -sf ../repo/.env .env` when worktrees share a parent directory. Verify .env stays in .gitignore in every worktree, and use different DATABASE_URL values if worktrees need separate databases.

Can two git worktrees share the same node_modules?

Generally each worktree runs its own `npm install` after creation. Advanced setups can use pnpm with a shared workspace lockfile, but the default and safest approach is independent dependency installation per worktree.

What happens if two worktrees run database migrations on the same database?

Migration timestamp prefixes can collide when two worktrees migrate the same database. The recommended fix is giving each worktree its own local database, for example with separate Supabase project instances.

How do I clean up git worktrees after merging a feature branch?

From the main worktree run `git worktree remove ../repo-feature`, then delete the local branch with `git branch -d feat/feature`. Verify nothing is left behind with `git worktree list` and `git worktree prune`.

When should I not use git worktrees for parallel work?

Avoid worktrees when two tasks must edit the same shared files like package.json simultaneously, since that creates merge conflicts regardless of isolation. Also never run `git worktree remove --force` without confirming uncommitted changes can be discarded.