From forge
Create isolated git worktrees for feature work. Smart directory selection and safety verification.
npx claudepluginhub caseyrtalbot/forge --plugin forgeThis skill uses the workspace's default tool permissions.
Create an isolated git worktree for feature work so the main working directory stays clean. User-invoked only: do not auto-trigger this skill.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Guides root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.
Create an isolated git worktree for feature work so the main working directory stays clean. User-invoked only: do not auto-trigger this skill.
.worktrees/ or worktrees/ in the project root. If both exist, .worktrees/ wins..worktrees/ in the project root (local, hidden)~/.config/forge/worktrees/<project-name>/ (global location)Check: git check-ignore -q <directory> 2>/dev/null
If NOT ignored:
One missed check means worktree contents committed to the repository. No exceptions.
digraph isolate_work {
"Select directory" [shape=box];
"Safety check" [shape=box];
"gitignore verified?" [shape=diamond];
"Add to gitignore + commit" [shape=box];
"Create worktree" [shape=box];
"Install deps" [shape=box];
"Run baseline tests" [shape=box];
"Report" [shape=doublecircle];
"Select directory" -> "Safety check";
"Safety check" -> "gitignore verified?";
"gitignore verified?" -> "Create worktree" [label="yes"];
"gitignore verified?" -> "Add to gitignore + commit" [label="no"];
"Add to gitignore + commit" -> "Create worktree";
"Create worktree" -> "Install deps";
"Install deps" -> "Run baseline tests";
"Run baseline tests" -> "Report";
}
Create the worktree with a new branch:
git worktree add <dir>/<branch-name> -b <branch-name>
Branch naming: forge/<feature-name> by default, or user-specified.
Auto-detect project setup and install dependencies:
package.json found: npm install (or yarn install if yarn.lock present)Cargo.toml found: cargo buildpyproject.toml found: poetry installgo.mod found: go mod downloadRun baseline tests using the project's test command. This establishes a known-good state. If tests fail, report the failures and ask whether to proceed.
Report: worktree path, branch name, baseline test results.
"Skip the gitignore check" One missed check means worktree contents committed to the repo. The HARD-GATE exists for a reason.
"Skip baseline tests" Without a known-good baseline, you cannot distinguish new regressions from pre-existing failures.
"Hardcode setup commands" Auto-detect from project manifest files. Different projects use different tools.
"Assume the directory location" Follow the priority: existing directory, then CLAUDE.md, then ask the user. Consistency matters.
.gitignore (verified with git check-ignore)Handled by land-changes. When the user chooses merge, PR, keep, or discard, land-changes runs git worktree remove as part of workspace cleanup.