Agent skill
dev-server
Start development servers with intelligent port management. Use when asked to "start the dev server", "run dev", "start development", "launch the server", "spin up the app", "get this running", "boot the frontend", or any request to run a local development server. Handles port conflicts, detects project type, cleans up stale processes, and opens the browser automatically.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/dev-server
Metadata
Additional technical details for this skill
- author
- petekp
- version
- 0.1.0
SKILL.md
Dev Server
Workflow
- Check ports - Run
scripts/check_ports.shto scan common dev ports - Resolve conflicts:
- Same project: Use
--kill-if-sameto kill without asking - Different project: Ask user before killing or use alternate port
- Same project: Use
- Detect environment - Check for docker-compose.yml, monorepo structure, or package.json
- Start server - Use detected package manager with
--openflag; add--port <n>if needed
Port Script
scripts/check_ports.sh # Scan ports, show which project each belongs to
scripts/check_ports.sh 3000 # Check specific port with project info
scripts/check_ports.sh --find 3000 # Find first available port
scripts/check_ports.sh --kill-if-same 3000 # Kill only if same project (safe)
scripts/check_ports.sh --kill 3000 # Force kill (ask user first if different project)
The script detects project ownership by comparing the process's working directory to the current directory. "Same project" means the process was started from this directory or a parent/child of it.
Environment Detection
Docker projects: If docker-compose.yml exists with a web/app service, suggest docker compose up instead.
Monorepos: Check if current directory has package.json with dev script. If not, look for:
apps/web/package.jsonorpackages/app/package.json(Turborepo/Nx pattern)- Root package.json with workspace
devscript that delegates
Package manager: Detect from lockfile (bun.lockb → bun, pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm).
Framework Notes
Most frameworks support --open and --port flags. Exceptions:
| Framework | Default Port | Notes |
|---|---|---|
| Create React App | 3000 | Uses PORT=3001 env var instead of --port |
| Gatsby | 8000 | Uses -p instead of --port |
| Remix | 3000 | --port works in dev mode |
When --open doesn't work, fall back to open http://localhost:PORT after server starts.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?