worktree-sync

Sync untracked .claude configuration files across active Git worktrees.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/rjskene/pipeline --skill worktree-sync-rjskene
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-sync
Source: https://github.com/rjskene/pipeline/tree/main/skills/worktree-sync
Command: npx skills add https://github.com/rjskene/pipeline --skill worktree-sync-rjskene

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It prevents drift and broken local tooling by ensuring untracked .claude/ files are present and up to date in every active Git worktree.

Core Features & Use Cases

  • Worktree-wide synchronization: Prunes orphaned branches, scans active worktrees, and aligns their untracked .claude/ contents with the canonical version.
  • Diff-based copy and update: Detects missing or outdated files inside .claude/ and copies the needed updates to affected worktrees.
  • Setup health reporting: Produces a clear report of sync outcomes so you can verify installation status across environments.

Quick Start

Ask the assistant to run the worktree sync to copy missing or outdated .claude/ files into all active worktrees and report the health of your setup.

Frequently Asked Questions about worktree-sync

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

FAQPage Schema
How do I sync untracked .claude configuration files across all active Git worktrees?

To sync untracked .claude configuration files across Git worktrees, execute the sync-worktrees.sh flow which prunes orphaned branches, scans active worktrees, diffs .claude content, performs targeted copies, and reports sync outcomes to ensure consistent local behavior.

Why does my Claude hooks configuration drift when using multiple Git worktrees?

Configuration drift occurs because untracked .claude/ files are not automatically copied between active Git worktrees. This Skill resolves the issue by detecting missing or outdated files inside .claude/ and copying needed updates to affected worktrees.

Can I automate .claude settings synchronization for multi-worktree development?

Yes, you can automate .claude settings synchronization by asking the assistant to run the worktree sync. This automatically prunes orphaned branches, scans active worktrees, aligns untracked .claude/ contents, and reports installation status across environments.

Does worktree-sync require sourcing pipeline.config to resolve script paths?

Yes, worktree-sync requires sourcing pipeline.config and resolving CLAUDE_PLUGIN_ROOT to ensure reliable script paths before executing the sync-worktrees.sh flow that prunes, scans, diffs .claude content, performs targeted copies, and reports results.

How does the diff-based copy mechanism update outdated .claude artifacts in Git worktrees?

The diff-based copy mechanism updates outdated .claude artifacts by scanning active Git worktrees, comparing their untracked .claude/ contents against a canonical version, detecting missing or outdated files, and performing targeted copies to align affected worktrees.

What is the best way to keep .claude settings consistent across worktrees?

The best way to keep .claude settings consistent across worktrees is running the sync-worktrees.sh flow, which prunes orphaned branches, aligns untracked .claude/ contents with the canonical version, and produces a clear report of sync outcomes for verification.