preparing-worktrees

Create isolated git worktrees with automatic branch creation and project setup.

Updated Dec 15, 2019
One-click install
npx skills add https://github.com/matsuyoshi30/dotfiles --skill preparing-worktrees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preparing-worktrees
Source: https://github.com/matsuyoshi30/dotfiles/tree/main/.agents/skills/preparing-worktrees
Command: npx skills add https://github.com/matsuyoshi30/dotfiles --skill preparing-worktrees

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates a safe, isolated workspace for feature work by wiring up a dedicated git worktree that persists across agent dispatches and keeps the base branch clean.

Core Features & Use Cases

  • Isolated Worktrees: prioritizes a project-local worktree directory (.wt/ first, then .worktrees/, then worktrees/) to reduce risk of contaminating the main working tree.
  • Automated project setup: detects common project files (package.json, Cargo.toml, pyproject.toml, requirements.txt, go.mod, Gemfile, etc.) and runs the appropriate setup commands automatically.
  • Persistent across sessions: supports long-running feature work across multiple agent runs and integrates with devflow Step 4, isolation gate.

Quick Start

Create an isolated git worktree for a feature on a new branch and run the project setup automatically.

Frequently Asked Questions about preparing-worktrees

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

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

To create an isolated git worktree, the tool automatically selects a project-local directory like .wt/ or worktrees/, creates a new branch, and sets up a reusable workspace. This keeps your main working tree clean and prevents branch contamination during feature development.

Why use a project-local directory for git worktrees instead of the default location?

Using a project-local directory for git worktrees reduces the risk of contaminating the main working tree. The tool prioritizes .wt/ first, then .worktrees/, then worktrees/, and performs gitignore safety checks to ensure your isolated workspace remains secure and persistent across sessions.

Can I automatically run project setup commands when creating a new git worktree?

Yes, the tool detects common project files like package.json, Cargo.toml, pyproject.toml, requirements.txt, go.mod, and Gemfile. Upon creating the git worktree, it automatically runs the appropriate project setup commands to prepare the isolated workspace for immediate development.

What's the best way to manage persistent workspaces across multiple agent sessions?

Managing persistent workspaces across multiple agent runs is handled by wiring up a dedicated git worktree that persists across sessions. This approach supports long-running feature work by integrating with devflow isolation gates, ensuring the base branch remains clean and the workspace state is preserved.

Does this git worktree automation work with my existing project configuration files?

The automation works with existing project configuration files by detecting manifests like package.json, Cargo.toml, pyproject.toml, requirements.txt, go.mod, and Gemfile. It uses these detected files to determine and execute the correct project setup commands automatically within the new worktree.

Do I need to manually configure gitignore before setting up a project-local worktree?

Manual gitignore configuration is not strictly required because the tool performs automatic gitignore safety checks when selecting project-local locations like .wt/. However, ensuring your gitignore is correctly configured helps maintain a safe and isolated workspace for your feature branches.