worktree-manager
Skill315 starsChanged 10 months agoApache-2.0View on GitHub
Create, list, switch to, rename, delete, and manage notes for git worktrees using lazyworktree CLI
10 other projects use a version of this.
Adopted by
Most recently taken up by
- kanopi/cms-cultivatortheir own version, first seen Nov 1, 2026
- kopp0510/claude-ddtheir own version, first seen Oct 30, 2026
- alessiogarifo92/claude-skillstheir own version, first seen Oct 25, 2026
- IGTA-Tech/claude-skills-researchtheir own version, first seen Oct 3, 2026
- jtsang4/efficient-codingtheir own version, first seen Sep 12, 2026
- TarasShyn/skillstheir own version, first seen Aug 30, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- microsoft/WindowsAppSDK★ 4.7ksame name
- Wirasm/worktree-manager-skill★ 138same name
- kanopi/cms-cultivator★ 17same name
- kopp0510/claude-dd★ 12same name
- TarasShyn/skills★ 5same name
- IGTA-Tech/claude-skills-research★ 2same name
- jtsang4/efficient-coding★ 2same name
- miptah21/skills★ 2same name
- vlting/claude-skills★ 2same name
- alessiogarifo92/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- commit-helperSkill
- deep-analyseSkill
- design-syncSkill
- docs-drift-reviewSkill
- doc-syncSkill
- sanity-checkSkill
- theme-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 7 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 79
All create commands print the created worktree path to stdout on success.
- Very specific: line 103
Use exec to run commands in a specific worktree without changing directory:
- Distinctive: line 166
When the user asks to create a worktree:
- Very specific: line 169
Run the appropriate lazyworktree create --silent command
- Very specific: line 172
If the user wants to work in it immediately, use lazyworktree exec -w <name> for subsequent commands
- Distinctive: line 174
When the user asks to switch to a worktree:
- Very specific: line 176
Run lazyworktree list --json to find available worktrees
- Distinctive: line 181
When the user asks to list worktrees:
- Very specific: line 183
Run lazyworktree list --json and present the results
- Distinctive: line 186
When the user asks to rename a worktree:
- Very specific: line 188
Run lazyworktree list --json to identify the worktree
- Distinctive: line 192
When the user asks to view or edit worktree notes:
- Distinctive: line 198
When the user asks to delete a worktree:
- Very specific: line 200
Run lazyworktree list --json to show current worktrees
- Very specific: line 209
Use exec -w to run commands in a worktree without changing your shell's working directory
- Very specific: line 210
If the user says "switch to" or "work in" a worktree, prefer using exec -w for running commands there and inform the user of the path for …
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Worktree Management
Manage git worktrees for the current repository using the lazyworktree CLI.
Current Worktrees
!lazyworktree list --json
Current Working Directory
!pwd
Current Branch
!git branch --show-current
Available Operations
Create a Worktree
From the current branch (new feature work):
# Auto-generated name (branch-adjective-noun pattern, as the current branch is already checked out)
lazyworktree create --silent
# With a specific name
lazyworktree create --silent my-feature-name
# Carry over uncommitted changes to the new worktree
lazyworktree create --silent --with-change my-feature-name
# Check out an existing branch directly (falls back to a generated branch if already checked out)
lazyworktree create --silent --from-branch feature/x
# New branch from a specific branch
lazyworktree create --silent --from-branch main my-feature-nameFrom a GitHub/GitLab PR:
lazyworktree create --silent --from-pr 42
# Create a local branch from a PR without creating a worktree
lazyworktree create --silent --from-pr 42 --no-workspaceFrom a GitHub/GitLab issue:
lazyworktree create --silent --from-issue 123
# Optionally specify a base branch
lazyworktree create --silent --from-issue 123 --from-branch main
# Create a local branch from an issue without creating a worktree
lazyworktree create --silent --from-issue 123 --no-workspaceAuto-generate worktree name from branch:
lazyworktree create --silent --generateRun a command after creation:
lazyworktree create --silent --from-branch main my-feature --exec "npm install"All create commands print the created worktree path to stdout on success.
List Worktrees
# JSON output (for parsing)
lazyworktree list --json
# Paths only (one per line)
lazyworktree list --pristine
# Show only the main branch worktree
lazyworktree list --main
# Human-readable table
lazyworktree listAlias: lazyworktree ls is equivalent to lazyworktree list.
JSON fields: path, name, branch, is_main, dirty, ahead, behind, unpushed, last_active.
Run Commands in a Worktree
Use exec to run commands in a specific worktree without changing directory:
# By worktree name or path
lazyworktree exec -w my-feature-name "make build"
lazyworktree exec -w /path/to/worktree "make build"
# Auto-detect worktree from current directory (no -w needed)
cd /path/to/my-feature && lazyworktree exec "git status"
# Run any shell command
lazyworktree exec -w my-feature-name "go test ./..."
# Trigger a custom command key instead of a shell command
lazyworktree exec -w my-feature-name --key tNote: --key and a command argument are mutually exclusive.
Rename a Worktree
# Rename current worktree (auto-detected from cwd)
lazyworktree rename --silent new-name
# Rename a specific worktree
lazyworktree rename --silent my-feature-name new-nameWorktree Notes
# Show the note for the current worktree (auto-detected from cwd)
lazyworktree note show
# Show the note for a specific worktree
lazyworktree note show my-feature-name
# Edit a worktree note (opens editor)
lazyworktree note edit my-feature-name
# Set a note from a file (use '-' for stdin)
lazyworktree note edit my-feature-name --input notes.md
echo "my note" | lazyworktree note edit my-feature-name --input -Delete a Worktree
# Delete worktree and its branch (if names match)
lazyworktree delete --silent my-feature-name
# Delete worktree but keep the branch
lazyworktree delete --silent --no-branch my-feature-name
# Auto-detect worktree from cwd (positional arg is optional)
cd /path/to/worktree && lazyworktree delete --silentWorkflow Instructions
When the user asks to create a worktree:
- Determine the source: current branch, a specific branch, a PR number, or an issue number
- Run the appropriate
lazyworktree create --silentcommand - Capture the output path
- Report the created worktree path to the user
- If the user wants to work in it immediately, use
lazyworktree exec -w <name>for subsequent commands
When the user asks to switch to a worktree:
- Run
lazyworktree list --jsonto find available worktrees - Identify the target by name, branch, or path
- For running commands in the target worktree, use:
lazyworktree exec -w <name> "<command>" - Tell the user they can switch their shell with:
cd <path>
When the user asks to list worktrees:
- Run
lazyworktree list --jsonand present the results - Highlight dirty worktrees, ahead/behind status, and last active times
When the user asks to rename a worktree:
- Run
lazyworktree list --jsonto identify the worktree - Run
lazyworktree rename --silent <old-name> <new-name> - Report the new name to the user
When the user asks to view or edit worktree notes:
- To view:
lazyworktree note show <name>(omit name to use cwd) - To set from a string:
echo "content" | lazyworktree note edit <name> --input - - To set from a file:
lazyworktree note edit <name> --input path/to/file
When the user asks to delete a worktree:
- Run
lazyworktree list --jsonto show current worktrees - Confirm which worktree to delete
- Run
lazyworktree delete --silent <name>
Important Notes
- The
--silentflag suppresses progress messages to stderr; stdout still contains the result path - Worktree names are automatically sanitised (special characters replaced with hyphens)
- The main worktree cannot be deleted
- Use
exec -wto run commands in a worktree without changing your shell's working directory - If the user says "switch to" or "work in" a worktree, prefer using
exec -wfor running commands there and inform the user of the path for manualcd
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

