worktree-parallel

noah-rivard's avatarfrom noah-rivard

Create and manage a git worktree for parallel feature development, then open the new worktree in the editor (code/Cursor) for a second Codex session. Use when the user asks to work on another feature simultaneously, spin up a parallel workspace, or open a new worktree even if they do not mention worktree explicitly.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 7, 2026

When & Why to Use This Skill

The worktree-parallel skill automates the creation and management of Git worktrees, enabling developers to engage in parallel feature development without the friction of branch switching or stashing. By seamlessly setting up isolated workspaces and launching them in editors like VS Code or Cursor, it optimizes multitasking workflows and maintains development context across multiple branches.

Use Cases

  • Simultaneous Feature Development: Create a parallel workspace to start a new feature immediately while keeping your current work-in-progress active and untouched.
  • Efficient Hotfixing: Quickly spin up a separate worktree to address an urgent production bug without needing to stash or commit incomplete changes on your primary branch.
  • Isolated Code Reviews: Open a colleague's pull request in a dedicated worktree to run tests and review code in a clean environment while maintaining your own development state.
  • Parallel Testing: Run long-running test suites or builds in one worktree while continuing to write code in another, maximizing hardware utilization and reducing idle time.
nameworktree-parallel
descriptionCreate and manage a git worktree for parallel feature development, then open the new worktree in the editor (code/Cursor) for a second Codex session. Use when the user asks to work on another feature simultaneously, spin up a parallel workspace, or open a new worktree even if they do not mention worktree explicitly.

Worktree Parallel

Workflow

  1. Confirm the repo root (use current working directory unless the user specifies another repo).
  2. Determine a feature slug and branch name.
    • Default branch pattern: feat/<slug>.
    • If the user already has a branch name, use it.
  3. Choose a base directory for linked worktrees.
    • Default for this repo: ../<project_name>-wt (create it if missing).
  4. Create the worktree.
    • New branch: git worktree add -b feat/<slug> <base>/<slug>
    • Existing branch: git worktree add <base>/<slug> <branch>
  5. Open the worktree in the editor.
    • Use code -n <path> (Cursor supports the code CLI).
    • If code is unavailable, ask for the preferred editor command (e.g., cursor -n, code, or another).
  6. Suggest a parallel Codex session in the new worktree.
    • cd <path> && codex
  7. Confirm with git worktree list if needed.

Safety

  • Do not use --force unless the user explicitly asks.
  • Do not remove existing worktrees unless the user requests cleanup.

Optional Cleanup (only if asked)

  • git worktree remove <path>
  • git branch -d <branch>