Install
openclaw skills install @mertbuilds/implementBuild a feature in an isolated worktrunk worktree, commit, and open a draft PR. Use whenever the user asks to implement, build, add, or fix something that touches code — e.g. '/implement', 'implement X', 'build X', 'add X', 'fix X', 'let's build it', 'ship it', 'drop this in', 'go code it up'. Skip for questions, explanations, research, and trivial one-line docs/config edits. Skip if already inside a worktrunk worktree (just implement directly).
openclaw skills install @mertbuilds/implementA lean implementation flow. You've already discussed what to build in the conversation — this skill takes it from there: isolate to a worktree, implement, commit, push, open a draft PR. Stay in the worktree so the user can iterate on review feedback without switching. The PR is the merge path; wt merge is never used.
/worktree-dev:worktree-dev flow insteadState in one sentence what you're about to build. Trust the conversation context — don't open an AskUserQuestion loop.
/worktree-dev:worktree-dev and stop.Pick a descriptive branch name. Use repo convention prefixes (fix/, add/, feat/, chore/, refactor/, perf/) — check git log --oneline -10 if unsure.
wt switch --create <branch-name> --yes
This switches your working directory into the new worktree.
tsc --noEmit, bun run lint, cargo check, etc.), run it once before committing. Don't fabricate commands; if unsure what the repo uses, skip.git commit -m "$(cat <<'EOF'
<short message — match recent commit style>
EOF
)"
Rules (same as /commit):
git log --oneline -10).--no-verify. Never --amend.git push -u origin <branch-name>
Detect the base branch:
gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'
Open a draft PR:
gh pr create --draft --title "<short title, under 70 chars>" --body "$(cat <<'EOF'
## Summary
<1-3 bullets — what changed and why>
## Test plan
- [ ] <relevant check>
- [ ] <relevant check>
EOF
)"
fix/DEV-123-..., feat/42-...), include Closes #<number> in the body.The whole point of worktree isolation is that multiple features can run side-by-side on different ports. Next.js, Vite, and most modern frameworks auto-increment the port if the default is taken — no flags needed.
Env files should already be present — worktrunk's user-level post-create hook at ~/.config/worktrunk/config.toml runs wt step copy-ignored after every wt switch --create, which copies .env.local, .env.*, node_modules, and other gitignored files from the source worktree. If the dev server fails on missing process.env.X, the hook didn't fire — fall back to a manual wt step copy-ignored --from <source-branch> before retrying.
package.json for a dev script. If none exists (or the project isn't web/JS), skip this step.bun.lockb → bun, pnpm-lock.yaml → pnpm, yarn.lock → yarn, else npm.run_in_background: true:
<pkg-manager> run dev
BashOutput until you see the "ready"/"local"/"listening" line that includes a port (http://localhost:3001, :5174, etc.).If the ready line doesn't appear within ~15 seconds, report that startup is still in progress, give the expected port (default + worktree count), and continue — don't block the skill on server startup.
Tell the user:
http://localhost:<port>wt remove to clean up."When the user signals the implement flow is done — PR approved, no more in-session iteration needed, or they switch topics — kill any background tasks this skill started so they don't leak across sessions.
kill the background task id, or ps aux | grep -E "next.dev|vite|bun.*dev" | grep -v grep | awk '{print $2}' | xargs -r killrun_in_background: true tasks this skill startedIf the user is actively iterating (asking for follow-up edits in the same session), keep the server running — they'll want the preview. The trigger for cleanup is session boundary, not every tool call.
wt switch - back to the original worktree — stay here for iteration.wt merge — merging happens via the PR in GitHub.wt remove — that's manual after PR merge./worktree-dev:worktree-dev.--no-verify, no amending existing commits.