dt:local-worktree

Create an isolated local git worktree branch with merge whitelist scripts.

1|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/adzcsx2/dev-tools-skills --skill dt-local-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dt:local-worktree
Source: https://github.com/adzcsx2/dev-tools-skills/tree/main/skills/local-worktree
Command: npx skills add https://github.com/adzcsx2/dev-tools-skills --skill dt-local-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps to create a separate local development worktree from an existing repository, allowing AI-driven development without affecting the original branch.

Core Features & Use Cases

  • Isolated Worktree: Create a separate worktree from the original repository for AI-driven development.
  • Project Initialization: Execute dt:init within the worktree to set up project configurations.
  • Readme Rewrite: Rewrite the README to exclude AI context files from being pushed.
  • Merge Whitelist: Provide a script to merge only the source code into the original repository.
  • Use Case: If you need to initialize a project with AI tools without affecting the main branch, this Skill creates a separate worktree to do so.

Quick Start

Run the following command to create a local worktree from the given repository path:

/dt:local-worktree /path/to/remote-myproj

Frequently Asked Questions about dt:local-worktree

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

FAQPage Schema
How do I isolate a git worktree for AI-driven development without affecting the main branch?

You isolate a git worktree by creating a separate local branch from an existing repository using a dedicated command. This allows AI tools to modify code independently without affecting the original branch until you explicitly sync changes.

How do I prevent AI context files from being pushed to the remote repository?

Preventing AI context files from being pushed is handled by rewriting the README and using git hooks. These hooks enforce push prevention, ensuring that AI-specific configuration files remain isolated to the local worktree.

Can I use this worktree setup with Claude Code or VS Code Copilot?

Yes, this isolated worktree setup is explicitly suitable for AI-driven development environments like Claude Code and VS Code Copilot. It provides a safe sandbox for these tools to operate without risking your main codebase.

How do I merge only the source code from the AI worktree back to the original repo?

To merge only the source code back, you use a provided whitelist merge script. This script selectively syncs your validated code changes into the original repository while excluding unwanted AI-generated context files.

Do I need to run project initialization inside the new git worktree?

Yes, you need to execute the `dt:init` command within the newly created worktree to set up project configurations. This ensures the isolated environment is properly initialized for AI-driven maintenance.