isolating-worktrees

Enforce Git worktree isolation and verify directories before operations.

4|1|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/bacchus-labs/wrangler --skill isolating-worktrees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: isolating-worktrees
Source: https://github.com/bacchus-labs/wrangler/tree/main/.wrangler/memory/knowledge-base/reference-prompts/skills/isolating-worktrees
Command: npx skills add https://github.com/bacchus-labs/wrangler --skill isolating-worktrees

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents accidental changes from "bleeding" between Git worktrees and the main branch, ensuring your development stays organized and safe.

Core Features & Use Cases

  • Worktree Verification: Enforces that all Git operations occur within the intended worktree.
  • Subagent Context: Ensures subagents correctly operate within the specified worktree.
  • Use Case: When developing a new feature in a separate worktree, this skill guarantees that all your commits and changes are confined to that feature branch, preventing accidental commits to main.

Quick Start

Use the isolating-worktrees skill to ensure all git operations are confined to the specified worktree.

Frequently Asked Questions about isolating-worktrees

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

FAQPage Schema
How do I prevent accidental commits from bleeding into the main git branch?

To prevent accidental commits to the main git branch, you can enforce strict isolation for changes made within Git worktrees. This approach verifies the current directory before every Git operation, ensuring development stays organized and safe.

How do I ensure subagents maintain the correct git worktree context?

To ensure subagents maintain the correct git worktree context, you can enforce strict isolation that manages context loss in subagents. This guarantees that subagents correctly operate within the specified worktree during development.

What is the best way to isolate feature development in a separate git worktree?

The best way to isolate feature development in a separate git worktree is to enforce strict isolation for changes, requiring explicit chaining of commands or use of the `-C` flag for all Git operations to prevent data leakage.

Do I need to use the -C flag for all git operations within a worktree?

Yes, you need to use the `-C` flag or explicitly chain commands for all Git operations within a worktree. This enforces strict isolation and verifies the current directory before every Git operation to prevent data leakage.

Why does my git worktree context get lost when using subagents?

Git worktree context gets lost in subagents due to context management issues during complex development workflows. You can enforce strict isolation that specifically manages context loss in subagents to resolve this data leakage problem.