一键导入
detecting-port-conflicts
Detect EADDRINUSE and port conflicts, find what's using the port, and resolve it by killing the process or suggesting an alternative port.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Detect EADDRINUSE and port conflicts, find what's using the port, and resolve it by killing the process or suggesting an alternative port.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use Cursor's browser aria snapshots to audit a page for accessibility issues — missing labels, broken tab order, contrast, and ARIA misuse.
Add PostHog analytics to a web application, including event tracking, page views, feature flags, and session replay.
Generate OpenAPI/Swagger documentation for an API, including endpoint schemas, request/response types, and interactive docs UI.
Add authentication to a web application using NextAuth.js (Auth.js), including OAuth providers, session management, and protected routes.
Dockerize an application with a production-ready Dockerfile, docker-compose setup, and .dockerignore.
Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.
| name | detecting-port-conflicts |
| description | Detect EADDRINUSE and port conflicts, find what's using the port, and resolve it by killing the process or suggesting an alternative port. |
| user-invocable | true |
When a dev server fails to start because a port is already in use, diagnose and resolve it.
Scan terminal output for these patterns:
EADDRINUSEaddress already in usePort XXXX is already in usebind: address already in useOSError: [Errno 98] Address already in useExtract the port number from the error message.
Find what's using the port:
lsof -i :<PORT> -P -n
This shows the PID, process name, and user. Common culprits:
kill <PID>
# If it doesn't stop:
kill -9 <PID>
Then restart the original server.
Suggest the next available port:
# Check if port+1 is free
lsof -i :<PORT+1> -P -n
Update the dev server config or start command:
next dev -p <PORT>vite --port <PORT>PORT env varpython manage.py runserver <PORT>killall node
Only suggest this if the user confirms — it kills everything.
docker pslsof shows nothing, the port may be in TIME_WAIT state — just wait 30 seconds or use a different port