prepare-worktree

Prepare and synchronize Git worktrees with selective local-context files.

6|Updated Jul 9, 2019
One-click install
npx skills add https://github.com/sluongng/dotfiles --skill prepare-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prepare-worktree
Source: https://github.com/sluongng/dotfiles/tree/main/config/claude/skills/prepare-worktree
Command: npx skills add https://github.com/sluongng/dotfiles --skill prepare-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Prepare or audit Git worktrees for Claude automation, scheduled/background agents, long-running tasks, or isolated branch work. Use when Claude needs to create a worktree, refresh a worktree, make a worktree ready for unattended execution, or replicate local-only context such as AGENTS.md, user.bazelrc, .bazelrc.user, .buckconfig.local, credentials-backed build config, editor/tooling config, or repo-specific ignored files from a primary checkout.

Core Features & Use Cases

  • Prepare a secondary worktree from a primary checkout while preserving the main repo state.
  • Link or mirror local context files (AGENTS.md, user.bazelrc, .bazelrc.user, .buckconfig.local) into target worktrees in a safe, idempotent way.
  • Validate readiness and provide dry-run mode to audit changes before applying.

Quick Start

Ask Claude to prepare or audit a target worktree by using the script to link necessary local context files from the primary checkout.

Frequently Asked Questions about prepare-worktree

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

FAQPage Schema
How do I prepare a Git worktree for automated tasks?

To prepare a Git worktree for automated tasks, you can use a script to mirror a primary checkout into a target worktree. This process applies idempotent linking of selective local-context files while preserving the main repository state for isolated execution.

Can I link local-only ignored files into a secondary Git worktree?

Yes, you can link local-only ignored files into a secondary Git worktree. The Skill safely mirrors local context such as AGENTS.md, user.bazelrc, and editor configs from a primary checkout into the target worktree using idempotent linking.

Does Git worktree preparation support dry-run validation?

Git worktree preparation supports dry-run validation to audit changes before applying them. This mode allows you to validate the readiness of the target worktree and review which local context files will be linked without modifying the file system.

What is the best way to synchronize local context across multiple Git worktrees?

The best way to synchronize local context across multiple Git worktrees is using idempotent linking via a dedicated script. This approach replicates repo-specific ignored files and credentials-backed build configs from a primary checkout to target worktrees safely.

Why does my background agent fail to build in an isolated Git worktree?

A background agent might fail to build in an isolated Git worktree because local-only context files are missing. Preparing the worktree by linking necessary configuration files like .bazelrc.user or .buckconfig.local from the primary checkout resolves this.