- Home
- Skills
- Productivity
- Parallel Work Without Branch Collisions: Git Worktrees
More screenshots
Works with the AI Agents you already use
Parallel Work Without Branch Collisions: Git Worktrees
Run parallel work without collisions: detect isolation first, get consent, prefer native worktree tools or git worktrees in an ignored directory, verify a green baseline, and clean up after merging.
$5
Parallel Work Without Branch Collisions: Git Worktrees
Example session with this skill installed
I have a fictional budgeting app called Copperfield with a small test suite. I want to add an offline mode in isolation, without touching my current branch. Walk me through it exactly as the skill prescribes, including the baseline and the cleanup. Invent the details.
- Read your context and instructions
- Compiled the parallel work without
LIVE-FIRE RUN — fictional app Copperfield, invented details for this demo only. Every step below was actually executed in a scratch repository.
Step 1, detection: git-dir and git-common-dir matched, no superproject path, branch main. Verdict, reported in one line: a normal checkout, not isolated — proceed to create isolation.
Step 2, mechanism: no native worktree tool in this setup, so the git fallback applied. The ignore check caught a fault on the first attempt: .worktrees/ was NOT ignored. Fixed before creating anything — .worktrees/ added to the ignore file and that change committed — then the check passed and the worktree was created at .worktrees/offline-mode on new branch offline-mode.
Step 3, setup and baseline: the project manifest was detected, dependencies installed, and the test suite run before any code was written. Baseline: 3 passed, 0 failed. Readiness report stated the path, branch, mechanism, and green baseline.
Step 4, work: one commit on the worktree branch adding an offline-mode flag. No second task was folded into the branch.
Step 5, merge and cleanup: offline-mode merged into main, worktree removed, branch deleted, prune run. Final worktree list shows only the primary checkout; working tree status clean. The run also confirmed the skill's refusal behavior is correct by design: a branch already checked out elsewhere cannot be checked out twice, which is exactly the collision isolation exists to prevent.
Connects securely to your tools. The creator never sees your data.
About this skill
Feature work in the main working tree risks the thing you are standing on: half-finished changes pollute the branch, an experiment gone wrong is hard to unwind, and two tasks step on each other. This skill makes each stream of work independent with an isolated workspace — a separate directory with its own branch — so a failed stream is deleted and a successful one is merged. Work follows five steps. First, detect whether isolation already exists before creating any: four git checks distinguish a linked worktree from a normal checkout, a submodule, and a detached HEAD, and the finding is reported in one plain line. Second, get consent before changing the filesystem layout, then choose the mechanism in order: the platform's native worktree tools first, a git worktree fallback in a verified-ignored directory second, and an honestly stated in-place fallback only when worktree creation is blocked. Third, set up dependencies and verify a clean test baseline before writing anything, reported in a short readiness report — a green baseline means every later failure is yours, and a red one is reported, never silently built upon. Fourth, working rules keep the isolation honest: confirm the directory before any destructive command, keep the branch in step with its target, never commit the worktree directory, and keep one task per worktree. Fifth, merge and clean up completely: remove the worktree, delete the merged branch, prune stale metadata, and confirm the remaining list. Every workspace passes a ten-item quality gate at readiness and again at cleanup.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Productivity.
- It cannot create a worktree where the platform blocks it; in that case it falls back to in-place work with a clean baseline, stated honestly.
- It does not resolve merge conflicts for you; conflicts are resolved in the worktree, not the primary checkout, so the primary stays clean until the result is ready.
- A worktree path recorded on one machine means nothing on another; worktrees are recreated per machine, not copied.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
- Software
Git