Skip to content

t1k:worktree

FieldValue
Modulet1k-maintainer
Version2.18.3
Effortlow
Tools

Keywords: branch, isolation, monorepo, parallel, rebase, workspace, worktree

/t1k:worktree
<subcommand> [args] — subcommands: create, session, sync, envsync, diff, status, list, remove, info, merge

Manage git worktrees across the full lifecycle: create, session, sync, envsync, diff, status, remove, merge.

All commands: node $HOME/.claude/skills/t1k-worktree/scripts/worktree.cjs <command> [args] [--json] [--dry-run]

CommandUsageDescription
createcreate [project] <feature> --prefix <type>Create worktree with branch
removeremove <name-or-path>Remove worktree and branch
sessionsession <name-or-path>Get session command for worktree
syncsync [--worktree <name>]Rebase worktrees from base branch
envsyncenvsync [--source <path>] [--exclude <name>] [--dry-run]Sync .env files across worktrees
diffdiff [--worktree <name>]Diff status per worktree vs base
statusstatusCombined overview of all worktrees
infoinfoRepo info, worktree location
listlistList all worktrees
mergemerge [--target <branch>] [--delete] [--no-reset]Merge worktree branch to base via PR

Decision tree — which reference do I load?

Section titled “Decision tree — which reference do I load?”

Load only the reference you need (each is self-contained):

IntentLoad
Create a new worktree (or check if one exists first)references/workflow-create.md
Open or switch to an existing worktree sessionreferences/workflow-session.md
Rebase worktrees onto latest base branchreferences/workflow-sync.md
Sync .env files across worktrees / check compose driftreferences/workflow-envsync.md
Inspect changes, ahead/behind, statusreferences/workflow-diff-status.md
Merge worktree branch back to base via PRreferences/workflow-merge.md
Before/after reporting format for any commandreferences/reporting-protocol.md

Intent routing (MANDATORY): Always run list --json before asking the user anything — a matching worktree name means jump straight to the session workflow.

Safety: Rebase auto-aborts on conflict to prevent data loss.

Reporting: Every command MUST show before/after state. End with a summary line. Full format: references/reporting-protocol.md.