tercel/code-forge/worktree
Claude Code and agent skill by tercel/code-forge
- community
Checking that the SKILL.md file is still in the repository.
Use when starting feature work that needs workspace isolation — creates git worktree with automatic project setup and baseline test verification. Ensures worktree directory is git-ignored and safe. Integrates with code-forge:impl and code-forge:finish.
Install
npx vskill@latest install tercel/code-forge/worktreeSKILL.md
Code Forge — Worktree
⚡ Execution Entry Point
@../shared/execution-entrypoint.md
For this skill: start at the first executable step. If you catch yourself about to say "falling back to manual worktree setup", STOP and go to the indicated step.
Create an isolated git worktree for feature development with automated project setup and safety verification.
When to Use
- Starting feature work that should not affect the main workspace
- Before running code-forge:impl to isolate implementation changes
- When you need a clean baseline for testing or experimentation
Iron Law
NEVER create a project-local worktree without verifying it is git-ignored. Worktree contents tracked by git will cause repository corruption.
Workflow
Step 1: Detect Worktree Directory
Check in order:
- Existing
.worktrees/orworktrees/directory in project root — use if found - Project CLAUDE.md for worktree preference — use without asking
- Ask user:
- Project-local
.worktrees/(Recommended) — keeps worktrees near the code - Global
~/.config/code-forge/worktrees/— outside project, no .gitignore needed
Step 2: Verify Safety (Project-Local Only)
CRITICAL: If using a project-local directory:
- Ignored: Proceed
- NOT ignored: Add to
.gitignoreimmediately, then commit:
``bash echo "<worktree-dir>/" >> .gitignore git add .gitignore && git commit -m "chore: add worktree directory to .gitignore" ``
Global directory: skip this step.
Step 3: Create Worktree
Branch naming: use the feature name provided by the user, prefixed with feat/ if not already prefixed.
Step 4: Project Setup
Auto-detect and run setup in the worktree directory:
| Marker | Command | |
|---|---|---|
package.json | npm install | |
package-lock.json | npm ci | |
yarn.lock | yarn install | |
pnpm-lock.yaml | pnpm install | |
requirements.txt | pip install -r requirements.txt | |
pyproject.toml | pip install -e . or poetry install | |
Cargo.toml | cargo fetch | |
go.mod | go mod download | |
build.gradle | ./gradlew dependencies | |
pom.xml | mvn dependency:resolve |
If multiple markers exist, run the most specific one. If none match, skip setup.
Step 5: Baseline Tests
Run the project's test command to establish a clean baseline:
- All pass: Report green baseline, proceed
- Some fail: Warn user — "Baseline has N failing tests. These are pre-existing, not caused by your changes."
- No test command found: Skip, inform user
Step 6: Report
Example
Cleanup
To remove a stale worktree manually: git worktree remove <path>. List all worktrees with git worktree list. The /code-forge:finish skill handles cleanup automatically.
Common Mistakes
- Creating project-local worktree without checking .gitignore
- Skipping baseline tests — pre-existing failures mask new regressions
- Hardcoding setup commands instead of auto-detecting
- Proceeding when baseline tests fail without user acknowledgment
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/worktree/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
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/tercel/code-forge/worktree)