AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Using Git Worktrees

skill-skywalkercyt-mp-implement-using-git-worktrees · by skywalkercyt

Use when starting feature work that needs isolation from the current workspace, or before executing implementation plans — ensures an isolated workspace exists via native worktree tools or git worktree fallback.

No reviews yet
0 installs
17 views
0.0% view→install

Install

$ agentstack add skill-skywalkercyt-mp-implement-using-git-worktrees

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-skywalkercyt-mp-implement-using-git-worktrees)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Using Git Worktrees? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Using Git Worktrees

> Adapted skill — discipline originating in Superpowers v5.1.0 (MIT, Jesse Vincent), rewritten in mattpocock-skills style. Used by /mp-implement-issue step 3 and both pipelines' Phase 3 to give each slice an isolated workspace.

Isolate the work before touching code: detect existing isolation first, use the harness's native worktree tool if one exists, fall back to git worktree only without one.

1. Detect existing isolation

Run detection before creating anything.

GIT_DIR=$(cd "$(git rev-parse --git-dir)" && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" && pwd -P)
git rev-parse --show-superproject-working-tree 2>/dev/null
  • GIT_DIR != GIT_COMMON and the superproject check prints nothing → already in a linked worktree; skip to setup (step 3). On detached HEAD, note the worktree is externally managed and branch creation happens at finish time.
  • The superproject check prints a path → you're in a submodule; treat it as a normal repo.

In a normal checkout, honor any declared worktree preference without asking. With none declared, ask one consent question; declined → work in place and skip to setup.

2. Create the worktree

Native tool first. If the harness offers one (EnterWorktree-style tool, /worktree command, --worktree flag), use it — it manages placement, branching, and cleanup that the git fallback leaves to you. Then skip to setup.

Git fallback — only with no native tool. Directory priority: declared preference > existing .worktrees/ or worktrees/ (.worktrees/ wins if both) > default .worktrees/ at the repo root.

Verify the directory is git-ignored before creating:

git check-ignore -q  || echo "/" >> .git/info/exclude
git worktree add .worktrees/ -b 
cd .worktrees/

A permission error here means the sandbox blocked creation — say so, then run setup and baseline in place.

3. Setup

Auto-detect and install:

[ -f package.json ] && npm install
[ -f Cargo.toml ] && cargo build
[ -f requirements.txt ] && pip install -r requirements.txt
[ -f pyproject.toml ] && poetry install
[ -f go.mod ] && go mod download

4. Baseline

Run the project test suite (npm test / cargo test / pytest / go test ./...). Green before any work begins; red → report the failures and stop — never start from a broken baseline.

Report

Worktree ready at  on branch 
Tests passing ( tests, 0 failures)
Ready to implement 

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.