One-click install
npx skills add https://github.com/hschne/pi-stuff --skill worktree-hschne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree
Source: https://github.com/hschne/pi-stuff/tree/main/skills/worktree
Command: npx skills add https://github.com/hschne/pi-stuff --skill worktree-hschne

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually managing git worktrees for parallel development is time-consuming and prone to errors like uncommitted work loss or incorrect branch setup, this skill automates the entire workflow to reduce friction and risk.

Core Features & Use Cases

  • Full worktree lifecycle management: Automates creating, setting up, opening, and deleting git worktrees via a standardized helper script.
  • Flexible branch integration: Supports creating pull requests from worktree branches or merging changes directly into main with guided git workflows.
  • Built-in safety guardrails: Includes pre-work checks for leftover FIX comments and validation to prevent accidental loss of uncommitted changes during cleanup. Use case example: A developer working on a new feature can use this skill to spin up an isolated worktree, complete their work, and merge changes back to main without disrupting their primary working directory or losing progress.

Quick Start

Use the worktree skill to create a new isolated worktree for the 'improve login flow' feature, set it up, and open it in your terminal for development.

Frequently Asked Questions about worktree

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

FAQPage Schema
How do I manage git worktrees for parallel development without losing uncommitted changes?

Git worktree management automates creating isolated environments for parallel branches. Built-in safety guardrails validate uncommitted work during cleanup, preventing accidental data loss when switching between feature development, bug fixes, or code reviews.

What is the best way to automate git worktree creation and cleanup?

Automating git worktree creation and cleanup uses a standardized helper script to handle the full lifecycle. This eliminates manual, error-prone branch setup and ensures safe removal of isolated working directories after merging feature branches back to main.

How do I set up a git worktree for a new feature branch?

Setting up a git worktree for a feature branch involves running a helper command that creates an isolated working directory, configures the environment, and opens it for development. This allows parallel work without disrupting the primary main working directory.

Can I create a pull request directly from a git worktree branch?

Yes, you can create pull requests directly from git worktree branches. The workflow supports flexible branch integration, allowing you to either submit a pull request for code review or merge changes directly into the main branch.

Does git worktree management work for bug fixes and code reviews without switching context?

Git worktree management works for bug fixes and code reviews by providing isolated environments. You can address issues or review code in a separate working directory without switching context or branches in your primary development environment.