- Home
- Skills
- Petekp
- Claude Code Setup
- Dev Server
dev-server_skill
- Python
14
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill petekp/claude-code-setup --skill dev-server- SKILL.md2.4 KB
Overview
This skill starts local development servers with intelligent port management and environment detection. It handles port conflicts, cleans up stale processes when safe, picks the appropriate package manager, and opens the browser automatically. The goal is to get your app running with minimal fuss and safe defaults.
How this skill works
The skill first scans common dev ports to detect running processes and determines if they belong to the same project by comparing working directories. It then resolves conflicts by killing same-project processes automatically or prompting/choosing an alternate port for different projects. Next it detects the project environment (docker-compose, monorepo layout, framework) and selects the proper start command and package manager. Finally it launches the server with the correct port/open flags and falls back to opening the browser via a URL when needed.
When to use it
- When you want to "start the dev server", "run dev", or "launch the server" locally.
- When a port conflict prevents your app from starting and you need safe conflict resolution.
- When working in monorepos or projects with multiple package managers and you want automatic detection.
- When you prefer automatic browser opening after the dev server becomes available.
- When you need to spin up a Docker-based web service and get a recommendation for docker compose.
Best practices
- Run the skill from the project root to enable accurate ownership detection.
- Prefer --kill-if-same for non-interactive workflows to safely replace stale same-project processes.
- Use project-specific scripts (dev) in package.json to ensure consistent startup behavior in monorepos.
- Commit lockfiles so package manager detection (bun/pnpm/yarn/npm) is reliable.
- Choose an explicit port with --port when sharing machines to avoid surprises.
Example use cases
- You run "start the dev server" and the skill finds port 3000 in use by an old instance; it kills it and reboots the app.
- In a monorepo, it detects apps/web/package.json and runs the correct dev script for that subproject.
- On a Docker project with docker-compose.yml, it suggests using docker compose up instead of npm run.
- A colleague accidentally started a different project on your port; the skill prompts and selects an alternate port.
- Your framework doesn’t honor --open; the skill starts the server and opens http://localhost:PORT in your browser.
FAQ
It compares the running process working directory to the current directory and treats parent/child paths as the same project.
What if my framework uses a nonstandard port flag?
The skill knows common exceptions (e.g., CRA uses PORT env var, Gatsby uses -p) and applies appropriate flags or env variables.
Can it force-kill a process?
Yes. Use the force option to kill any process, but by default it prompts when the process appears to belong to a different project.