Port and process inspector for Windows, macOS and Linux (never kills)

Lists listening TCP and UDP ports with the owning PID and process name, and finds what holds a given port. It never stops anything; it only prints the command you could run.

ClaudeHermes AgentCodexCursorMIT (modify, redistribute and use commercially)Python

What it does

Finds the cause of "address already in use" errors.

  • Lists listening TCP ports and bound UDP ports with address, port, PID and process name
  • --port 3000 shows only the process holding that port
  • Uses netstat -ano and tasklist on Windows, lsof on macOS, and ss on Linux (falling back to lsof or netstat)
  • Prints the command you could run to stop it (taskkill /PID ... or kill ...), with a warning for system processes
  • Can parse saved command output from another machine
  • JSON output

How to use

python scripts/ports.py --port 3000
python scripts/ports.py --proto tcp

Ask the agent "what is using port 3000?" and it explains what the process is and the safest fix (quit the app normally, use another port, and so on). Works with Claude, Codex, Hermes Agent and Cursor.

Requirements

  • Python 3 (standard library only)
  • Built-in OS tools (Windows: netstat and tasklist; macOS: lsof; Linux: one of ss, lsof or netstat)

Caveats

  • It never stops a process; whether to stop one is your decision.
  • Without admin or root rights, macOS and Linux may hide other users' processes.
  • With WSL2 or Docker Desktop, a port-forwarding process may be shown as the owner.

How to install

  1. Unzip the downloaded file (it contains a port-process-inspector/ folder with SKILL.md).
  2. Copy the whole folder into your agent's skills folder.
    • Claude: ~/.claude/skills/ (per project: .claude/skills/)
    • Hermes Agent: ~/.hermes/skills/
    • Codex: ~/.agents/skills/ / Cursor: ~/.cursor/skills/
    • Claude app (claude.ai): upload the ZIP in Customize → Skills
  3. Restart the agent and check that the skill appears in its skill list.

Step-by-step install for Windows / Mac and each agent

Seller

HackStar

Skills that make everyday developer work faster and safer: Git, testing, APIs and security.

8 published skills

Seller profile and all skills