| name | up |
| description | Spin up a fresh dev environment in one shot — create a new git worktree off the latest master, provision it with the regular `pnpm worktree:up` (a private CLOUD dev deployment + seed), then start BOTH dev servers (Next + Convex watcher) as background tasks and verify the app responds. Use when the user says "/up", "spin up dev", "spin up a worktree", "new worktree", "start a fresh worktree", or otherwise wants a ready-to-use dev environment at the state of master. Dev-only — never touches production. |
Up
Get from "I want to work on something" to "a dev server is serving the app at
the state of master" in one guided flow:
new worktree off fresh master → pnpm worktree:up → start both servers → verify.
This is the regular (default) worktree:up path — a private CLOUD dev
deployment. Do NOT use --local / plane mode here. (Plane mode is a separate,
explicit choice; see "Local Convex backend" in CLAUDE.md.)
Everything here is dev-only and non-destructive, so run all steps
automatically without approval gates.
🚫 Safety rules (read first)
- Never touch production (
fantastic-dotterel-572): no convex deploy, no
prod env changes. This skill only creates a dev worktree + dev deployment.
- Branch off fresh
origin/master, not whatever the current checkout
happens to be — git fetch first so the worktree reflects the latest master.
- Don't reuse port 1041 (master checkout) —
worktree:up assigns this
worktree its own port automatically; never override it to 1041.
- Start servers, don't clobber existing ones. Each worktree has its own
port + private deployment, so a new one won't collide; just don't kill another
checkout's servers.
Set the toolchain PATH once at the top of every command:
export PATH="$HOME/.local/share/mise/shims:$PATH" (mise-provided node/pnpm).
Step 1 — Create the worktree off fresh master
git worktree add must target a path under the master checkout (compute it
so this works whether you're standing in master or another worktree). Pick a
short, memorable Docker-style name (adjective-surname); append a random hex
suffix so it never collides. Optionally seed the adjective/surname from what the
user said they'll work on.
export PATH="$HOME/.local/share/mise/shims:$PATH"
MASTER="$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")"
cd "$MASTER"
git fetch origin master --quiet
NAME="lucid-mclean-$(openssl rand -hex 3)"
git worktree add -b "claude/$NAME" ".claude/worktrees/$NAME" origin/master
The branch (claude/<name>) tracks origin/master, so it starts exactly at the
latest merged commit.
Step 2 — Provision it (private cloud dev deployment + seed)
Run the regular pnpm worktree:up from INSIDE the new worktree. It is
idempotent and does the whole setup: symlinks node_modules, copies
.env.local, provisions + selects a private cloud dev deployment (so it
never shares master's perceptive-husky-735), assigns + persists a unique
port, points origin-bound auth (PASSKEY_ORIGIN/SITE_URL) at it, enables
/dev-login, pushes schema + functions, seeds test data + standards, and writes
.claude/launch.json. Takes a few minutes (it pushes + seeds).
cd "$MASTER/.claude/worktrees/$NAME"
pnpm worktree:up
It finishes with ✅ Worktree ready on its own dev deployment, port <PORT>. —
note that port (also persisted as PORT= in this worktree's .env.local).
Step 3 — Start both dev servers as background tasks
Start BOTH as Claude background Bash tasks (not detached, not a separate
terminal) so they appear in the task list and a crash re-pings you. Use the
worktree dir as cwd and set the mise PATH in each.
pnpm dev:worktree
npx convex dev
Step 4 — Verify the app responds
Don't claim success until the port actually answers. Read the assigned port from
.env.local and curl the dev-login URL:
PORT="$(sed -n 's/^PORT=//p' .env.local)"
curl -s -o /dev/null -w "HTTP %{http_code}\n" "http://localhost:$PORT/dev-login?u=avery&to=/teacher"
Expect HTTP 200. Also confirm the Convex watcher logged Convex functions ready! (queries fail until it has). If the Next log shows it compiled
/dev-login and returned 200, you're up.
Finish
Report:
- the worktree path (
.claude/worktrees/<name>) and branch (claude/<name>),
- the master commit it's based on,
- the port and the ready-to-click sign-in URLs, e.g.
http://localhost:<PORT>/dev-login?u=avery&to=/teacher (admin)
http://localhost:<PORT>/dev-login?u=test-teacher-001&to=/teacher
http://localhost:<PORT>/dev-login?u=test-scholar-001&to=/scholar
- that both servers are running as background tasks.
When the session's done, the cleanup skill tears this down (stops the
servers, optionally removes the worktree + branch).