Port Safety

Identify processes occupying network ports and terminate them after user confirmation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mshuffett/dotfiles --skill port-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Port Safety
Source: https://github.com/mshuffett/dotfiles/tree/main/agents/skills/port-safety
Command: npx skills add https://github.com/mshuffett/dotfiles --skill port-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents accidental termination of critical processes running on ports, ensuring system stability and avoiding unintended disruptions to development or production environments.

Core Features & Use Cases

  • Process Identification: Pinpoints the exact process occupying a specific network port.
  • Ownership Verification: Helps determine if a process was initiated by the current user or an unknown entity.
  • Permission-Based Termination: Guides the user through a safe termination process only after verifying ownership or obtaining explicit user consent.
  • Use Case: You need to start a new service on port 8080, but it's already in use. This Skill will help you identify what's running there and decide whether it's safe to stop.

Quick Start

Use the port safety skill to identify the process using port 8080.

Frequently Asked Questions about Port Safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely kill a process occupying a busy port?

To safely kill a process occupying a busy port, you must first identify the process using lsof, verify its ownership, and then prompt for explicit user confirmation before terminating it to ensure system stability.

What is the safest way to free up a network port already in use?

The safest way to free up a network port in use involves querying the port with lsof to pinpoint the exact process, verifying whether you initiated it, and only proceeding with termination after explicit user consent.

How do I check if a port is occupied by an orphaned development server?

You can check if a port is occupied by an orphaned development server by using the lsof command to query port usage, which pinpoints the exact process and helps determine if it is safe to stop.

Do I need lsof to identify and terminate processes on specific ports?

Yes, you need lsof to query port usage because it allows the safe termination process to identify the exact process occupying the network port and verify its ownership before any kill action is taken.

Why should I verify process ownership before killing a port process?

Verifying process ownership before killing a port process prevents the accidental termination of critical processes, ensuring system stability and avoiding unintended disruptions to your development or production environments.

Can I use this approach to stop unknown processes running on my development ports?

Yes, you can stop unknown processes on development ports by identifying the process with lsof and guiding the safe termination process only after verifying ownership or obtaining explicit user consent to avoid disruptions.