From claude-resources
Tweaks serve/dev commands in package.json: adds port-kill pre-scripts (--kill) and LAN-accessible :net variants (--net). Detects framework and port automatically.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:dev-tweak-serve-package-json --kill and/or --net--kill and/or --netThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Tweak serving-related commands in package.json. Requires `--kill` and/or `--net` flag.
Tweak serving-related commands in package.json. Requires --kill and/or --net flag.
dev, serve, preview, start, etc.)--kill flagAdd port-killing before serve commands so stale processes don't block startup.
For each serve command, detect the port it uses and add a preXXX script that kills it:
"predev": "lsof -ti :PORT | xargs kill 2>/dev/null; true",
"dev": "astro dev",
preXXX npm lifecycle hook naming (e.g., predev for dev, preserve for serve)lsof -ti :PORT | xargs kill 2>/dev/null; truepreXXX script already exists, prepend the kill command to it-p PORT or --port PORT flag in the command--net flagCreate :net suffixed variants of serve commands that bind to 0.0.0.0 for LAN access.
For each serve command, create a COMMAND:net variant:
"dev": "astro dev",
"dev:net": "astro dev --host 0.0.0.0",
| Framework | Flag |
|---|---|
| Astro | --host 0.0.0.0 |
| Next.js | -H 0.0.0.0 |
| Vite / Vitest | --host 0.0.0.0 |
| Webpack Dev Server | --host 0.0.0.0 |
| serve (npm) | -l tcp://0.0.0.0:PORT or --listen tcp://0.0.0.0:PORT |
| http-server | -a 0.0.0.0 |
| Docusaurus | --host 0.0.0.0 |
:net variant immediately after the original command0.0.0.0--kill is also specified, the :net variant should also get a matching preXXX:net kill scriptWhen both --kill and --net are specified, apply both tweaks. Example result:
"predev": "lsof -ti :4321 | xargs kill 2>/dev/null; true",
"dev": "astro dev",
"predev:net": "lsof -ti :4321 | xargs kill 2>/dev/null; true",
"dev:net": "astro dev --host 0.0.0.0",
npx claudepluginhub takazudo/claude-resources --plugin claude-resourcesGenerates bash scripts for dev server lifecycle (start/stop/status/ports) from detected project structure and package manager (pnpm/bun/yarn/npm/Cargo/Go).
Sets up a dev server that auto-rotates to the next free port instead of killing the process on the preferred port. Ships a port-probe helper and launcher template.
Manages NPM packages, configures Node.js projects, handles dependencies, and troubleshoots issues using npm, yarn, or pnpm.