AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Worktree

skill-abhattacherjee-claude-code-skills-worktree · by abhattacherjee

Creates isolated git worktrees for parallel Claude Code sessions, each on its own branch. Use when: (1) /worktree command, (2) user wants to work on multiple branches simultaneously, (3) user has multiple Claude Code sessions conflicting on the same branch, (4) user asks to set up parallel development.

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add skill-abhattacherjee-claude-code-skills-worktree

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-abhattacherjee-claude-code-skills-worktree)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Worktree? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Git Worktree for Parallel Sessions

Problem

Multiple Claude Code sessions sharing one working directory fight over the same branch. Git worktrees give each session its own directory and branch while sharing the same repo.

Quick Reference

# From the repo root:
~/.claude/skills/worktree/scripts/setup-worktree.sh list                                  # Show worktrees + branches
~/.claude/skills/worktree/scripts/setup-worktree.sh create feature/story-10.11             # Existing branch
~/.claude/skills/worktree/scripts/setup-worktree.sh create --new story-10.12-new-feature   # New branch from develop
~/.claude/skills/worktree/scripts/setup-worktree.sh remove feature/story-10.11             # Clean up
~/.claude/skills/worktree/scripts/setup-worktree.sh --help                                 # Full usage

Workflow

When invoked, follow these steps:

Step 1: Show current state

Run the list command to show existing worktrees and available branches.

Step 2: Ask the user what they want

Use AskUserQuestion with options based on what list returned:

  • Create worktree for an existing feature branch
  • Create a new feature branch + worktree
  • Remove an existing worktree

Step 3: Execute

Run the appropriate script command. The script handles:

  • Creating the worktree directory as a sibling (e.g., ../repo-name--branch-suffix/)
  • Fetching from remote if needed
  • Running npm install in backend/frontend/mcp-events-server if node_modules is missing

Step 4: Tell the user what to do next

The script outputs the exact cd + claude command. Relay this clearly.

Naming Convention

Worktree directories are created as siblings of the repo root:

parent-dir/
  repo-name/                          # Main working directory
  repo-name--story-10.11-view/        # Worktree for feature/story-10.11-view
  repo-name--story-10.12-new/         # Worktree for feature/story-10.12-new

Notes

  • Each worktree has its own node_modules — the script installs them automatically
  • A branch checked out in one worktree CANNOT be checked out in another (git enforces this)
  • Worktrees share the same .git history — commits are visible across all worktrees
  • Use git worktree remove (or the script's remove command) to clean up when done

See Also

  • GitHub: https://github.com/abhattacherjee/worktree — install instructions, changelog, license

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.