git-worktree
Skill4.3k starsChanged 6 days agoMITView on GitHub
Use Git worktrees to isolate parallel coding tasks. Use when setting up a task checkout, working in a shared repo, or managing existing worktrees.
- Reads credentials
32 other projects use a version of this, 1 of them edited.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- Dimon94/dveritytheir own version, first seen Nov 15, 2026
- Dimon94/skillstheir own version, first seen Nov 15, 2026
- aegntic/compound-engineeringtheir own version, first seen Nov 8, 2026
- sbluemin/fleet-harnesstheir own version, first seen Nov 8, 2026
- yht-4403/jc-agent-skillstheir own version, first seen Nov 8, 2026
- yuri-xyz/skillstheir own version, first seen Nov 8, 2026
Who's talking about davidondrej/skills
- sudosubin/agents.nix“agent-skills.github.davidondrej.skills: 0-unstable-2026-11-03 → 0-unstable-2026-11-06”GitHub · Nov 6, 2026
- sudosubin/agents.nix“agent-skills.github.davidondrej.skills: 0-unstable-2026-11-01 → 0-unstable-2026-11-03”GitHub · Nov 3, 2026
- sudosubin/agents.nix“agent-skills.github.davidondrej.skills: d5e3a3a → 674b9ca”GitHub · Nov 1, 2026
- sudosubin/agents.nix“agent-skills.github.davidondrej.skills: 0-unstable-2026-10-31 → 0-unstable-2026-11-01”GitHub · Nov 1, 2026
- sudosubin/agents.nix“agent-skills.github.davidondrej.skills: 8e90e9d → 7201ee3”GitHub · Nov 1, 2026
The biggest 5 of 34 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 34
Talked about on GitHub (34 times).
On GitHub · 34
- Nov 6, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-11-03 → 0-unstable-2026-11-06 — sudosubin/agents.nix0 reactions
- Nov 3, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-11-01 → 0-unstable-2026-11-03 — sudosubin/agents.nix0 reactions
- Nov 1, 2026agent-skills.github.davidondrej.skills: d5e3a3a → 674b9ca — sudosubin/agents.nix0 reactions
- Nov 1, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-31 → 0-unstable-2026-11-01 — sudosubin/agents.nix0 reactions
- Nov 1, 2026agent-skills.github.davidondrej.skills: 8e90e9d → 7201ee3 — sudosubin/agents.nix0 reactions
29 more on GitHub
- Oct 31, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-30 → 0-unstable-2026-10-31 — sudosubin/agents.nix0 reactions
- Oct 30, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-29 → 0-unstable-2026-10-30 — sudosubin/agents.nix0 reactions
- Oct 29, 2026agent-skills.github.davidondrej.skills: 81f16ef → 3e30b51 — sudosubin/agents.nix0 reactions
- Oct 29, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-28 → 0-unstable-2026-10-29 — sudosubin/agents.nix0 reactions
- Oct 28, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-26 → 0-unstable-2026-10-28 — sudosubin/agents.nix0 reactions
- Oct 26, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-25 → 0-unstable-2026-10-26 — sudosubin/agents.nix0 reactions
- Oct 25, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-24 → 0-unstable-2026-10-25 — sudosubin/agents.nix0 reactions
- Oct 24, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-23 → 0-unstable-2026-10-24 — sudosubin/agents.nix0 reactions
- Oct 24, 2026agent-skills.github.davidondrej.skills: 1b7ea95 → f319526 — sudosubin/agents.nix0 reactions
- Oct 23, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-22 → 0-unstable-2026-10-23 — sudosubin/agents.nix0 reactions
- Oct 22, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-21 → 0-unstable-2026-10-22 — sudosubin/agents.nix0 reactions
- Oct 21, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-19 → 0-unstable-2026-10-21 — sudosubin/agents.nix0 reactions
- Oct 19, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-18 → 0-unstable-2026-10-19 — sudosubin/agents.nix0 reactions
- Oct 18, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-17 → 0-unstable-2026-10-18 — sudosubin/agents.nix0 reactions
- Oct 17, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-16 → 0-unstable-2026-10-17 — sudosubin/agents.nix0 reactions
- Oct 16, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-15 → 0-unstable-2026-10-16 — sudosubin/agents.nix0 reactions
- Oct 15, 2026agent-skills.github.davidondrej.skills: b3029ad → d23aac3 — sudosubin/agents.nix0 reactions
- Oct 15, 2026agent-skills.github.davidondrej.skills: 77a1672 → b3029ad — sudosubin/agents.nix0 reactions
- Oct 15, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-14 → 0-unstable-2026-10-15 — sudosubin/agents.nix0 reactions
- Oct 14, 2026agent-skills.github.davidondrej.skills: ec0b0c8 → 1df52b0 — sudosubin/agents.nix0 reactions
- Oct 14, 2026agent-skills.github.davidondrej.skills: 04fc097 → ec0b0c8 — sudosubin/agents.nix0 reactions
- Oct 14, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-13 → 0-unstable-2026-10-14 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-skills.github.davidondrej.skills: 4a43eb8 → 66fea96 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-07 → 0-unstable-2026-10-13 — sudosubin/agents.nix0 reactions
- Oct 7, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-04 → 0-unstable-2026-10-07 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-skills.github.davidondrej.skills: 0-unstable-2026-10-03 → 0-unstable-2026-10-04 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.davidondrej.skills: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Aug 4, 2026feat(gateway): add davidondrej/skills as SHA-pinned vendor — lgtm-hq/ai-skills0 reactions · 1 comment
- Jul 5, 2026Add davidondrej/skills repository to ASM catalog and registry — luongnv89/asm0 reactions
Used with
Projects with it also use agent-native-architecture, document-review and 7 more.
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.
CodeWithBehnamSkillagent-native-architecture
Build applications where agents are first-class citizens. Use this skill when designing autonomous agents, creating MCP tools, implementing self-modifying systems, or building apps where features are outcomes achieved by agents operating in a loop.
Also in 3 projects that use this
CodeWithBehnamSkilldocument-review
This skill should be used to refine brainstorm or plan documents before proceeding to the next workflow step. It applies when a brainstorm or plan document exists and the user wants to improve it.
Also in 3 projects that use this
MicrosoftSkillgit-commit
Stage user-selected paths, confirm the exact staged set, and create one local Conventional Commit, or generate a commit message for staged changes without committing. Use when you want a guarded commit or a ready-to-paste message.
Also in 3 projects that use this
MicrosoftSkillgrill-with-docs
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
Also in 3 projects that use this
OpenAISkillbrainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Also in 3 projects that use this
BlockSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Also in 4 projects that use this
Other versions32 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- wprzechrzta/skills★ 021% same
Wrote their own version · 31
- Dimon94/dverity★ 107same name
- Dimon94/skills★ 107same name
- iliaal/ai-skills★ 45same name
- sbluemin/fleet-harness★ 17same name
- BackToCimaCoppi/Praxis★ 6same name
- dzianisv/skills★ 4same name
- KroxiDev/engineering-skills★ 4same name
- MithunWijayasiri/dotclaude★ 4same name
- CodeWithBehnam/cc-docs★ 2same name
- hmj1026/dhpk★ 2same name
21 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 repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- 4x4Skill
- adr-verbatimSkill
- anti-sleepSkill
- ask-then-buildSkill
- bb-cliSkill
- bb-pluginsSkill
- before-buildingSkill
- better-promptSkill
- boatSkill
- browser-harnessSkill
- browser-useSkill
- cmuxSkill
- codex-subagentSkill
- cua-driverSkill
- decisionsSkill
- deepapiSkill
- deep-researchSkill
- deep-scrapeSkill
- designsSkill
- domain-checkerSkill
- effective-agent-skillsSkill
- fable-reviewSkill
- fable-safe-promptSkill
- file-treeSkill
- fireflies-transcriptSkill
- gemini-reviewSkill
- github-outside-sandboxSkill
- global-agent-guardrailsSkill
- goal-loopSkill
- gpt-reviewSkill
- handoffSkill
- herdrSkill
- image-promptSkill
- keep-trackSkill
- kimi-reviewSkill
- larp-detectorSkill
- muse-reviewSkill
- nagentSkill
- occams-razorSkill
- openrouterSkill
- persistent-localhostSkill
- prompt-for-othersSkill
- read-all-adrsSkill
- remindSkill
- rename-processSkill
- renameSkill
- repo-syncSkill
- risky-changesSkill
- self-archiveSkill
- setup-helpSkill
- stateSkill
- stop-overthinkingSkill
- total-reviewSkill
- varied-searchSkill
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 25 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
- Very specific: line 12
Never run git worktree add yourself.
- Distinctive: line 14
New task: start the thread with New worktree instead.
- Distinctive: line 40
One task = one worktree = one agent session: Never share a working directory between agents.
- Distinctive: line 41
Keep the primary checkout on main, only for review, merging, and pushing.
- Distinctive: line 43
Keep task branches local and short-lived.
- Distinctive: line 101
Delete each worktree as soon as its branch is merged or pushed to main.
- Distinctive: line 103
Commit early and often. Deleting a worktree loses uncommitted work.
“Common” is measured: kept by at least 6 in 10 of the 25 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 Agents
In Cloudroom ($ROOM_THREAD_ID is set)
Never run git worktree add yourself. Cloudroom only deletes worktrees it made, so hand-made ones pile up in ~/code forever.
- New task: start the thread with New worktree instead.
Move this thread to its own worktree: fork it into a Cloudroom-managed worktree. Cloudroom makes the branch and deletes the folder once its last thread is archived (after the worktree retention setting, default 21 days).
room-cli thread fork "$ROOM_THREAD_ID" --new-environment worktree --title "<task>" \ --prompt "You now run in a new worktree. Copy the gitignored .env files from <primary checkout> into it, then stop and wait for the user."It branches from
main, so uncommitted edits stay behind; commit them first or pass--base-branch <ref>. Then tell the user to continue in the new thread and archive this one. Skip the rest of this skill.
Start here
Detect where you are before editing:
[ "$(git rev-parse --path-format=absolute --git-dir)" = "$(git rev-parse --path-format=absolute --git-common-dir)" ] \
&& echo "primary checkout" || echo "worktree"- Primary checkout → create a task-named worktree, complete the setup below, and
cdinto it before editing. - Worktree (including one created by Cursor) → proceed with the task.
Working model
Worktrees have separate working files and branches but share Git history, stashes, config, and refs.
- One task = one worktree = one agent session. Never share a working directory between agents.
- Keep the primary checkout on main, only for review, merging, and pushing.
- Nothing auto-merges. The human reviews each diff before merging or discarding the worktree.
- Keep task branches local and short-lived. Push only main unless the user explicitly asks to push a task branch.
- Merge one worktree at a time. If main moved, rebase the task branch before merging.
Creating and removing
git worktree add ../myrepo-task-x # new worktree + branch "myrepo-task-x"
git worktree add ../fix-y -b fix-y main # explicit branch off main
git worktree list # see all worktrees
git worktree remove ../myrepo-task-x # delete when merged/abandoned
git worktree prune # clean up stale registrationsA branch can be checked out in only one worktree, including main.
In Cursor, use the Agents Window or /worktree <task>. /apply-worktree applies results to the main checkout; /delete-worktree discards them. /best-of-n model1,model2 <task> runs the same task in parallel worktrees, one per model. Cursor auto-deletes older worktrees, so preserve results promptly; pushing task branches still requires explicit approval.
Complete the setup
A fresh worktree contains tracked files only. Bootstrap it before task work:
- Env/secret files — copy
.env,.env.local, and similar files from the primary checkout. Never symlink them: edits would change the originals. - Dependencies — install locally (
npm ci,pnpm install,uv sync,bundle install). Never symlinknode_modulesfrom the primary checkout: bundlers such as Next.js/Turbopack reject paths outside the worktree. If it is a symlink, remove it withrm -f node_modulesand install normally. - Databases and services — choose shared or per-worktree state. For shared services, pin their identity to avoid duplicate instances and port conflicts. For shared Docker Compose services, pin the project name, for example with a top-level
name:; otherwise each worktree's folder name creates a separate project. Copy or re-seed per-worktree state such as SQLite files. - Ports — run dev/test servers and debuggers one at a time, or configure separate ports per worktree.
- Generated files and caches — rebuild gitignored output in the worktree (
npm run build, codegen). - Git hooks —
core.hooksPathand.git/configare shared; verify hook scripts don't assume the primary checkout's path.
Automate setup
In Cursor, .cursor/worktrees.json runs setup on creation ($ROOT_WORKTREE_PATH is the primary checkout):
{
"setup-worktree": [
"npm ci",
"cp $ROOT_WORKTREE_PATH/.env.local .env.local"
]
}Otherwise, put the checklist in scripts/setup-worktree.sh and run it first in each new worktree. Find the primary checkout from a worktree with:
dirname "$(git rev-parse --path-format=absolute --git-common-dir)"Merge and clean up
# from the primary checkout, after reviewing the worktree's diff:
git merge --no-ff task-branch # or: git merge --squash task-branch
git worktree remove ../myrepo-task-x
git branch -d task-branchIn Cursor, use /apply-worktree, then review and commit.
- Delete each worktree as soon as its branch is merged or pushed to main. Nothing else cleans them up.
- Rebase or restart worktrees that have stalled for days.
- Commit early and often. Deleting a worktree loses uncommitted work; commits remain in the shared repository.
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.

