AgentSkillsCN

kill

通过进程 ID、进程名称或容器 ID,终止操作系统进程或 Docker 容器。

SKILL.md
--- frontmatter
name: kill
description: Terminate OS processes or Docker containers by PID, name, or container ID
allowed-tools:
  - Bash(kill *)
  - Bash(pkill *)
  - Bash(docker stop *)
  - Bash(docker kill *)
  - Bash(lsof *)
  - Bash(ps *)

Kill Skill

Terminate processes or Docker containers that are blocking ports, consuming resources, or otherwise interfering with development. Like a strike to a vital pressure point, this skill removes obstacles with clinical efficiency.

Capabilities

OS Process Management

  • Kill by PID: Terminate processes by PID: kill <pid> or kill -9 <pid> for force kill.
  • Kill by Name: Terminate processes by name: pkill <name> or pkill -9 <name> for force kill.
  • Find Port Owners: Find processes using a specific port: lsof -i :<port>.
  • List Processes: List running processes: ps aux or ps aux | grep <pattern>.

Docker Container Management

  • Stop Containers: Stop containers gracefully: docker stop <container>.
  • Kill Containers: Force kill containers: docker kill <container>.
  • List Containers: List running containers with docker ps to identify targets.

Usage Examples

Kill a process by PID:

code
/kill 12345

Kill processes by name (Area Sweep):

code
/kill node

Free up a blocked port (Free the Chi):

code
/kill port 3000

Stop a Docker container:

code
/kill container my-app

Safety Notes

  • Always attempt graceful termination before force kill.
  • Verify the target process/container before termination.
  • Be cautious with system processes. A true master knows which targets to avoid.