git-worktrees
Skill0 starsChanged 13 days agoBSD-3-ClauseView on GitHub
git, worktrees, parallel-work, branch-isolation, pr-review, cleanup
24 other projects use a version of this.
Adopted by
Most recently taken up by
- jeanqussa/hermes-generic-opstheir own version, first seen Nov 8, 2026
- denormans/claude-code-workflowtheir own version, first seen Nov 8, 2026
- kazemcodes/skill-treetheir own version, first seen Nov 8, 2026
- Mahesh-Bishnoi/skillstheir own version, first seen Nov 8, 2026
- bostonaholic/rpikittheir own version, first seen Nov 8, 2026
- gabrielkoerich/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use obsidian-bases, verification-before-completion and 10 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.
wangzhuofengSkillobsidian-bases
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
Also in 3 projects that use this
OpenAISkillverification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Also in 4 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 4 projects that use this
OpenAISkillsystematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Also in 4 projects that use this
CloudflareSkillreceiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
- +3 more from openai
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- heyitsnoah/claudesidian★ 2.6ksame name
- jamesrochabrun/skills★ 209same name
- trailofbits/dropkit★ 129same name
- bostonaholic/rpikit★ 19same name
- CarbeneAI/Forge★ 9same name
- sergeeey/Claude-cod-top-2026★ 9same name
- gabrielkoerich/skills★ 8same name
- tstapler/dotfiles★ 8same name
- KhaledSaeed18/dotclaude★ 5same name
- vikisingh23/neuraforge-ai★ 4same name
14 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 repository66 other files it gives its agents.
- AGENTS.mdAGENTS.md
- activitywatch-analyzeSkill
- activitywatch-groupSkill
- activitywatch-productivitySkill
- activitywatch-visualizeSkill
- adadrSkill
- android-adb-deploySkill
- debug-systemSkill
- discover-workflowsSkill
- dotfiles-workflowSkill
- forgejo-repo-bootstrapSkill
- forgejo-skill-editSkill
- free-resourcesSkill
- gitSkill
- grillSkill
- impeccableSkill
- llm-workerSkill
- merge-on-greenSkill
- nix-remote-buildSkill
- opencode-orchestrateSkill
- opencode-workerSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-gainSkill
- ponytail-helpSkill
- ponytail-reviewSkill
- ponytailSkill
- project-resumeSkill
- prolog-project-kbSkill
- prolog-reasoningSkill
- prolog-verificationSkill
- qtile-confirmSkill
- qtile-debugSkill
- qtile-editSkill
- qtile-reloadSkill
- rageSkill
- skill-editSkill
- skill-portabilitySkill
- skill-scopeSkill
- specSkill
- starintel-actor-createSkill
- starintel-auto-digSkill
- starintel-credential-lifecycleSkill
- starintel-document-createSkill
- starintel-ingestSkill
- starintel-local-searchSkill
- starintel-osintSkill
- starintel-repo-bootstrapSkill
- starintel-spec-versionSkill
- starintel-wearos-releaseSkill
- star-langSkill
- status-updateSkill
- sudoSkill
- task-steward-bootstrapSkill
- task-steward-workerSkill
- worker-orchestrationSkill
- youtube-contextSkill
- zara-mcpSkill
- zeromq-designSkill
- zeromq-guideSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
4
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 16
Run inside a git repository.
- Distinctive: line 52
Only create or delete directories under the configured worktree root.
- Distinctive: line 56
Never create a second worktree for a branch already checked out anywhere, and never remove the main working tree.
- Distinctive: line 60
Use the printed path as the single source of truth.
- Very specific: line 62
When work ends, remove the worktree and prune.
“Common” is measured: kept by at least 6 in 10 of the 24 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
Goal
Give each branch or pull request its own checked-out directory under one shared root, so parallel work never disturbs the primary checkout.
Input
Run inside a git repository. Supply a branch name or a PR number:
--root DIRoverrides the worktree root; default~/git/worktrees, also configurable withGIT_WORKTREE_ROOT.--base REFcreates a missing branch fromREF; without it a missing branch is an error.--pr Nfetches pull requestNfromorigininto branchpr/N.--dry-runprints the plan without mutating anything.
Output
~/git/worktrees/<project-slug>-<pr-or-branch-name><project-slug> comes from the repository directory name; separators in
branch names become -. Branch feature/foo in repository my-app
lands at ~/git/worktrees/my-app-feature-foo; PR 12 lands at
~/git/worktrees/my-app-pr-12. Creating prints the new path.
Workflow
Invoke scripts/worktree.py from this skill with python3:
python3 scripts/worktree.py add feature/foo --base main
python3 scripts/worktree.py add --pr 123
python3 scripts/worktree.py path feature/foo
python3 scripts/worktree.py list
python3 scripts/worktree.py remove my-app-feature-foo
python3 scripts/worktree.py pruneremove accepts a worktree directory name (looked up under the root),
a relative path, or an absolute path.
Rules
- Only create or delete directories under the configured worktree root.
- Fail closed: never overwrite an existing directory, never delete
branches, and never guess between reusing an existing branch and
creating a new one;
--basemust say so explicitly. - Never create a second worktree for a branch already checked out anywhere, and never remove the main working tree.
git worktree removerefuses dirty or locked worktrees; pass--forceonly when the operator confirmed discarding the changes.- Use the printed path as the single source of truth; never hand-build worktree directories outside this layout.
- When work ends,
removethe worktree andprune; keep or delete branches by explicit choice, never as a side effect.
Verification
git worktree list
git -C <worktree-path> statusThe new path must appear registered and its status clean. For this
skills repository, also run bash scripts/validate-skills,
bash scripts/validate-support-scripts, and
python3 -m unittest tests/test_git_worktrees.py -v.
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.

