safe-port-kill

Terminate TCP LISTEN processes on a specified port using lsof.

2|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/tankygranny05/agent-box --skill safe-port-kill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-port-kill
Source: https://github.com/tankygranny05/agent-box/tree/main/agent-box/seed/claude-skills/safe-port-kill
Command: npx skills add https://github.com/tankygranny05/agent-box --skill safe-port-kill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill safely terminates processes listening on a specific TCP port, preventing accidental disconnection of active client connections.

Core Features & Use Cases

  • Targeted Process Termination: Kills only the server process (LISTEN state) on a given port.
  • Client Connection Preservation: Avoids killing established client connections to the server.
  • Use Case: When a service running on port 8080 is unresponsive, use this Skill to stop only the server process without affecting users currently connected to it.

Quick Start

Use the safe-port-kill skill to stop the process listening on port 8080.

Frequently Asked Questions about safe-port-kill

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

FAQPage Schema
How do I safely kill a process listening on a TCP port without dropping active client connections?

To safely kill a process on a TCP port, this Skill targets only the LISTEN state process for termination. It specifically prevents accidental disconnection of established client connections to the server during port conflict resolution.

How do I resolve a port conflict by terminating an unresponsive server process?

To resolve a port conflict, this Skill terminates the unresponsive server process listening on the specified TCP port. It stops the server process without affecting users currently connected to it.

Do I need lsof to terminate a process on a specific port?

Yes, you need the lsof command-line utility installed to terminate a process on a port. This Skill requires lsof for accurate process identification and targeted termination of TCP LISTEN processes.

What is the difference between killing a TCP LISTEN process and killing established connections?

Killing a TCP LISTEN process stops the server from accepting new connections, while killing established connections drops active users. This Skill targets only the LISTEN state process, preserving established client connections.

Can I use this approach to stop a service running on port 8080 without affecting connected clients?

Yes, you can stop a service running on port 8080 without affecting connected clients. The Skill performs targeted process termination on the LISTEN state, ensuring active client connections to the server are preserved.