Finishing a Development Branch
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
Mandatory rules for agents in git worktree isolation. An agent skill from notque/vexjoy-agent.
$ npx skills add notque/vexjoy-agent --skill worktree-agent -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install notque/vexjoy-agent worktree-agent --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/notque/vexjoy-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/process/worktree-agent .claude/skills/worktree-agent && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "worktree-agent" agent skill from https://github.com/notque/vexjoy-agent/tree/main/skills/process/worktree-agent into .claude/skills/worktree-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-agent", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/notque/vexjoy-agent/tree/main/skills/process/worktree-agentType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add notque/vexjoy-agent --skill worktree-agent -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install notque/vexjoy-agent worktree-agent --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/notque/vexjoy-agent.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/process/worktree-agent .agents/skills/worktree-agent && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "worktree-agent" agent skill from https://github.com/notque/vexjoy-agent/tree/main/skills/process/worktree-agent into .agents/skills/worktree-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-agent", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add notque/vexjoy-agent --skill worktree-agent -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install notque/vexjoy-agent worktree-agent --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/notque/vexjoy-agent.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/process/worktree-agent .cursor/skills/worktree-agent && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "worktree-agent" agent skill from https://github.com/notque/vexjoy-agent/tree/main/skills/process/worktree-agent into .cursor/skills/worktree-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-agent", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/notque/vexjoy-agent.git --path skills/process/worktree-agent--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add notque/vexjoy-agent --skill worktree-agent -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install notque/vexjoy-agent worktree-agent --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/notque/vexjoy-agent.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/process/worktree-agent .gemini/skills/worktree-agent && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "worktree-agent" agent skill from https://github.com/notque/vexjoy-agent/tree/main/skills/process/worktree-agent into .gemini/skills/worktree-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-agent", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install notque/vexjoy-agent worktree-agentInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add notque/vexjoy-agent --skill worktree-agent -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/notque/vexjoy-agent.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/process/worktree-agent .github/skills/worktree-agent && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "worktree-agent" agent skill from https://github.com/notque/vexjoy-agent/tree/main/skills/process/worktree-agent into .github/skills/worktree-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-agent", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add notque/vexjoy-agent --skill worktree-agent -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install notque/vexjoy-agent worktree-agent --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/notque/vexjoy-agent.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/process/worktree-agent .opencode/skills/worktree-agent && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "worktree-agent" agent skill from https://github.com/notque/vexjoy-agent/tree/main/skills/process/worktree-agent into .opencode/skills/worktree-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "worktree-agent", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
worktree-agentMandatory rules for agents in git worktree isolation. An agent skill from notque/vexjoy-agent.
Worktree Agent is an agent skill from notque/vexjoy-agent. Mandatory rules for agents in git worktree isolation.
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/tests/test_worktree_capacity.py` and `scripts/worktree_capacity.py`).
It sits in Development, covering Git worktrees. It works with Git and Ruff. The repository describes itself as: VexJoy AI Agent with Jev Intelligent Routing - /do routes plain-English requests to the right specialist agent and gates the work with reviews, tests, and a learning loop. The licence is MIT.
Read from SKILL.md and the folder at commit 5218674. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
gitruffbashpython3ghFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Worktree Agent loads about 1.5k tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 626 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from notque/vexjoy-agent at commit 5218674, republished under its MIT licence (© notque). 626 words, ~1,467 tokens.
.claude/skills/worktree-agent/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Mandatory rules for any agent dispatched with isolation: "worktree".
On start, run pwd. Your path MUST contain .claude/worktrees/.
If your CWD is the main repo path, STOP and report the error.
git checkout -b <branch-name>Never commit on the default worktree-agent-* branch. Create your feature branch FIRST.
If git checkout -b <branch-name> fails with "a branch named X already exists":
# Option A: the branch has no commits beyond main — safe to reset and reuse
git branch -D <branch-name>
git checkout -b <branch-name>
# Option B: the branch is checked out in another active worktree — use a unique name
git checkout -b <branch-name>-2 # or append timestamp: $(date +%s)If git checkout -b <branch-name> fails with "X is already used by worktree at Y":
# Branch is live in another worktree — use a unique suffix
git checkout -b <branch-name>-$(date +%s)To update a branch held by another worktree (e.g. an existing PR branch): work detached from origin/<branch> and push with git push origin HEAD:<branch>. gh pr merge's post-merge local-checkout errors are harmless.
Never hardcode absolute paths from the main repo. Use $(git rev-parse --show-toplevel)/path.
Exception: Reading gitignored ADR files requires the main repo absolute path.
Keep planning inline instead of creating task_plan.md. If the auto-plan hook fires, continue with the current task and keep your attention on implementation.
git add path/to/specific/file.pyNever git add ., git add -A, or git add --all. Verify with git diff --cached --stat.
Never write to paths outside your worktree directory. Never run git checkout in the main repo.
Use the commit message specified in your prompt. No attribution lines.
For any Python code changes, run both checks before pushing or creating a PR:
ruff check . --config pyproject.toml
ruff format --check . --config pyproject.tomlRunning only ruff check misses formatting violations. The Tests / lint CI job runs both — if you skip ruff format --check, the PR will fail CI and cannot merge due to branch protection.
Run the preflight script at the start of any worktree task to confirm clean state:
bash scripts/worktree-preflight.sh <intended-branch-name>If it exits 1, fix the reported issue before proceeding.
The dispatcher runs this before each implementation worktree:
python3 ~/.claude/skills/process/worktree-agent/scripts/worktree_capacity.py \
--repo "$(git rev-parse --show-toplevel)" --strictThe JSON report has three states:
| State | Dispatcher action |
|---|---|
ready (<80% used) | Create the one implementation checkout for the candidate. |
cleanup-soon (80–<85%) | Reclaim accepted clean checkouts before adding another. Use root read-only review work where possible. |
blocked (≥85%) | Integrate, deploy, verify, or reclaim; create no new checkout. |
The report lists clean candidates only. The dispatcher confirms their task is inactive before removal because Git cleanliness alone does not prove that fact.
| Task | Checkout policy |
|---|---|
| Source implementation or repair | One writable task worktree, reused through review corrections. |
| Code review, test-plan review, or read-only investigation | Read the candidate through git diff or git show from the repository root; allocate no checkout. |
| Large repository implementation | Create a sparse worktree containing declared source/test/config scopes; include whole-repository content only when the task requires it. |
For a sparse implementation checkout:
git worktree add --no-checkout <worktree-path> -b <branch> <base-sha>
git -C <worktree-path> sparse-checkout init --no-cone
git -C <worktree-path> sparse-checkout set --no-cone <declared-path>...
git -C <worktree-path> checkoutRecord any full-checkout reason in the dispatch handoff.
After integration or a PR merge, the dispatcher first confirms that the task is inactive and the checkout is clean, then runs:
git worktree remove -- <accepted-worktree-path>
bash scripts/worktree-cleanup.sh --forcegit worktree remove frees the materialized checkout while preserving its branch for recovery. The cleanup script then prunes stale .git/worktrees entries and removes merged harness branches.
| Failure | Rule | Without It |
|---|---|---|
| Agent edits main repo files | 1, 6 | Changes leak to main, get stashed/lost |
| Context wasted on task_plan.md | 4 | Implementation budget consumed by planning |
| Commit on wrong branch | 2 | Orchestrator merges wrong content |
| PR has changes from 2 ADRs | 5, 6 | Cross-contamination between agents |
| Branch locked by worktree | 2 | Fatal error on checkout |
| PR fails CI on format | 8 | Merge blocked; ruff format --check was skipped |
| New task fails to create worktree | 9 | Branch name collision from prior stale run |
© notque, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (scripts) in skills/process/worktree-agent of notque/vexjoy-agent.
Open the folder on GitHubat commit 5218674
Worktree Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Worktree Agent this skillnotque/vexjoy-agent | 435 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Finishing A Development Branchfarm-fe/farm | 5.6k | 33 repos | ~1.8k | Automated safety check: Pass | MIT | |
| Git Worktree Cleanuplobehub/lobehub | 83k | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Pre-Release PR Triagejamiepine/voicebox | 57k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Saleor Commit Workflowsaleor/saleor | 23k | — | ~575 | Automated safety check: Pass | BSD-3-Clause |
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
farm-fe/farm
A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…
lobehub/lobehub
Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.
jamiepine/voicebox
Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.
saleor/saleor
Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.
kbwo/ccmanager
Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.
notque/vexjoy-agent
Deterministic palette/matrix pixel art (not AI). An agent skill from notque/vexjoy-agent.
notque/vexjoy-agent
Pull request lifecycle: commit, codex review, sync, review, fix, status, cleanup, and PR mining.
notque/vexjoy-agent
Improve architecture across modules by deepening interfaces.
notque/vexjoy-agent
Code quality: cleanup, linting, formatting, quality gates. An agent skill from notque/vexjoy-agent.
notque/vexjoy-agent
Statistical rule discovery from Go codebase patterns. An agent skill from notque/vexjoy-agent.
notque/vexjoy-agent
Review and fix temporal references in code comments. An agent skill from notque/vexjoy-agent.
Categories
Mandatory rules for agents in git worktree isolation. An agent skill from notque/vexjoy-agent. Worktree Agent is an agent skill from notque/vexjoy-agent. Mandatory rules for agents in git worktree isolation.
Worktree Agent fits situations like: tasks that involve Git worktrees.
Run `npx skills add notque/vexjoy-agent --skill worktree-agent -a claude-code`. Or copy the skill folder (skills/process/worktree-agent in notque/vexjoy-agent) into .claude/skills/worktree-agent in your project. Claude Code loads it when a task matches its description.
Run `npx skills add notque/vexjoy-agent --skill worktree-agent -a codex`. Or copy the skill folder (skills/process/worktree-agent in notque/vexjoy-agent) into .agents/skills/worktree-agent in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add notque/vexjoy-agent --skill worktree-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktree-agent, .gemini/skills/worktree-agent, .github/skills/worktree-agent and .opencode/skills/worktree-agent in your project.
Going by SKILL.md and its folder, Worktree Agent needs Python for the scripts in its folder and the command-line tools its instructions call (git, ruff, bash, python3 and gh). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Worktree Agent is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Worktree Agent: Finishing a Development Branch (obra/superpowers, 296k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars) and Pre-Release PR Triage (jamiepine/voicebox, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
notque (a GitHub user) maintains it in notque/vexjoy-agent, which has 435 GitHub stars. The repository holds 61 skills in this directory. The repository was last updated on October 3, 2026.
Source: notque/vexjoy-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.