managing-worktrees
Manage Git Worktrees for Parallel Development
Switching branches disrupts parallel development and can hide unfinished work. This skill guides worktree creation, inspection, navigation, and cleanup while preserving active branches.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "managing-worktrees" from https://skillstore.io/skills/c0ntr0lledcha0s-managing-worktrees.md and its manifest at https://skillstore.io/api/skills/c0ntr0lledcha0s-managing-worktrees/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "managing-worktrees". Show my worktrees without changing them.
Expected outcome:
- Main worktree: /repo on main, clean.
- Review worktree: /worktrees/pr-123 on pr-123, two modified files.
- Recommendation: inspect the modified files before cleanup.
Using "managing-worktrees". Create an isolated hotfix from main.
Expected outcome:
- Planned branch: hotfix/critical-fix.
- Planned location: sibling worktrees directory.
- The main worktree remains unchanged.
- Confirmation is required before creation.
Using "managing-worktrees". Clean merged worktrees.
Expected outcome:
- Two merged worktrees are eligible for cleanup.
- One worktree is clean, and one contains modified files.
- Only the clean worktree is recommended for removal.
- Confirmation is required before cleanup.
Security Audit
Medium RiskAll 57 static alerts are false positives caused by Markdown backticks, documented Git commands, fixed sibling paths, and ordinary prose. One separate medium-risk issue remains: force-removing a dirty worktree can discard uncommitted changes without a clear warning.
Confirmed security concerns (1)
Risk Factors
โ๏ธ External commands (35)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/c0ntr0lledcha0s-managing-worktrees/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/c0ntr0lledcha0s-managing-worktrees?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/c0ntr0lledcha0s-managing-worktrees?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/c0ntr0lledcha0s-managing-worktrees/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/c0ntr0lledcha0s-managing-worktrees.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
C0ntr0lledCha0s. (2026). managing-worktrees security audit report (audit version 9) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/c0ntr0lledcha0s-managing-worktrees/audits/9BibTeX citation
@techreport{c0ntr0lledcha0s-c0ntr0lledcha0s-managing-worktrees-2026,
author = {C0ntr0lledCha0s},
title = {managing-worktrees security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/c0ntr0lledcha0s-managing-worktrees/audits/9},
note = {Author version 1.0.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "managing-worktrees security audit report (audit version 9)"
version: "1.0.0"
type: report
authors:
- name: "C0ntr0lledCha0s"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/c0ntr0lledcha0s-managing-worktrees/audits/9"
identifiers:
- type: other
value: "skillstore:c0ntr0lledcha0s-managing-worktrees:audit:9"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Develop features in parallel
Keep current changes active while developing another branch in an isolated linked worktree.
Prepare an emergency hotfix
Create a clean hotfix worktree from the main branch without disturbing ongoing feature work.
Review a pull request
Fetch and inspect a pull request in a temporary worktree while preserving the current checkout.
Try These Prompts
List every worktree in this repository. Show each path, branch, commit, and status. Do not change anything.
Create a worktree for the existing branch {branch} under {base_directory}. Check for conflicts first, then show the resulting worktree list.Find worktrees whose branches are merged into {target_branch}. Show dirty status and a dry-run cleanup plan. Ask before removing anything.Prepare isolated worktrees for {pull_requests}. Use distinct branch names and paths, report fetch failures, run no tests, and provide a cleanup plan.Best Practices
- Inspect git worktree list --porcelain before creating or removing worktrees.
- Keep linked worktrees outside the main repository and use predictable branch-derived paths.
- Show dirty status and request explicit confirmation before every removal.
Avoid
- Do not force-remove a worktree before preserving or intentionally discarding its uncommitted changes.
- Do not place linked worktrees inside the main repository directory.
- Do not reuse a branch that is already checked out in another worktree.
Frequently Asked Questions
What does a Git worktree isolate?
Can one branch appear in multiple worktrees?
Where should linked worktrees be stored?
Can the skill remove dirty worktrees?
Does cleanup delete remote branches?
Can this help with pull request reviews?
Developer Details
Author
C0ntr0lledCha0sLicense
MIT
Author version
v1.0.0
Skillstore revision
r2
Ref
a39a91716eadede5f4cdefd78178fed4e837a128
Maintenance freshness
7/24/2026
Usage
5 downloads ยท 195 views
File structure
๐ SKILL.md