
Detecting Port Conflicts
- 208 installs
- 655 repo stars
- Updated August 2, 2026
- spencerpauly/awesome-cursor-skills
Helps with ai & agent building tasks.
About
detecting-port-conflicts is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- detecting-port-conflicts
- AI & Agent Building
- AI-coding skill
Detecting Port Conflicts by the numbers
- 208 all-time installs (skills.sh)
- +24 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #2,809 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill detecting-port-conflictsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 208 |
|---|---|
| repo stars | ★ 655 |
| Last updated | August 2, 2026 |
| Repository | spencerpauly/awesome-cursor-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Detecting Port Conflicts
When a dev server fails to start because a port is already in use, diagnose and resolve it.
Detection
Scan terminal output for these patterns:
EADDRINUSEaddress already in usePort XXXX is already in usebind: address already in useOSError: [Errno 98] Address already in use
Extract the port number from the error message.
Diagnosis
Find what's using the port:
lsof -i :<PORT> -P -nThis shows the PID, process name, and user. Common culprits:
- A previous dev server that didn't shut down cleanly
- Another project's dev server
- A Docker container
- A system service
Resolution Options
Option 1: Kill the blocking process
kill <PID>
# If it doesn't stop:
kill -9 <PID>Then restart the original server.
Option 2: Use a different port
Suggest the next available port:
# Check if port+1 is free
lsof -i :<PORT+1> -P -nUpdate the dev server config or start command:
- Next.js:
next dev -p <PORT> - Vite:
vite --port <PORT> - Express: set
PORTenv var - Django:
python manage.py runserver <PORT>
Option 3: Kill all node processes (nuclear option)
killall nodeOnly suggest this if the user confirms — it kills everything.
Tips
- On macOS, ports below 1024 require root
- Docker containers bind ports that persist even if the container is stopped — check
docker ps - If
lsofshows nothing, the port may be in TIME_WAIT state — just wait 30 seconds or use a different port