AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Port Killer

skill-yuaicode-ai-skills-port-killer · by YuAICode

找出占用某端口的进程,列出 PID/命令/用户并给出 kill 命令;默认只查不杀,加 --kill --yes 才真杀。当用户说「X 端口被占了 / 杀掉占 X 端口的进程 / 谁在用 8080 / port killer」时触发。

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-yuaicode-ai-skills-port-killer

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-yuaicode-ai-skills-port-killer)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Port Killer? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

port-killer — 端口占用查杀

找出哪个进程在占用指定 TCP 端口,列出 PID / 命令 / 用户,给出杀进程命令——默认只查不杀,杀之前先让用户确认。

何时触发

  • "8080 端口被占了"
  • "谁在用 3000 端口"
  • "帮我杀掉占 9000 端口的进程"
  • "port killer"
  • "kill port X"
  • "这个端口被占了,启不起来"

工作流

  1. :跑 whoport.sh ,展示占用该端口的进程信息(PID / 命令 / 用户)。
  2. 展示:把结果呈现给用户,同时给出建议的 kill 命令供参考。
  3. 确认:若用户说"杀掉它",先复述将要杀的进程,等用户明确同意。
  4. :用户确认后,跑 whoport.sh --kill --yes 执行 SIGTERM。

> 默认只查,不自动杀。 杀进程是有副作用的操作,必须显式 --kill --yes 且用户已确认。

用法

# 只查(展示占用进程 + 建议命令,不杀)
bash /bin/whoport.sh 8080

# 查并杀(SIGTERM,需 --yes 二次确认)
bash /bin/whoport.sh 8080 --kill --yes

输出示例(只查)

端口 8080 被以下进程占用:
  PID    命令           用户
  12345  python3        alice
  12346  uvicorn        alice

建议:kill 12345 12346
顽固进程:kill -9 12345 12346
(本次仅查询,未执行 kill)

输出示例(加 --kill --yes)

将要杀死以下进程(SIGTERM):
  PID    命令           用户
  12345  python3        alice
已执行:kill 12345

环境变量

| 变量 | 说明 | |------|------| | LSOF | 覆盖 lsof 二进制路径(默认 lsof) |

边界

  • 只找 TCP LISTEN 状态(不含 UDP、已建立连接)。
  • 只发 SIGTERM(不自动 -9);顽固进程需用户手动 kill -9
  • 需要 lsof;没有时脚本给出 ss -ltnp / netstat 替代命令提示并 exit 1。
  • 端口号须为 1-65535 的整数,否则报错并 exit 1。
  • 不修改任何系统配置,只读 lsof 输出 + 发送信号。

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.