Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dev-env

БесплатноЗапускает вложенные скриптыНе проверен

Start, health-check and stop the ShieldBattery dev stack (Node server, Rust GraphQL server, app renderer dev server, Postgres/Redis) with the dev-stack…

ShieldBatteryот ShieldBattery★ 232 звезды на GitHub

Об этом скилле

Running the dev stack

pnpm run local-dev bundles every service into a run-pty TUI. That's great for a human but unusable for an agent: you can't read its panes or control individual services. Use dev-stack.mjs instead. It works from any directory and from Git Bash or PowerShell, and it resolves the checkout from its own location, so a copy in a git worktree drives that worktree.

node .claude/skills/dev-env/dev-stack.mjs status                 # what is up, whose it is, is it stale
node .claude/skills/dev-env/dev-stack.mjs start                  # node + rust (enough for the web client)
node .claude/skills/dev-env/dev-stack.mjs start node rust renderer   # also the renderer, for the Electron app
node .claude/skills/dev-env/dev-stack.mjs logs node -n 80        # formatted tail of a service's log
node .claude/skills/dev-env/dev-stack.mjs restart node           # after changing server code
node .claude/skills/dev-env/dev-stack.mjs stop                   # everything dev-stack started

Service map

Service Port What dev-stack runs Purpose
Postgres + Redis 5433 / 6380 Docker shieldbattery-db-1 / shieldbattery-redis-1 DB + cache (see .env)
node web server 5555 server/app.ts (what pnpm run start-server runs) HTTP API + serves the web client (Vite middleware in dev)
rust GraphQL server 5556 cargo run in server-rs/ GraphQL API (/gql)
renderer dev server 5566 Vite (what pnpm run dev runs) Serves the Electron renderer + HMR
GraphQL codegen watch n/a not managed: pnpm run gen-graphql --watch (optional) Regenerates client/gql/ on schema change
Tailscale funnel n/a not managed: node tools/dev-funnel.mjs Webhooks from a remote rp2 coordinator (see below)
Electron app n/a the verify-app skill's sb-app.mjs The actual desktop client

Config (ports, DB creds, DATABASE_URL) lives in .env. SB_CANONICAL_HOST is http://localhost:5555. The renderer is only needed for the Electron app; the web client served by node at :5555 does not use it.

Other listeners you may find, which are not the dev stack:

  • :5527 is the integration-test container (integration-app-server-1) serving a production build. Don't test against it.
  • :6379 belongs to a different project's Redis. Ours is 6380 (SB_REDIS_PORT), used by both servers and by matchmaking's pub/sub.

Look before you start: status

Run status first, every time. It shows, per service: up or down, the owning PID and when it started, HTTP health, and whether dev-stack started it or it is external (the developer's own local-dev panes, or another session's leftovers), with the external process's command line.

Two things to read from it:

  • A port that is already listening is left alone by start. You will be testing against that process, whoever started it. A health check on the port can't tell you whose code is answering.
  • WARNING stale: means the process started before the newest commit (or uncommitted edit) touching the code it serves. A stale server produces failures that look like bugs in your change: an empty or throwing lobby, 400 "clientIds" is required on login from a freshly built app, a route that rejects a parameter you just added. Restart it before testing (restart node).

Restarting an external process needs --force, which prints the PID and command line it killed. Local dev services are fine to restart without asking, but be precise and say so:

  • Kill only the service that is in your way, never the whole stack.
  • Tell the user when you replaced one of their processes, and again when you stop yours, since they may want their own back (their local-dev pane will show a dead process).
  • If you are a subagent, don't replace an external server unless your brief says to. Report the stale warning to the parent instead.

Start

start does the whole sequence and prints the final status:

  1. Starts the Postgres/Redis containers if they're stopped (never prunes or recreates them).
  2. Applies pending migrations (migrations/, the same thing pnpm run migrate:run does). A DB that is behind shows up as 500 on login or as sqlx::query! compile errors from cargo run.
  3. For each requested service whose port is free: starts it detached, with output going to a log file,
Полный SKILL.md на GitHub

Установить dev-env в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

dev-stack.mjsstack-common.mjs

FAQ

Что делает скилл dev-env?

Start, health-check and stop the ShieldBattery dev stack (Node server, Rust GraphQL server, app renderer dev server, Postgres/Redis) with the dev-stack script. Use this whenever you need the servers running to verify a change, look at a web client or /dev page, or before launching the Electron app, instead of `pnpm run local-dev` (which is an interactive run-pty TUI you can't drive or read).

Как установить скилл dev-env?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dev-env запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить dev-env с