worktrees
Skill49 starsChanged 10 months agoMITView on GitHub
Guide for using git worktrees to parallelize development with coding agents. Use this skill when the user requests to work in a new worktree or wants to work on a separate feature in isolation (e.g., "Work in a new worktree", "Create a worktree for feature X").
12 other projects use a version of this.
Adopted by
Most recently taken up by
- mifunedev/skillstheir own version, first seen Oct 3, 2026
- delorenj/skillstheir own version, first seen Oct 2, 2026
- domengabrovsek/agent-configtheir own version, first seen Oct 2, 2026
- akitaonrails/my-skillstheir own version, first seen Sep 17, 2026
- divanc/skillstheir own version, first seen Aug 5, 2026
- theyoungastronauts/polaristheir own version, first seen Aug 3, 2026
Used with
Projects with it also use reflect.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkillreflect
Learning capture system that extracts HIGH/MED/LOW confidence patterns from conversations to prevent repeating mistakes. Use after user corrections ("no", "wrong"), praise ("perfect", "exactly"), or when discovering edge cases. Complements .squad/agents/{agent}/history.md and .squad/decisions.md.
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 1
- nilecui/SkillsBase★ 27100% same
Edited · 0
None found.
Wrote their own version · 11
- akitaonrails/my-skills★ 205same name
- domengabrovsek/agent-config★ 17same name
- delorenj/skills★ 15same name
- theyoungastronauts/polaris★ 4same name
- divanc/skills★ 3same name
- hnikoloski/imlazy★ 3same name
- Joshua-Palamuttam/workbench-template★ 3same name
- darinh/copilot-tools★ 1same name
- hbollon/opencode-config★ 1same name
- mamachanko/skills★ 1same name
1 more not listed
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 repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- address-code-reviewSkill
- autoresearchSkill
- blueskySkill
- brainstormSkill
- code-reviewSkill
- collaborationSkill
- datastarSkill
- decisionsSkill
- design-docSkill
- diarySkill
- gardenSkill
- gitSkill
- gomponentsSkill
- goSkill
- marimoSkill
- nanobananaSkill
- observable-plotSkill
- save-web-pageSkill
- sqlSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
6
Distinctive
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 14
Use this skill when:
- Very specific: line 27
Create a new worktree in the .worktrees/ directory within the current project:
- Distinctive: line 50
All standard git operations (commit, push, pull, etc.) work normally within the worktree.
- Distinctive: line 52
Note: If this project runs services (web apps, docker-compose, etc.), see apps.md for setup steps including environment file copying, port …
- Distinctive: line 66
When you're done with a worktree, you can remove it:
- Distinctive: line 72
Note: Don't automatically remove worktrees.
- Distinctive: line 79
After creating and switching to a worktree, inform the user of the new working directory path
“Common” is measured: kept by at least 6 in 10 of the 11 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
Git Worktrees for Parallel Development
Overview
This skill enables parallel development by using git worktrees. Each worktree provides an isolated working directory with its own branch, allowing multiple agents to work on different features simultaneously without conflicts.
When to Use This Skill
Use this skill when:
- User explicitly requests to work in a new worktree (e.g., "Work in a new worktree")
- User wants to develop a feature in isolation while preserving the main working directory
- Multiple agents need to work on different tasks in parallel
Workflow
1. Determine Branch Name
Choose a descriptive branch name for the feature or task to be worked on. The branch name should follow standard git naming conventions (lowercase, hyphen-separated, e.g., add-user-authentication, fix-login-bug).
2. Create Worktree
Create a new worktree in the .worktrees/ directory within the current project:
git worktree add .worktrees/<branch-name> -b <branch-name>This command:
- Creates a new directory at
.worktrees/<branch-name> - Creates and checks out a new branch named
<branch-name> - Links the worktree to the current repository
3. Switch to Worktree
Change the working directory to the newly created worktree:
cd .worktrees/<branch-name>4. Work in Isolation
Proceed with development tasks in the worktree. This environment is completely isolated from the main working directory, allowing independent work without interference.
All standard git operations (commit, push, pull, etc.) work normally within the worktree.
Note: If this project runs services (web apps, docker-compose, etc.), see apps.md for setup steps including environment file copying, port allocation, and service startup.
5. List Active Worktrees (Optional)
To view all active worktrees:
git worktree listThis displays all worktrees, their paths, and the branches they're on.
6. Remove Worktree (Optional)
When you're done with a worktree, you can remove it:
git worktree remove .worktrees/<branch-name>Note: Don't automatically remove worktrees. Leave that decision to the user. If the worktree is running services (see apps.md), make sure to stop those services first before removing the worktree.
Important Notes
- The
.worktrees/directory should be added to.gitignoreif not already present - Each worktree maintains its own working directory but shares the same git repository
- Worktrees enable true parallel development without the need for stashing or branch switching
- After creating and switching to a worktree, inform the user of the new working directory path
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.

