worktree-list
Skill0 starsChanged 9 months agoMITView on GitHub
Shows all active git worktrees with their associated topics, branches, and status. Use when reviewing active worktrees or checking what work is in progress.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- leessju/claude-skillstheir own version, first seen Apr 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- leessju/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 repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adr-createSkill
- dev-log-rotateSkill
- discovery-startSkill
- gather-insightSkill
- git-commitSkill
- init-projectSkill
- insight-captureSkill
- jira-startSkill
- review-implementationSkill
- session-endSkill
- session-listSkill
- session-startSkill
- team-stream-startSkill
- work-stream-startSkill
- worktree-endSkill
- worktree-removeSkill
- worktree-startSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Before removing a worktree, to see options
- Very specific: line 47
Check if .claude-worktree-context.md exists at that path
- Distinctive: line 48
If yes, read and extract:
- Distinctive: line 52
If no context file, mark as "No context file"
- Distinctive: line 120
Check if we're in a git repository
- Distinctive: line 124
Don't fail the entire list
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Worktree List Skill
Displays all active git worktrees with their associated topics and status information.
When to Use
Activate this skill when:
- User wants to see active worktrees
- User says "list worktrees", "show worktrees", or "what worktrees do I have"
- User wants to check what implementation work is in progress
- Before removing a worktree, to see options
Instructions
Step 1: Get Git Worktree List
Run:
git worktree listThis returns output like:
/path/to/main-repo abc1234 [main]
/path/to/feature-auth def5678 [feature-auth]
/path/to/bugfix-login ghi9012 [bugfix-login]Step 2: Parse Worktree Information
For each line in the output:
- Extract path (first column)
- Extract commit hash (second column)
- Extract branch name (in brackets)
- Identify which is the main worktree (typically the one matching current directory pattern)
Step 3: Read Context Files
For each non-main worktree:
- Check if
.claude-worktree-context.mdexists at that path - If yes, read and extract:
- Topic name
- Created date
- Purpose (first line of Purpose section)
- If no context file, mark as "No context file"
Step 4: Check Worktree Status
For each non-main worktree, optionally run:
git -C "[worktree-path]" status --porcelainThis shows if there are uncommitted changes:
- Empty output = clean
- Non-empty = has uncommitted changes
Step 5: Display Formatted List
Show the information in a clear format:
Git Worktrees
=============
Main Repository:
/path/to/main-repo
Branch: main
Status: Clean
Active Worktrees:
-----------------
1. feature-auth
Path: ../feature-auth
Branch: feature-auth
Topic: User Authentication
Created: 2026-01-08
Status: Clean
Purpose: Implement JWT authentication
2. bugfix-login
Path: ../bugfix-login
Branch: bugfix-login
Topic: Login Bug Fix
Created: 2026-01-05
Status: Has uncommitted changes
Purpose: Fix login redirect issue
-----------------
Total: 2 active worktreesIf no worktrees (besides main):
Git Worktrees
=============
Main Repository:
/path/to/main-repo
Branch: main
No active worktrees.
To create a worktree, run: /worktree-startError Handling
If git worktree list fails:
- Check if we're in a git repository
- Show error message with troubleshooting steps
If context file can't be read:
- Don't fail the entire list
- Show "Context file unreadable" for that worktree
- Continue with other worktrees
If worktree path doesn't exist:
- This indicates a stale worktree entry
- Note: "Path not found (may be stale)"
- Suggest running
git worktree prune
Examples
Example 1: Multiple Worktrees
User: "/worktree-list"
Output:
Git Worktrees
=============
Main Repository:
/path/to/my-project
Branch: main
Status: Clean
Active Worktrees:
-----------------
1. feature-auth
Path: ../feature-auth
Branch: feature-auth
Topic: User Authentication
Created: 2026-01-08
Status: Clean
2. api-refactor
Path: ../api-refactor
Branch: api-refactor
Topic: API Refactoring
Created: 2026-01-07
Status: Has uncommitted changes
-----------------
Total: 2 active worktrees
Tip: Use /worktree-remove to clean up finished worktrees
Use /worktree-end to merge and clean upExample 2: No Worktrees
User: "/worktree-list"
Output:
Git Worktrees
=============
Main Repository:
/path/to/my-project
Branch: main
No active worktrees.
To create a worktree, run: /worktree-startExample 3: Worktree Without Context File
User: "/worktree-list"
Output:
Git Worktrees
=============
Main Repository:
/path/to/my-project
Branch: main
Active Worktrees:
-----------------
1. experiment-branch
Path: ../experiment-branch
Branch: experiment
Topic: (no context file)
Status: Clean
-----------------
Total: 1 active worktree
Note: Worktree "experiment-branch" has no context file.
Consider adding .claude-worktree-context.md for better session-start integration.Notes
- This skill is read-only; it doesn't modify anything
- Main repository is always shown first
- Worktrees without context files are still listed
- Status check helps identify worktrees with unsaved work
- Stale worktrees (path doesn't exist) are flagged for cleanup
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.

