by RabbittuX
🐾 Purrge — macOS AI 磁盘清理工具,支持 Claude Code 和 Codex:空间不足时提醒,AI 逐项判断能清什么,你勾选确认后才清理
# Add to your Claude Code skills
git clone https://github.com/RabbittuX/purrgeSee how purrge compares with popular alternatives.
purrge is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by RabbittuX. 🐾 Purrge — macOS AI 磁盘清理工具,支持 Claude Code 和 Codex:空间不足时提醒,AI 逐项判断能清什么,你勾选确认后才清理. It has 57 GitHub stars.
purrge's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/RabbittuX/purrge" and add it to your Claude Code skills directory (see the Installation section above).
purrge is primarily written in Python. It is open-source under RabbittuX on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh purrge against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
基于 AI 的磁盘空间管理工具(macOS / Windows):低空间预警、智能识别可清理项、经用户审批后执行清理。
名称取自 purr(猫咪呼噜)与 purge(清除)· by RabbittuX
Install-Module Purrge + Install-Purrge 即可安装;模块自带完整代码,安装时不再访问 GitHub。purrge update,自动备份旧版本,新版本自检不通过会自动换回;有新版本时 purrge status 和审查页会提示。purrge uninstall --purge 会一并清掉后台任务、purrge 命令、AI 里的说明文件、设置与扫描记录。从 0.2.x 升级请看更新一节:旧版本需要手动更新这一次,之后就能用
purrge update了。
🔔 低空间预警
后台服务定时检测磁盘剩余空间,低于设定阈值时发出提醒。检测过程不调用 AI,不消耗额度。
🧠 AI 智能分析
调用本机的 Claude Code、Codex、WorkBuddy 或 DeepSeek Harness,对缓存、安装包、媒体文件及历史项目逐项评估,说明其用途、闲置时长及清理影响。
✅ 用户审批
可重建的缓存默认选中,用户文件默认不选。仅执行用户勾选并确认的清理项,AI 不具备删除权限。
[!WARNING] 请认准官方来源。 Purrge 只有两个官方仓库:
RabbittuX/purrge和RabbittuX/homebrew-tap(作者名 RabbittuX,两个 t、结尾大写 X)。
- GitHub 上另有多个同名的 purrge 项目,与本项目无关,其中部分自称"清理垃圾"的项目来源不明,请勿安装。
- Homebrew 中的
purge(单个 r)是另一款软件;请使用完整名称rabbittux/tap/purrge。- PowerShell Gallery 中的官方模块名为
Purrge(作者 RabbittuX,发布账号 yin),页面地址 powershellgallery.com/packages/Purrge。- 安装开始时会显示「Purrge 版本号 by RabbittuX 官方来源:GitHub RabbittuX/purrge」,可据此核对;也可随时运行
purrge version查看。
方式一:Homebrew(推荐)
brew install rabbittux/tap/purrge
purrge install
方式二:一键脚本
curl -fsSL https://raw.githubusercontent.com/RabbittuX/purrge/master/install.sh | bash
# 国内网络:改从 codeload 下载完整代码再安装
curl -fsSL https://codeload.github.com/RabbittuX/purrge/tar.gz/refs/heads/master | tar -xz -C /tmp && bash /tmp/purrge-master/install.sh
# 从源码安装
git clone https://github.com/RabbittuX/purrge.git
cd purrge && bash install.sh
# 非交互式安装(engine 可选 claude / codex / workbuddy / deepseek)
bash install.sh --engine codex --threshold 20 --yes
打开「Windows PowerShell」(不需要管理员权限),执行:
Install-Module Purrge -Scope CurrentUser
Install-Purrge
Install-Module 时,Windows 会询问是否安装 NuGet 组件、是否信任 PSGallery 仓库,输入 Y 回车即可。purrge 命令。# 一行脚本(从 GitHub 下载)
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; irm https://raw.githubusercontent.com/RabbittuX/purrge/master/install.ps1 | iex
上面这条报错「基础连接已经关闭」或「连接被重置」时(国内网络经常拦截 raw.githubusercontent.com),改用下面这条,从 codeload.github.com 下载完整代码后安装:
[Net.ServicePointManager]::SecurityProtocol='Tls12'; $ProgressPreference='SilentlyContinue'; $t="$env:TEMP\purrge-dl"; Remove-Item $t -Recurse -Force -ErrorAction SilentlyContinue; New-Item -ItemType Directory $t | Out-Null; Invoke-WebRequest https://codeload.github.com/RabbittuX/purrge/zip/refs/heads/master -OutFile "$t\p.zip" -UseBasicParsing; Expand-Archive "$t\p.zip" $t; iex (Get-Content -Raw -Encoding UTF8 (Get-ChildItem $t -Recurse -Filter install.ps1 | Select-Object -First 1).FullName)
在 Claude Code、Codex 或 WorkBuddy 中输入:
帮我安装 GitHub 上的 RabbittuX/purrge,只认作者 RabbittuX,找不到就先问我,不要安装同名的其他项目
AI 会读取本仓库的安装指引完成安装,并自动选用当前的 AI 作为分析引擎。
| 引擎 | 调用方式 | 说明 |
|---|---|---|
| Claude Code | claude -p --tools "" |
关闭全部工具 |
| Codex | codex exec --sandbox read-only |
只读沙箱,支持免费账号 |
| WorkBuddy | CodeBuddy 命令行 codebuddy -p --tools "" |
关闭全部工具;与 WorkBuddy 同一账号、同一积分;首次需运行 codebuddy 并输入 /login 登录 |
| DeepSeek Harness | dsh --profile headless + 关工具补丁 |
关闭全部工具,补丁未生效时拒绝调用;需要 DeepSeek API Key,只保存在本机 |
随时切换:purrge engine claude | codex | workbuddy | deepseek。
purrge update
自动识别安装方式(Homebrew / 脚本),先备份再更新,设置、扫描记录和 AI 引擎都保留;新版本自检不通过会自动换回旧版本。有新版本时,purrge status 和审查页会提示。
[!NOTE] 从 0.2.x 升级:0.2.x 还没有
purrge update命令,需要手动更新这一次,之后就可以用purrge update了。
- Homebrew 安装的:
brew upgrade rabbittux/tap/purrge && purrge update(设置和 AI 引擎都保留)- 脚本安装的:重新运行一遍上面的安装命令
| 操作 | 终端命令 | 在 Claude Code / Codex / WorkBuddy 中说 |
|---|---|---|
| 立即扫描 | purrge scan |
"磁盘快满了,帮我清理一下" |
| 重新打开上次的审查页 | purrge review |
— |
| 查看状态 | purrge status |
"硬盘还剩多少" |
| 修改阈值 | purrge config thresholdGB 20 |
"阈值改成 20G" |
| 查看 / 切换 AI 引擎 | purrge engine、purrge engine workbuddy |
— |
| 更新到最新版 | purrge update |
"帮我更新 Purrge" |
| 停用提醒 | purrge uninstall |
"关掉磁盘提醒" |
| 查看版本 | purrge version |
— |
purrge uninstall # 关闭后台监控,移除 purrge 命令和 AI 里的说明文件(保留设置和扫描记录)
purrge uninstall --purge # 同时删除设置、扫描记录以及 Purrge 自带的 Node.js
brew uninstall purrge。Uninstall-Module Purrge。后台检测(每 30 分钟)──低于阈值──▶ 提醒用户 ──用户同意──▶ 扫描(约 10 秒)
│
执行清理 ◀──用户确认── 审查页面 ◀── AI 逐项分析(约 30~60 秒)
审查页面将分析结果分为三类:
| 分类 | 范围 | 默认状态 | 处理方式 |
|---|---|---|---|
| 🟢 首要清理 | 可自动重建的缓存(浏览器、npm、Xcode、剪映等) | 已选中 | 直接删除 |
| 🟡 需要你决定 | 用户文件及重建成本较高的内容 | 未选中 | 移至废纸篓 / 回收站(可在设置中改为直接删除) |
| 🔒 不会清理 | 保护名单内的路径、版本库、使用中的项目 | 不可选 | 仅作展示 |
~/Library/Caches 下的大型缓存目录、通过 Spotlight 检索的 500 MB 以上文件%TEMP%)、AppData 下的浏览器与开发工具缓存、常用目录中的大文件127.0.0.1 并使用一次性令牌,清理完成或闲置 30 分钟后自动关闭。| 配置项 | 默认值 | 说明 |
|---|---|---|
thresholdGB |
15 |
提醒阈值(GB) |
intervalMinutes |
30 |
后台检测间隔(分钟) |
cooldownHours |
6 |
提醒后的静默时长(小时) |
optionalAction |
trash |
「需要你决定」类项目的处理方式:trash 移至废纸篓,delete 直接删除 |
protect |
[] |
自定义保护路径,始终不予清理 |
aiEngine |
安装时选择 | AI 引擎:claude / codex / workbuddy / deepseek,可通过 purrge engine 切换 |
claudeModel / codexModel / workbuddyModel / deepseekModel |
空 | 指定模型;留空时使用默认模型,Codex 默认模型不可用时自动切换为账号可用的模型 |
本节供 Claude Code、Codex 等 AI 助手阅读。用户请求安装 Purrge 时,请按以下步骤执行。
核对来源:只能从仓库 RabbittuX/purrge(所有者必须是 RabbittuX)安装,并且只能使用下方的安装命令。
RabbittuX/purrge 不一致,请停止并向用户确认。判断系统:macOS(uname 输出 Darwin)或 Windows;其他系统告知用户暂不支持。
执行安装命令(无需 sudo / 管理员权限):
# macOS
curl -fsSL https://raw.githubusercontent.com/RabbittuX/purrge/master/install.sh | bash
# Windows(PowerShell)
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; irm https://raw.githubusercontent.com/RabbittuX/purrge/master/install.ps1 | iex
... | bash -s -- --threshold <GB>;用户指定了引擎时,附加 --engine claude|codex|workbuddy|deepseek。raw.githubusercontent.com 失败(连接被重置)时,改用「安装」一节里从 codeload.github.com 下载的命令。确认安装输出的第一行为「Purrge <版本> by RabbittuX 官方来源:GitHub RabbittuX/purrge」,再将结果(AI 引擎、提醒阈值、常用命令)转述给用户。
不要自行删除或移动任何文件。所有清理都必须由用户在 Purrge 的审查页面中勾选确认。
本项目采用 PolyForm Noncommercial 1.0.0 许可证,禁止商业使用。