worktree-isolation
CommunityKeep changes in the right worktree.
Authorsamjhecht
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Git worktrees enable isolated workspaces, but Claude Code's Bash invocations can reset or misalign the working directory, causing changes to bleed into the main branch. This Skill provides explicit verification protocols and command patterns to ensure all changes stay contained within the intended worktree.
Core Features & Use Cases
- Mandatory pre-flight verification before any git operation to confirm current worktree
- Patterned command chaining (cd && git ...) to preserve context across tool invocations
- Use of absolute paths (git -C /path/to/worktree ... or cd to path first)
- Clear prompts for subagents to preserve execution context and prevent bleed
Quick Start
- Announce usage: "Using Skill: worktree-isolation | [context-specific purpose]"
- Always run commands in the target worktree, e.g.: cd /path/to/worktree && git status
- Before write operations, print verification details (current directory, git root, branch) and STOP if mismatched
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: worktree-isolation Download link: https://github.com/samjhecht/wrangler/archive/main.zip#worktree-isolation Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.