dev-server
БесплатноЗапускает вложенные скриптыНе проверенManage Next.js dev servers across worktrees, and the worktrees themselves — create one (`wt new`), find finished ones (`wt stale`), remove them (`wt rm`)…
Об этом скилле
Dev Server Skill
Centralized management of Next.js dev servers across multiple git worktrees. The daemon handles port allocation, environment variable injection, and log aggregation so that any agent can access dev server logs regardless of who started the server.
Quick Start
# Check what's running
node .claude/skills/dev-server/cli.mjs status
# Start a dev server for current worktree
node .claude/skills/dev-server/cli.mjs start
# Start for a specific worktree
node .claude/skills/dev-server/cli.mjs start /path/to/worktree
# Start with a service on production (see Env modes)
node .claude/skills/dev-server/cli.mjs start /path/to/worktree --prod buzz
# View logs
node .claude/skills/dev-server/cli.mjs logs <session-id>
# Stop a session
node .claude/skills/dev-server/cli.mjs stop <session-id>
Checking if server is ready: After starting, poll the session status to check ready: true. The daemon marks sessions ready either via configured health check endpoint or by detecting "Ready" patterns in logs.
Which node the daemon runs on — and why it is sticky
The daemon is spawned with process.execPath (startDaemon in cli.mjs and console.mjs), i.e.
whatever node ran the CLI verb that first started it. It then passes its own environment down to every next dev it
supervises. So the node you happened to have on PATH the first time you typed any command above is the
node the whole tree runs on, until someone shuts the daemon down — and nothing records which one that was.
That is not academic. Measured on a dev box: the daemon was running on ambient node 26.7.0, while
.nvmrc pinned 24.19.0, package.json declares engines.node: ">=24.0.0 <25", and production was built
on node:24.19.0-alpine3.24. It had been started from a shell outside the dev shell, and that shell also
had no pnpm at all — which silently disables the daemon's own auto-install path (it shells out to
pnpm install / pnpm run db:generate when it sees the lockfile or the schema move).
The fix, whatever your setup: start it from a shell whose node --version matches .nvmrc and which
has pnpm on PATH. nvm use at the repo root gives you both.
On NixOS (optional) the flake wrapper does that for you — it takes node's major from .nvmrc
(the locked nixpkgs can lag .nvmrc's patch; see the note in flake.nix), puts pnpm on PATH, and exports the Prisma engine paths NixOS needs:
nix run .#dev-server -- status
nix run .#dev-server -- start
nix run .#dev-server -- logs <session-id>
Every node .claude/skills/dev-server/cli.mjs … invocation elsewhere in this document takes the same
subcommands — the wrapper only decides which node runs them, so nothing here depends on having Nix.
Either way, check what you have got before trusting a session:
# the daemon's real interpreter, not the one you assume.
# the pid file belongs to the skill dir the daemon RUNS FROM, which is the primary checkout — a
# relative path here reads the wrong tree's file, or none, when you are standing in a worktree.
readlink -f /proc/$(cat <primary-checkout>/.claude/skills/dev-server/daemon.pid)/exe
Changing node means restarting the daemon — cli.mjs shutdown, then start it again from the right shell.
A running daemon will not pick up a new PATH.
A second daemon: DEV_DAEMON_PORT
The daemon lives on 127.0.0.1:9444. Set DEV_DAEMON_PORT to stand another one beside it:
DEV_DAEMON_PORT=9555 node .claude/skills/dev-server/cli.mjs status
The CLI, the console, scripts/test-unit-run.mjs and the daemon itself all resolve the port through
scripts/daemon-port.mjs, and a daemon a client spawns inherits that client's environment — so no two
of them can disagree about where it is. Until 2026-08-19 the daemon did not read the variable at all,
and setting it pointed the client at a port nothing was serving.
The variable is only a default for the daemon; an explicit node scripts/daemon.mjs --port <port> still
wins. Each daemon owns the shared daemon.pid, so the last one started is the one that file names.
Never curl a dev port — probe instead
node .claude/skills/dev-server/cli.mjs probe /home
A dev server that has stopped serving properly does not refuse connections. It accepts and answers
slowly, or accepts and never answers — so an unbounded curl sits there until the 300s tool timeout
and returns nothing you can act on. Chaining a few in one shell call is how ten minutes disappear.
A PreToolUse hook blocks unbounded requests at dev ports for this reason; --max-time is the
escape hatch if you really want curl.
probe requests the route twice with a hard budget, reads the session's own log for those two
requests, and returns a verdict with the matching remedy. It always terminates.
UPSTREAM-SLOW http://localhost:3000/home
UPSTREAM-SLOW — the framework is fine; time is spent in application code (database, tunnel, cache).
Установить dev-server в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dev-server?
Manage Next.js dev servers across worktrees, and the worktrees themselves — create one (`wt new`), find finished ones (`wt stale`), remove them (`wt rm`). Start, stop, and read logs from dev servers. Agents can access logs from any running session, regardless of who started it. Use whenever creating, adding or removing a git worktree in this repo.
Как установить скилл dev-server?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-server запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic