Install
$ agentstack add skill-yuaicode-ai-skills-port-killer ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →About
port-killer — 端口占用查杀
找出哪个进程在占用指定 TCP 端口,列出 PID / 命令 / 用户,给出杀进程命令——默认只查不杀,杀之前先让用户确认。
何时触发
- "8080 端口被占了"
- "谁在用 3000 端口"
- "帮我杀掉占 9000 端口的进程"
- "port killer"
- "kill port X"
- "这个端口被占了,启不起来"
工作流
- 查:跑
whoport.sh,展示占用该端口的进程信息(PID / 命令 / 用户)。 - 展示:把结果呈现给用户,同时给出建议的 kill 命令供参考。
- 确认:若用户说"杀掉它",先复述将要杀的进程,等用户明确同意。
- 杀:用户确认后,跑
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.
- Author: YuAICode
- Source: YuAICode/ai-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.