From claude-resources
Tweaks package.json dev/serve commands: adds pre-scripts to kill stale ports (--kill) and :net variants for LAN access via 0.0.0.0 host (--net). Detects ports/frameworks like Next.js, Astro, Vite.
npx claudepluginhub takazudo/claude-resources--kill and/or --netThis skill uses the workspace's default tool permissions.
Tweak serving-related commands in package.json. Requires `--kill` and/or `--net` flag.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
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",