ghost-proc-guard 进程守卫
挡住重复启动的开发服务器,并用 /procs 面板清理遗留进程。
> 给订单列表加上分页
⏺ 我先看看列表组件。
❯
示意。实际效果取决于 Mod、终端和运行环境。
安装
/plugin marketplace add thieung/claude-mods
/plugin install ghost-proc-guard@thieung-mods
/reload-plugins在 Claude Code 会话里逐行执行这些命令。
claude plugin marketplace add thieung/claude-mods
claude plugin install ghost-proc-guard@thieung-mods然后在会话里执行 /reload-plugins,或开一个新会话。
请帮我安装 Claude Code Mod「ghost-proc-guard 进程守卫」(https://github.com/thieung/claude-mods)。安装前先阅读仓库 README 的 Security 和 Requirements 部分,告诉我它会读写哪些内容、运行什么命令、是否联网,以及对 Claude Code 版本、系统和终端的要求。确认没有问题后,运行 claude plugin marketplace add thieung/claude-mods 和 claude plugin install ghost-proc-guard@thieung-mods 完成安装,最后提醒我在会话里执行 /reload-plugins。把这段话发给 Claude Code,它会先读原作者说明再安装。
git clone https://github.com/thieung/claude-mods
cd claude-mods
claude --plugin-dir ./ghost-proc-guard克隆仓库后用 --plugin-dir 在本地会话中试用。
它会碰什么
据原作者说明,收录时核对;可用 claude plugin validate 自行检查。
读取
有读取 Bash 命令文本,以及 package.json、workspace 与 vite/astro/wrangler 等配置以推算端口。
写入文件
有在插件存储保存已启动服务器的会话记录,供后续会话列出遗留进程。
运行命令
有运行 lsof、ps、git worktree;仅在你按停止时对进程树发 TERM/KILL。
联网
无介绍
ghost-proc-guard 是 Claude Code 的 function hooks Mod:在 Bash 启动 npm run dev、Vite、Next、uvicorn 等开发服务器前,推算端口与工作目录;若端口已被占用或同目录已有服务,则拒绝启动并说明谁占用了端口。支持 monorepo(turbo/pnpm filter 等)与 git worktree。允许的启动会加上会话标记;/procs 面板可按应用停止本 Mod 跟踪的进程树。不联网。会运行 lsof、ps、git worktree,并在你按停止时发 kill。作者写明在 macOS 上测试过。需要 Claude Code 2.1.287+。下方预览为示意。
适合谁
- 常开多个 worktree、容易重复启动 Vite/Next 的人
运行要求
- Claude Code ≥ 2.1.287
- 平台 · macOS
- 作者写明在 macOS 上测试;会话归属依赖 BSD ps -E。
- 只检查 Claude 经 Bash 启动的命令,不拦你在自己终端里开的服务。