---
name: whousemyport-port-diagnostics
description: Diagnose localhost port conflicts with WhoUseMyPort reports or native macOS and Windows commands. Use when the user asks which process owns a port, why a local server cannot start, or whether a process is safe to stop.
homepage: https://whousemyport.com/guide
metadata: {"openclaw":{"emoji":"🔍","os":["darwin","win32"]}}
---

# WhoUseMyPort Port Diagnostics

Use this skill for blocked local ports, stale dev servers, duplicate listeners, and "address already in use" errors on macOS or Windows.

## Preferred workflow

1. Ask the user for a WhoUseMyPort export if they have the desktop app open.
2. Prefer the app's "Export for OpenClaw" output over screenshots because it includes structured port, PID, process, state, and command data.
3. Read the report in this order:
   - `Summary`
   - `Filters`
   - `Ports`
4. Focus on `LISTEN` sockets first when the user is trying to start a local service.
5. Use the process name and command before recommending termination. Do not recommend killing a process based only on the port number.

## If the user does not have an export

- On macOS, fall back to:
  - `lsof -i -P -n | grep LISTEN`
  - `lsof -iTCP:<port> -sTCP:LISTEN -P -n`
- On Windows, fall back to:
  - `netstat -ano | findstr :<port>`
  - `tasklist /FI "PID eq <pid>"`

## Response rules

- Explain whether the port is a listener, an active connection, or a closing socket.
- Call out if the same process appears on multiple related ports.
- If the command suggests a database, container runtime, proxy, or system service, recommend a graceful restart path before force-kill.
- If the report is filtered, say so before drawing conclusions from missing rows.
- When you recommend a kill, state exactly which PID and command you mean.

## Good user prompts

- "Why can my local server not bind to port 3000?"
- "Here is my WhoUseMyPort export, tell me which process is blocking 5173."
- "Is it safe to stop the process listening on 5432?"
