source-command-kill-servers
Use this skill when the user asks to run the migrated source command kill-servers.
Command Template
# 1. Kill known dean-stack server processes by command-line pattern.
pkill -f "storybook dev" || true
pkill -f "vite preview" || true
pkill -f "vite dev" || true
pkill -f "biome.*watch" || true
pkill -f "stylelint.*watch" || true
# 2. Let the OS reclaim TCP sockets out of TIME_WAIT.
sleep 2
# 3. Verify the gate-relevant ports are free.
# 3000 = vite preview (app, app-offline Playwright projects).
# 5173 = vite dev (Vite default).
# 6006 = storybook dev (storybook Playwright project).
lsof -i :3000 -i :5173 -i :6006 2>/dev/null | grep LISTEN || echo "all clear"
# 4. If anything is STILL listening (rare — usually a child process whose parent
# was already killed), escalate with port-targeted SIGKILL.
lsof -ti :3000,:5173,:6006 2>/dev/null | xargs kill -9 2>/dev/null || true