Skip to content
Back to skills

Mac Software Storage Cleanup Cn

ASecurity

审计 macOS 已安装软件占用并执行分级清理。当用户提出“检查安装了哪些软件”“列出软件占用大小”“清理优先级 1 缓存和模拟器数据”或“给出可回收空间建议”等磁盘治理需求时使用。

  • 18 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 26, 2026
devopsbashgit

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add YangsonHung/awesome-agent-skills --skill mac-software-storage-cleanup-cn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mac Software Storage Cleanup Cn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mac Software Storage Cleanup Cn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yangsonhung-mac-software-storage-cleanup-cn/badge)](https://www.skillsdirectory.com/skills/yangsonhung-mac-software-storage-cleanup-cn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mac-software-storage-cleanup-cn
description: 审计 macOS 已安装软件占用并执行分级清理。当用户提出“检查安装了哪些软件”“列出软件占用大小”“清理优先级 1 缓存和模拟器数据”或“给出可回收空间建议”等磁盘治理需求时使用。
---

# Mac Software Storage Cleanup

审计 macOS 软件安装与磁盘占用,输出可执行的分级清理建议,并在用户确认后执行低风险清理。

## 何时使用

当用户有以下需求时使用本技能:
- 检查 `/Applications`、`~/Applications`、Homebrew Formula、Homebrew Cask 安装了哪些软件
- 统计软件和常见缓存目录的空间占用,并按大小排序
- 清理 `~/Library/Caches`、`~/Library/Developer/CoreSimulator` 等低风险目录
- 给出磁盘空间治理建议,并区分低风险与中风险清理项

## 不要使用

以下场景不应使用本技能:
- 用户想卸载某个具体应用,而不是做磁盘治理盘点
- 用户要求直接删除业务数据目录,但没有明确确认
- 任务环境不是 macOS,或目标路径不适用当前系统

## 使用说明

1. 先执行 `scripts/report_sizes.sh`,盘点软件来源与主要占用目录。
2. 基于报告区分清理优先级:
   - 优先级 1:缓存和模拟器数据,默认低风险。
   - 优先级 2:应用业务数据目录,仅列出候选,不直接删除。
   - 优先级 3:收益较低的小型缓存或日志。
3. 输出结论时,必须展示目录类别、数量、总占用和 Top N 大户。
4. 如需扫描优先级 2 候选,执行 `scripts/list_priority2_candidates.sh [目标目录] [TopN]`。
5. 只有在用户明确确认后,才执行 `scripts/cleanup_priority1.sh` 或等价清理动作。
6. 清理完成后,重新核算并输出“清理前 -> 清理后 -> 释放空间”的对比结果。

## 标准流程

```text
盘点安装来源与空间占用
  -> 识别高价值可清理目录
  -> 给出分级建议
  -> 等待用户确认
  -> 执行低风险清理
  -> 复核释放结果
```

## 执行命令

```bash
bash scripts/report_sizes.sh
bash scripts/list_priority2_candidates.sh ~/Library/Application\\ Support 20
bash scripts/cleanup_priority1.sh
```

## 输出要求

- 明确展示每类路径的数量和总占用
- 列出 Top N 大户,便于用户快速决策
- 任何清理动作都必须包含清理前后对比
- 没有用户确认时,不主动删除优先级 2 目录

## 边界

- 不使用破坏性 git 命令
- 不删除用户未确认的应用业务数据
- 若脚本失败,改用更稳妥的只读排查或最小范围清理方式

Files in this skill

  • SKILL.md2.6 KB
  • scripts/cleanup_priority1.sh1.2 KB
  • scripts/list_priority2_candidates.sh962 B
  • scripts/report_sizes.sh1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in devops →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.