try-works/recursive-mode/recursive-worktree
Claude Code and agent skill by try-works/recursive-mode
- community
Checking that the SKILL.md file is still in the repository.
Use when starting any recursive-mode requirement to set up an isolated git worktree. Required before implementation phases: create an isolated workspace, verify a clean baseline, and keep main/master clean.
Install
npx vskill@latest install try-works/recursive-mode/recursive-worktreeSKILL.md
recursive-worktree
Purpose
Use this skill at the start of a recursive-mode run to set up an isolated worktree before Phase 1+ work begins.
The canonical overall workflow still lives in /.recursive/RECURSIVE.md. This skill covers only the worktree-isolation discipline for 00-worktree.md.
Hard Rule
Do not proceed with recursive-mode phase work until:
- A feature-branch worktree exists.
- The worktree directory is git-ignored if it lives inside the repo.
- Project setup has completed.
- A clean or explicitly acknowledged baseline test state has been recorded.
Default Location Order
Use this priority:
- Existing
.worktrees/ - Existing
worktrees/ - A preference documented in repo instructions
- Ask the user
- Default to
.worktrees/
Global fallback location:
~/.config/recursive-mode/worktrees/<project-name>/
Main Branch Protection
If the current branch is main or master, default to creating a worktree on a feature branch:
If the user explicitly insists on main-branch work, record that exception in 00-worktree.md.
Minimum Phase 0 Checklist
00-worktree.md must cover:
- selected worktree location
- git-ignore verification
- branch name and worktree path
- setup commands executed
- baseline test command and result
- normalized diff basis fields including
Baseline type,Baseline reference,Comparison reference,Normalized baseline,Normalized comparison, andNormalized diff command - explicit note that subsequent phases run from the worktree
- the required
## TODOheading from the scaffold
Suggested Commands
Check branch:
Check ignore status:
Create worktree:
Setup Guidance
Run the setup command that matches the repo:
- Node.js:
npm install - Rust:
cargo build - Python:
pip install -r requirements.txtor project-specific install - Go:
go mod download - Maven:
mvn compile -q - Gradle:
./gradlew compileJava - .NET:
dotnet restore
Then run the baseline test command appropriate to the project and record the result in 00-worktree.md.
Router State In Worktrees
Before delegated or routed work runs from an isolated worktree, verify the router files inside that same worktree:
If the controller/source repo has a configured router policy or discovery inventory and the worktree lacks it, sync both files into the worktree before resolving or invoking routed roles. Preserve user edits to the worktree policy; when changing bindings, prefer recursive-router-configure over hand edits.
recursive-router-discovered.json is local discovery state and may be untracked. Its absence in a fresh worktree is expected, but it is still not safe to resolve an external role from stale assumptions. Refresh it with python ./.recursive/scripts/recursive-router-probe.py --repo-root . --json from the worktree, or copy the current inventory from the controller/source repo when that is the intended policy basis.
Record the router policy path, discovery path, validation/probe command, and resulting route decision in 00-worktree.md or in the delegated action record before accepting routed work.
Output Contract
Write the artifact to:
/.recursive/run/<run-id>/00-worktree.md
Use feature branches named:
recursive/<run-id>
Routing Awareness
If this skill uses delegated review or any other routed external model to validate worktree setup, baseline verification, or branch safety, re-read:
/.recursive/config/recursive-router.json/.recursive/config/recursive-router-discovered.json
immediately before choosing that CLI/model, and honor the routed policy or explicit fallback instead of hardcoding a reviewer model.
Integration
- Invoke this skill before AS-IS analysis and planning.
- After Phase 0 is lock-valid, continue the run from the worktree context.
- Keep later phases, including
STATE.md,DECISIONS.md, and memory updates, on the same feature branch until merge time.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/recursive-worktree/SKILL.md
Popularity
- Repository stars
- 119
- Repository forks
- 9
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/try-works/recursive-mode/recursive-worktree)