using-git-worktrees
Skill4.9k starsChanged 4 months agoMITView on GitHub
Use this whenever you need to create an isolated workspace.
- Installs packages
139 other projects use a version of this, 108 of them edited.
Trending
Less talk lately.about the whole repository
Most recently taken up by
- JorgeMenaDev/skillstheir own version, first seen Oct 4, 2026
- LayneChai/superpowers-dshedited, first seen Oct 3, 2026
- HanksChen0110/skillsedited, first seen Oct 3, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- lsy041015/orchestraedited, first seen Oct 2, 2026
- Wenaixi/dsh-superpoweredited, first seen Oct 1, 2026
Who's talking about microsoft/FluidFramework
- A Hacker News story“Library for building distributed, real-time collaborative web applications”Hacker News · Sep 9, 2020 · 19 points
- microsoft/rushstack“[rush] Why does many Microsoft open-source projects not use rush.”GitHub · Oct 31, 2021 · 3 reactions
- microsoft/TypeScript“Design Meeting Notes, 2/17/2021”GitHub · Feb 17, 2021 · 3 reactions
- microsoft/TypeScript“Inline *_base declaration in d.ts files”GitHub · Aug 7, 2024 · 2 reactions
- microsoft/rushstack“[api-extractor] API report does not indicate if a class was `type` exported.”GitHub · Jun 7, 2024 · 2 reactions
The biggest 5 of 46 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 46
Talked about on GitHub and Hacker News (46 times).
On GitHub · 42
- Oct 31, 2021[rush] Why does many Microsoft open-source projects not use rush. — microsoft/rushstack3 reactions · 6 comments
- Feb 17, 2021Design Meeting Notes, 2/17/2021 — microsoft/TypeScript3 reactions
- Aug 7, 2024Inline *_base declaration in d.ts files — microsoft/TypeScript2 reactions · 5 comments
- Jun 7, 2024[api-extractor] API report does not indicate if a class was `type` exported. — microsoft/rushstack2 reactions · 2 comments
- Mar 12, 2024Add support for pnpm lock file format 6 — microsoft/component-detection2 reactions · 7 comments
37 more on GitHub
- Apr 23, 2026[aw-compat] Bug: serena-tools-to-shared-import codemod leaves workflows broken in two edge cases — github/gh-aw1 reaction
- Sep 16, 2023Recursive types can depend on presence and source location of unused type declaration — microsoft/TypeScript1 reaction · 12 comments
- Mar 31, 2023Module-level tsdoc doesn't work — matrix-org/matrix-js-sdk1 reaction · 7 comments
- Oct 6, 2022Migrate to `pnpm` or Yarn 3 (from Yarn 1) — microsoft/vscode1 reaction · 2 comments
- Oct 1, 2026build(deps): Bump the fluid-framework-dependencies group with 29 updates — microsoft/FluidHelloWorld0 reactions · 1 comment
- Oct 1, 2026build(deps): Bump the fluid-framework-dependencies group across 3 directories with 39 updates — microsoft/FluidExamples0 reactions · 1 comment
- Jul 6, 2026Bump the fluid-framework-dependencies group across 1 directory with 51 updates — nmsimons/table-example0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27546 - [bench] prefix@b5720370 improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27546 - [bench] prefix@b5720370 improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27546 - [bench] prefix@9e4e683c improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27546 - [bench] prefix@9e4e683c improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27546 - [bench] prefix@0412ca76 improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27546 - [bench] prefix@0412ca76 improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27497 - [bench] improvement(client-ordered-collection): ConsensusQueueFactory generic — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27497 - [bench] improvement(client-ordered-collection): ConsensusQueueFactory generic — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27530 - [bench] Updated the client release group to use eslint-config-fluid v13.0 — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27530 - [bench] Updated the client release group to use eslint-config-fluid v13.0 — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27546 - [bench] improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFramework0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27546 - [bench] improvement(client): fix `exactOptionalPropertyTypes` for telemetry-utils — qodo-benchmark/FluidFrameworksays it tested it0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27521 - [bench] Fix version utils to get the versions it tries from the set it has installed — qodo-benchmark/FluidFrameworksays it tested it0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27521 - [bench] Fix version utils to get the versions it tries from the set it has installed — qodo-benchmark/FluidFrameworksays it tested it0 reactions
- Jun 21, 2026[CORRUPTED] Synthetic Benchmark PR #27508 - [bench] Remove unused credential flows in e2e tests and examples — qodo-benchmark/FluidFrameworksays it tested it0 reactions
- Jun 21, 2026[CLEAN] Synthetic Benchmark PR #27508 - [bench] Remove unused credential flows in e2e tests and examples — qodo-benchmark/FluidFrameworksays it tested it0 reactions
- Jun 4, 2026Bump @fluidframework/synthesize from 2.0.0-rc.1.0.1 to 2.0.0-rc.1.0.9 — jikanter/FluidHelloWorld0 reactions
- Jun 4, 2026Bump @fluidframework/tinylicious-client from 2.0.0-rc.1.0.1 to 2.102.0 — jikanter/FluidHelloWorld0 reactions
- Jun 4, 2026Bump @fluidframework/view-interfaces from 2.0.0-rc.1.0.1 to 2.0.0-rc.1.0.9 — jikanter/FluidHelloWorld0 reactions
- Jun 4, 2026Bump @fluidframework/merge-tree from 2.0.0-rc.1.0.1 to 2.0.0-rc.1.0.9 — jikanter/FluidHelloWorld0 reactions
- Jun 4, 2026Bump @fluidframework/driver-base from 2.0.0-rc.1.0.1 to 2.0.0-rc.1.0.9 — jikanter/FluidHelloWorld0 reactions
- May 30, 2026chore(deps): bump axios, @fluidframework/azure-client, @microsoft/live-share, fluid-framework and start-server-and-test in /live-share-dice-roller — VikkiDFoxCSA/microsoft-365-agents-toolkit-samples0 reactions
- May 1, 2026Bump fluid-framework from 1.4.0 to 2.100.0 in /samples/javascript/22.react-agile-poker — microsoft/live-share-sdk0 reactions
- May 1, 2026Bump @fluidframework/azure-client from 1.2.0 to 2.100.0 in /samples/typescript/21.react-media-template — microsoft/live-share-sdk0 reactions
- Mar 4, 2026Bump the fluid-framework-dependencies group across 1 directory with 29 updates — nmsimons/fluid-vibe0 reactions
- Feb 10, 2026Bump axios, @fluidframework/server-services-client, @fluidframework/server-services-core, @fluidframework/server-services-shared and @fluidframework/server-services-utils in /server/gitrest — sniten/FluidFramework0 reactions
- Feb 9, 2026Bump axios, @fluidframework/server-lambdas, @fluidframework/server-local-server, @fluidframework/server-memory-orderer, @fluidframework/server-services-client, @fluidframework/server-services-core, @fluidframework/server-services-shared, @fluidframework/server-services-utils and @fluidframework/serv — sniten/FluidFramework0 reactions
- Sep 25, 2025Bump the fluid-framework-dependencies group across 1 directory with 40 updates — augustniehaus/resourcemapfluid0 reactions · 1 comment
- Sep 24, 2025Bump the fluid-framework-dependencies group across 1 directory with 40 updates — nmsimons/fluid-vibe-template0 reactions
- Apr 22, 2023Bump jsonwebtoken, @fluidframework/get-tinylicious-container, @fluidframework/local-driver, @fluidframework/routerlicious-driver, @fluidframework/server-local-server, @fluidframework/test-runtime-utils and tinylicious — attawayinc/FluidStorybook0 reactions
On Hacker News · 4
- Sep 9, 2020Library for building distributed, real-time collaborative web applications19 points
- Sep 9, 2020Microsoft/FluidFramework: Library for building real-time collaborative web apps2 points
- Jan 11, 2024FluidFramework: Build distributed, real-time collaborative web applications1 point
- Sep 9, 2020TypeScript library for building distributed, real-time collaborative web apps1 point
Used with
Projects with it also use diagnosing-superpowers, chinese-git-workflow and 6 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.
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 6 projects that use this
MorningStar0709Skillchinese-git-workflow
Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".
Also in 4 projects that use this
shibit-netSkillchinese-code-review
中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
shibit-netSkillchinese-commit-conventions
中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
MorningStar0709Skillworkflow-runner
Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.
Also in 4 projects that use this
guaderramaSkilllead-research-assistant
Identifies and qualifies potential leads by analyzing products/services, understanding ideal customer profiles, conducting intelligent web research using Bright Data MCP tools, and providing actionable outreach strategies. Use when researching leads, prospecting, qualifying contacts, analyzing companies, enriching lead data, or creating outreach campaigns.
Also in 6 projects that use this
- +1 more from shibit-net
Other versions139 projects use a version of this.
Word for word · 0
None found.
Edited · 108
- obra/superpowers★ 314k11% same
- jnMetaCode/superpowers-zh★ 8.3k10% same
- openai/plugins★ 7.3k11% same
- usewhale/Whale★ 93214% same
- coco-research/coco★ 43735% same
- Ibrahim-3d/orchestrator-supaconductor★ 38035% same
- totvs/engpro-advpl-tlpp-skills★ 13835% same
- CommandCodeAI/agent-skills★ 13136% same
- aaddrick/claude-pipeline★ 12912% same
- Houseofmvps/ultraship★ 12336% same
98 more not listed
Wrote their own version · 31
- GanyuanRan/Aegis★ 1.3ksame name
- KbWen/agentic-os★ 206same name
- thiientv/godmode★ 96same name
- shibit-net/xuanji-community★ 93same name
- andreaswasita/copilot-agents-dojo★ 54same name
- drvoss/everything-copilot-cli★ 47same name
- KbWen/agent-virtual-office★ 35same name
- felvieira/claude-skills-fv★ 23same name
- HiAi-gg/hiai-opencode★ 18same name
- MorningStar0709/trae-agent-enhancements★ 18same 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 repository35 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- server/gitrest/CLAUDE.mdCLAUDE.md
- server/historian/CLAUDE.mdCLAUDE.md
- build-tools/.github/copilot-instructions.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ff-oce-dashboardSkill
- ff-oce-kustoSkill
- brainstormingSkill
- building-ui-uxSkill
- creating-debug-tests-and-iteratingSkill
- creating-skillsSkill
- finishing-a-development-branchSkill
- handle-large-tasksSkill
- receiving-code-reviewSkill
- root-cause-tracingSkill
- starting-noriSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- testing-anti-patternsSkill
- updating-noridocsSkill
- using-screenshotsSkill
- using-skillsSkill
- webapp-testingSkill
- writing-plansSkill
- api-changesSkill
- ci-readiness-checkSkill
- comparison-baseSkill
- fluid-pr-guideSkill
- fluid-prSkill
- fluid-releaseSkill
- pipeline-test-triageSkill
- policy-checkSkill
- review-pr-localSkill
- reviewSkill
- trigger-pipelines-for-copilot-prSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 2 are common, 16 are distinctive, and 3 are very specific to this project.
2
Common
Most of the 132 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Check existing directories using the Bash tool: ls -d .worktrees 2>/dev/null
- Distinctive: line 12
If not found, ask me for permission to create a .worktrees directory
- Very specific: line 13
If given permission, create .worktrees.
- Distinctive: line 15
Verify .gitignore before creating a worktree using the Bash tool:
- Distinctive: line 22
If not found, add the appropriate line to the .gitignore immediately.
- Very specific: line 27
Create the worktree with the Bash tool: `git worktree add ".worktrees/$BRANCH_NAME" -b "$BRANCH_NAME"
- Distinctive: line 47
If there is no obvious project setup, you _MUST_ ask me.
- Distinctive: line 49
Run tests to ensure the worktree is clean.
- Distinctive: line 82
Never use cd .. from within a worktree - It will eventually take you outside the worktree boundary
- Distinctive: line 84
Always use absolute paths for commands - Use npm run lint from within the worktree, not cd ..
- Distinctive: line 86
If you need to run root-level commands, use the full worktree path: <bad-example> cd ..
- Distinctive: line 98
Verify your location frequently:
- Distinctive: line 105
If you accidentally exit the worktree:
- Distinctive: line 109
Verify: git branch should show your branch, not main
- Common: line 132
Fix: Always grep .gitignore before creating project-local worktree
- Distinctive: line 137
Fix: Follow priority: existing > CLAUDE.md > ask
- Distinctive: line 142
Fix: Always install the project when creating a new worktree
- Distinctive: line 174
Create worktree without .gitignore verification (project-local)
- Distinctive: line 182
Follow directory priority: existing > CLAUDE.md > ask
- Distinctive: line 183
Verify .gitignore for project-local
- Common: line 185
Verify clean test baseline
“Common” is measured: kept by at least 6 in 10 of the 132 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
<required>
*CRITICAL* Add the following steps to your Todo list using TodoWrite:- Find the worktrees directory.
- Check existing directories using the Bash tool:
ls -d .worktrees 2>/dev/null - If not found, ask me for permission to create a .worktrees directory
- If given permission, create
.worktrees.
- Verify .gitignore before creating a worktree using the Bash tool:
# Check if directory pattern in .gitignore
grep -q "^\.worktrees/$" .gitignore || grep -q "^worktrees/$" .gitignore- If not found, add the appropriate line to the .gitignore immediately.
- Create the worktree
- Come up with a good branch name based on the request.
- Create the worktree with the Bash tool: `git worktree add ".worktrees/$BRANCH_NAME" -b "$BRANCH_NAME"
- cd into the newly created path with the Bash tool:
cd $path
- Auto-detect and run project setup.
# Node.js
if [ -f package.json ]; then npm install; fi
# Rust
if [ -f Cargo.toml ]; then cargo build; fi
# Python
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f pyproject.toml ]; then poetry install; fi
# Go
if [ -f go.mod ]; then go mod download; fi- If there is no obvious project setup, you MUST ask me.
- Run tests to ensure the worktree is clean.
# Examples - use project-appropriate command
npm test
cargo test
pytest
go test ./...If tests fail: Report failures, ask whether to proceed or investigate.
If tests pass: Report ready.
- Report Location
New working directory: <full-path>
Tests passing (<N> tests, 0 failures)
All commands and tools will now refer to: <full-path>- Understand that you are now in a new working directory. Your Bash tool instructions from here on out should refer to the worktree directory, NOT your original directory. This is ABSOLUTELY CRITICAL.
</required>Maintaining Working Directory in Worktree
CRITICAL: Once you create and enter a worktree, you must stay within it for the entire session.
Rules:
- Never use cd .. from within a worktree - It will eventually take you outside the worktree boundary
- Always use absolute paths for commands - Use npm run lint from within the worktree, not cd .. && npm run lint
- If you need to run root-level commands, use the full worktree path:
<bad-example>cd .. && npm run lint</bad-example><good-example>npm run lint # (from worktree root)</good-example>
<good-example>
cd /home/$USER/code/project/.worktrees/branch-name && npm run lint
</good-example>- Verify your location frequently:
pwd # Should show .worktrees/branch-name in path
git branch # Should show * on your feature branch, not main- If you accidentally exit the worktree:
- Immediately recognize it (check if you're on main branch)
- Navigate back: cd /full/path/to/.worktrees/your-branch
- Verify: git branch should show your branch, not main
Red Flags:
- Running git status and seeing "On branch main" when you should be on a feature branch
- Running pwd and NOT seeing .worktrees/ in the path
- Any cd .. command while in a worktree
Quick Reference
| Situation | Action |
.worktrees/ exists | Use it (verify .gitignore) |
| `.worktree/s does not exist | Check CLAUDE.md → Ask user |
| Directory not in .gitignore | Add it immediately |
| Tests fail during baseline | Report failures + ask |
| No package.json/Cargo.toml | Skip dependency install |
Common Mistakes
Skipping .gitignore verification
- Problem: Worktree contents get tracked, pollute git status
- Fix: Always grep .gitignore before creating project-local worktree
Assuming directory location
- Problem: Creates inconsistency, violates project conventions
- Fix: Follow priority: existing > CLAUDE.md > ask
Missing project installation
- Problem: Tests and lint will fail, breaking the project
- Fix: Always install the project when creating a new worktree
Proceeding with failing tests
- Problem: Can't distinguish new bugs from pre-existing issues
- Fix: Report failures, get explicit permission to proceed
Hardcoding setup commands
- Problem: Breaks on projects using different tools
- Fix: Auto-detect from project files (package.json, etc.)
Example Workflow
You: I'm using the Using Git Worktrees skill to set up an isolated workspace.
[Check .worktrees/ - exists]
[Verify .gitignore - contains .worktrees/]
[Create worktree: git worktree add .worktrees/auth -b feature/auth]
[Run npm install]
[Run npm test - 47 passing]
Worktree ready at myproject/.worktrees/auth
Tests passing (47 tests, 0 failures)
Ready to implement auth featureRed Flags
Never:
- Create worktree without .gitignore verification (project-local)
- Skip baseline test verification
- Proceed with failing tests without asking
- Assume directory location when ambiguous
- Skip CLAUDE.md check
Always:
- Follow directory priority: existing > CLAUDE.md > ask
- Verify .gitignore for project-local
- Auto-detect and run project setup
- Verify clean test baseline
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.

