se-worktree

Create isolated git worktrees under .worktrees for parallel feature development.

Updated May 7, 2026
One-click install
npx skills add https://github.com/simonwjackson/pi-software-engineering --skill se-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: se-worktree
Source: https://github.com/simonwjackson/pi-software-engineering/tree/main/skills/se-worktree
Command: npx skills add https://github.com/simonwjackson/pi-software-engineering --skill se-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Create isolated git worktrees to develop features or review pull requests without altering the main checkout, including environment file handling and branch-aware safety rules.

Core Features & Use Cases

  • Isolated worktrees created under .worktrees/<branch> with branch-specific setup
  • Copies environment files such as .env and .env.local from the main repo, skipping .env.example
  • Adds .worktrees to the root .gitignore to prevent clutter and ensure clean git status
  • Performs branch-aware trust for dev-tools like mise and direnv, auto-trusting trusted bases or prompting for manual review
  • Uses the provided script to manage worktree lifecycle without touching the current checkout

Quick Start

Run the bundled script to create a new worktree for your feature branch.

Frequently Asked Questions about se-worktree

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

FAQPage Schema
How do I create an isolated git worktree for parallel feature development?

To create an isolated git worktree, run the bundled script which fetches your feature branch from origin and sets up a per-branch worktree under the .worktrees directory. This enables parallel development without altering your main checkout.

What is the best way to review pull requests without affecting my main git checkout?

Using git worktrees is the best way to review pull requests safely. The script creates an isolated worktree under .worktrees, fetches the PR branch from origin, and configures the environment so your main checkout remains completely untouched.

How do I copy .env files when setting up a new git worktree?

When setting up a new git worktree, the script automatically copies environment files such as .env and .env.local from the main repository into the new worktree directory. It skips .env.example files to ensure your local secrets are available.

Does this worktree automation handle dev-tools trust configurations like mise and direnv?

Yes, the worktree automation handles dev-tools trust by applying branch-aware safety rules. It automatically trusts configurations from trusted bases or prompts you for manual review when setting up isolated worktrees for tools like mise and direnv.

Can I prevent .worktrees directories from cluttering my git status?

Yes, you can prevent .worktrees from cluttering your git status. The script automatically adds the .worktrees directory to your root .gitignore file, ensuring the new worktree folders do not appear as untracked files in your main repository.

Why should I use isolated worktrees instead of stashing changes for branch switching?

Isolated worktrees allow you to maintain separate working directories for each branch simultaneously, preventing context loss from stashing. They include branch-specific .env files and dev-tool trust configurations, allowing you to test changes in parallel without checkout conflicts.