Source profileQuality 93/100Review permissions

event4u-app/agent-config/src/skills/using-git-worktrees/SKILL.md

using-git-worktrees

When starting parallel work in isolation from the current branch — spawn a git worktree with ignore-safety checks and a clean test baseline — even when the user says 'try this on the side'.

Source repository stars
7
Declared platforms
0
Static risk flags
1
Last source update
2026-08-25
Source checked
2026-08-25

Decision brief

What it does: where it fits

When starting parallel work in isolation from the current branch — spawn a git worktree with ignore-safety checks and a clean test baseline — even when the user says 'try this on the side'.

Best for

  • Starting new work while the current branch is mid-work and you don't
  • Running two agents (Augment Code, Claude Code, Cursor) on the same
  • Experimenting with a refactor that may be thrown away — a throwaway

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/using-git-worktrees"
Safe inspection promptEditorial

Inspect the Agent Skill "using-git-worktrees" from https://github.com/event4u-app/agent-config/blob/a36d4658de87e81bda8299dc3a01b9b9ce583af5/src/skills/using-git-worktrees/SKILL.md at commit a36d4658de87e81bda8299dc3a01b9b9ce583af5. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Procedure

    There is nothing to read: worktrees.mode was deleted (ADR-229). Creation is instruction-only and hardcoded, so the decision is never the agent's.

    There is nothing to read: worktrees.mode was deleted (ADR-229). Creation is instruction-only and hardcoded, so the decision is never the agent's.No explicit request → do not ask, do not offer, do not mention it. Use the in-place path (subagent-orchestration mode 3 do-in-steps, or just stay on the current branch) and say nothing about worktrees. Proposing one unp…This suppresses unprompted usage only. The tool stays fully available the moment the user wants it, with no confirmation loop in the way: an explicit request goes straight to step 1.
  2. 02

    0. Pre-flight — instruction-only, no setting to read

    There is nothing to read: worktrees.mode was deleted (ADR-229). Creation is instruction-only and hardcoded, so the decision is never the agent's.

    There is nothing to read: worktrees.mode was deleted (ADR-229). Creation is instruction-only and hardcoded, so the decision is never the agent's.No explicit request → do not ask, do not offer, do not mention it. Use the in-place path (subagent-orchestration mode 3 do-in-steps, or just stay on the current branch) and say nothing about worktrees. Proposing one unp…This suppresses unprompted usage only. The tool stays fully available the moment the user wants it, with no confirmation loop in the way: an explicit request goes straight to step 1.
  3. 03

    When to use

    Starting new work while the current branch is mid-work and you don't want to stash or switch Running two agents (Augment Code, Claude Code, Cursor) on the same repo in parallel — each needs its own working directory Experimenting with a refactor that may be thrown away — a throw…

    Starting new work while the current branch is mid-work and you don'tRunning two agents (Augment Code, Claude Code, Cursor) on the sameExperimenting with a refactor that may be thrown away — a throwaway
  4. 04

    Goal

    Land in an isolated, ignored, test-clean worktree ready for implementation, without polluting the parent repo's working tree.

    Land in an isolated, ignored, test-clean worktree ready for implementation, without polluting the parent repo's working tree.
  5. 05

    The Iron Law

    An un-ignored worktree directory will get committed accidentally. A worktree with a failing baseline mixes pre-existing failures into new work and makes it impossible to tell what you broke.

    An un-ignored worktree directory will get committed accidentally. A worktree with a failing baseline mixes pre-existing failures into new work and makes it impossible to tell what you broke.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 75

The documentation asks the agent to run terminal commands or scripts.

git worktree list # already-active worktrees

Runs scripts

medium · line 105

The documentation asks the agent to run terminal commands or scripts.

git check-ignore -q .worktrees || git check-ignore -q worktrees

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars7SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
event4u-app/agent-config
Skill path
src/skills/using-git-worktrees/SKILL.md
Commit
a36d4658de87e81bda8299dc3a01b9b9ce583af5
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

using-git-worktrees

When to use

  • Starting new work while the current branch is mid-work and you don't want to stash or switch
  • Running two agents (Augment Code, Claude Code, Cursor) on the same repo in parallel — each needs its own working directory
  • Experimenting with a refactor that may be thrown away — a throwaway worktree is cheaper than a throwaway commit
  • A long-running build or test suite is busy in the current worktree
  • subagent-orchestration mode 6 (do-in-worktrees) was selected for a cross-wing chain — this skill is the executor that creates the per-step isolated worktrees the chain expects

Do NOT use when:

  • A small fix fits in one commit on the current branch — worktree overhead is not worth it
  • The task is linear ("just finish this PR") — a single branch is simpler
  • The repo is tiny and branch-switching is instant — setup cost outweighs isolation benefit
  • You are unsure which branch you want — pick the branch first

Goal

Land in an isolated, ignored, test-clean worktree ready for implementation, without polluting the parent repo's working tree.

The Iron Law

NO WORKTREE WITHOUT VERIFIED IGNORE + CLEAN BASELINE.

An un-ignored worktree directory will get committed accidentally. A worktree with a failing baseline mixes pre-existing failures into new work and makes it impossible to tell what you broke.

Procedure

0. Pre-flight — instruction-only, no setting to read

NEVER CREATE A WORKTREE THE USER DID NOT ASK FOR.
THERE IS NO SETTING. THE ONLY TRIGGER IS THE USER SAYING SO IN THE CHAT.

There is nothing to read: worktrees.mode was deleted (ADR-229). Creation is instruction-only and hardcoded, so the decision is never the agent's.

SituationBehaviour
The user asked for a worktree in the chat — "do this in a worktree", "use mode 6", "spawn a worktree for X", or the same in another languageContinue to step 1. No permission question: the request is the permission.
Anything else, however well the shape would fitDo not create one. Continue in place.

No explicit request → do not ask, do not offer, do not mention it. Use the in-place path (subagent-orchestration mode 3 do-in-steps, or just stay on the current branch) and say nothing about worktrees. Proposing one unprompted is the failure this rule exists to stop — it puts a decision the user did not raise in front of them, and the answer is nearly always no.

This suppresses unprompted usage only. The tool stays fully available the moment the user wants it, with no confirmation loop in the way: an explicit request goes straight to step 1.

The Iron-Law gates below are unchanged and still run on every explicitly-requested worktree — ignore-safety check (step 3) and clean baseline (step 5). Instruction-only removes the choice, never the checks.

1. Inspect current state

Before creating anything, check existing conventions — do not assume:

git worktree list                              # already-active worktrees
ls -d .worktrees worktrees 2>/dev/null         # project-local convention
grep -i "worktree.*director" AGENTS.md CLAUDE.md 2>/dev/null

If a worktree on the target branch already exists, reuse it. Git refuses to check out a branch that is already live elsewhere.

2. Pick directory convention

Stop at the first match — do not ask if discovered:

FoundUse
.worktrees/ exists.worktrees/<branch-name>
worktrees/ existsworktrees/<branch-name>
AGENTS.md preferencefollow it
nothing foundask user (numbered options)

Ask format:

  1. .worktrees/ — project-local, hidden
  2. worktrees/ — project-local, visible
  3. ~/.event4u/agent-config/worktrees/<project>/ — global

Recommendation: 1 — .worktrees/ — project-local keeps the worktree next to the repo (easy cleanup), and the leading dot keeps it out of ls. Caveat: pick 3 if multiple repos must share a single worktree root.

3. Verify ignore-safety (project-local only)

git check-ignore -q .worktrees || git check-ignore -q worktrees

If exit ≠ 0: add the path to .gitignore, commit that change before creating the worktree. Do not proceed until the check passes. For the global location, skip — path is outside the repo.

4. Create the worktree

git worktree add .worktrees/<branch-name> -b <branch-name>
cd .worktrees/<branch-name>

Branch names must match the project convention — see commit-conventions rule.

4b. Seed the worktree — allow / deny list

git worktree add checks out tracked files only. Everything gitignored — dependencies, generated projections, build output, local config — is absent. Seeding the wrong subset is the recurring worktree-trap family: a gate then fails (or falsely passes) for a reason the change did not cause.

ArtefactActionWhy
The dependency tree the § 5 install would produce (vendor/, node_modules/, .venv/, target/, …)symlink from the primary checkout, or run the § 5 installAbsent ⇒ every gate that shells to a local binary dies on its first import. A partial tree (only the binary shim directory) is worse than none — it produces a scatter of spurious failures. Symlink or install fully; never half.
Generated agent projections (.augment/, other tool trees)copy from the primary checkout, or regenerate before running gatesSeveral gates read the projection tree. Absent ⇒ the gate reports "produced by regeneration but absent before" — red for a reason the contributor did not cause.
Build output (dist/, compiled artefacts)regenerate, never copy a stale treeA stale copy makes a byte-identity check report generator drift that does not exist.
Local settings (.agent-settings.yml, .agent-settings.local.yml)NEVER copyGitignored, machine-local, and deliberately absent in CI. Absent IS the CI shape — copying it makes local gate results diverge from the gate that actually decides. A worktree that carries it is testing a configuration no pipeline runs.
Secrets, .env, credential filesNEVER copySame reasoning, plus leak surface.

The list is encoded here, in the flow, on purpose: a separate committed manifest is warranted only when a flow-external tool needs to read it. Tools that seed their own throwaway worktrees already handle their own dependency link inline and need no manifest.

5. Install dependencies + verify baseline

Auto-detect from manifest files:

FileCommand
composer.jsoncomposer install
package.jsonnpm ci / pnpm install / yarn
pyproject.tomlpoetry install or pip install -e .
Cargo.tomlcargo build
go.modgo mod download

Run the project's fastest test target. If the baseline fails, stop and report — ask whether to fix main first or proceed. Never silently continue with a red baseline.

Optional env-bootstrap entry — stand-up beyond deps. Some projects need more than package install to stand up (start services, seed fixtures, generate config). A project MAY declare a single bootstrap entry — an env-bootstrap target in its runner file (Taskfile.yml / Makefile / package.json scripts) or a documented equivalent. When one exists, surface it as the suggested next action after the baseline — suggest, never auto-execute (no new autonomous surface). Long-running work then reads one deterministic stand-up entry instead of re-deriving it each session. If none exists, deps + baseline is the whole stand-up.

Multi-tool parallel work

Agents share the same .git/ but get their own working directory. One worktree per agent session; branch name encodes agent/task (feat/augment-auth, feat/claude-refactor). Merge or discard before starting a new worktree on the same branch.

Gotcha

  • Un-ignored directory — contents end up tracked; git status noise across the whole repo. Verify first.
  • Two worktrees on same branch — git refuses; pick a new branch.
  • Hardcoded npm install on a PHP project fails silently. Detect from manifest files.
  • Skipping baseline — failing tests pre-existed; later blamed on your own changes.
  • Copying local settings in — the worktree then passes gates the pipeline fails (§ 4b deny list). Absent is correct.
  • Partial dependency tree — a .bin-only symlink yields a scatter of spurious failures; bisect in a clean scratch worktree instead.

Output format

  1. Location — full path to the worktree
  2. Branch — created branch name
  3. Baseline<N> tests passing or explicit failure report
  4. Next step — suggested skill or command for the actual work

Do NOT

  • NEVER create a worktree before the ignore check passes
  • NEVER skip the baseline test run
  • NEVER reuse a directory name that already holds a worktree
  • NEVER rm -rf a worktree — use git worktree remove

Handover

TaskSkill / command
Finishing the branchfinishing-a-development-branch
Opening the PR/create-pr
Verifying completenessverify-before-complete

Frequently asked questions

What to verify before installation and use

What does the using-git-worktrees source document cover?

When starting parallel work in isolation from the current branch — spawn a git worktree with ignore-safety checks and a clean test baseline — even when the user says 'try this on the side'.

How do I install using-git-worktrees?

The source record exposes this install command: npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/using-git-worktrees". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10045,511

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing