What is using-git-worktrees?
Use 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'.
event4u-app/agent-config
Use 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'.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/using-git-worktrees"Quick start
Install it or open the source, trigger it with a clear task, then follow the source workflow.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/using-git-worktrees"Use using-git-worktrees to help me with: [describe your task]. Before you begin, tell me what input you need, the steps you will follow, and the expected output.
No structured workflow was detected; follow the original SKILL.md below.
Continue to the workflowDirect answers
Use 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'.
It is relevant to workflows involving Testing, Engineering.
SkillSignal detected this source-specific command: npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/using-git-worktrees". Inspect the repository and command before running it.
The upstream source does not declare a dedicated Agent platform.
Static analysis detected exec-script signals. Review the cited source lines before installing; these signals are not a security audit.
This page combines upstream documentation with deterministic repository, quality, and static-risk signals. It is not described as a manual test or security review.
SkillSignal brief
Use 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'.
Useful in these contexts
Core capabilities
Distilled from the source
About 5 min · 10 sections
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
A long-running build or test suite is busy in the current worktree
Location — full path to the worktree
Branch — created branch name
Baseline — tests passing or explicit failure report
Quality breakdown
Based on traceable docs and repository signals; stars are not treated as quality.
Compare before choosing
These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.
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
Use BEFORE writing/changing tests, adding mocks, or test-only methods on production classes — vs mocking-the-mock, production pollution, partial mocks, and overfit/tautological assertions
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
Use when writing, generating, or improving Pest tests for Laravel — clear intent, good coverage, maintainable structure, and alignment with project testing conventions.
Use when asking for a review or creating a PR — self-review first, frame the right context, test plan included — even when the user just says 'open a PR' or 'ready to merge'.
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 expectsDo NOT use when:
Land in an isolated, ignored, test-clean worktree ready for implementation, without polluting the parent repo's working tree.
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.
worktrees.modeBefore anything else, read worktrees.mode from .agent-settings.yml
(default: ask). The setting is a mechanical layer on top of
scope-control's permission gate — it narrows, never widens.
worktrees.mode | Behaviour |
|---|---|
ask | Status quo. Continue to step 1; scope-control permission gate applies for every worktree creation. |
on | Standing permission. Skip the per-creation permission ask; continue to step 1. Iron-Law gates (ignore-check, clean baseline) still apply. |
off | No autonomous worktree creation. Refuse unless the user explicitly asked this turn for a worktree ("do this in a worktree", "use mode 6", "spawn a worktree for X"). |
Off, no explicit request → stop. Tell the user the setting is off,
suggest the in-place alternative (subagent-orchestration mode 3
do-in-steps, or just stay on the current branch). Do not re-ask on
the same task.
Off, with explicit request this turn → acknowledge once
("worktrees.mode is off; running this on your explicit request
for this task") and continue to step 1. The override is for this one
task — it does not flip the setting.
The setting only suppresses unprompted usage. The tool stays available when the user wants it.
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.
Stop at the first match — do not ask if discovered:
| Found | Use |
|---|---|
.worktrees/ exists | .worktrees/<branch-name> |
worktrees/ exists | worktrees/<branch-name> |
AGENTS.md preference | follow it |
| nothing found | ask user (numbered options) |
Ask format:
.worktrees/— project-local, hiddenworktrees/— project-local, visible~/.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.
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.
git worktree add .worktrees/<branch-name> -b <branch-name>
cd .worktrees/<branch-name>
Branch names must match the project convention — see
commit-conventions rule.
Auto-detect from manifest files:
| File | Command |
|---|---|
composer.json | composer install |
package.json | npm ci / pnpm install / yarn |
pyproject.toml | poetry install or pip install -e . |
Cargo.toml | cargo build |
go.mod | go 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.
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.
git status
noise across the whole repo. Verify first.npm install on a PHP project fails silently. Detect
from manifest files.<N> tests passing or explicit failure reportrm -rf a worktree — use git worktree remove| Task | Skill / command |
|---|---|
| Finishing the branch | finishing-a-development-branch |
| Opening the PR | /create-pr |
| Verifying completeness | verify-before-complete |