storage-analyzer

storage-analyzer is a skill for Claude Code, Codex from Azzygoatcoder/agent-useful-skills. It costs 319 tokens per session (3,639 once invoked), scanned A, original, MIT.

A read-only storage analysis tool for macOS and Windows that scans disks and creates an interactive HTML report. The report is a web page showing where storage is being used.

In plain words
What is it for?
Use it to inspect disk usage, review inaccessible directories, and see suggested cleanup commands before deciding whether to run them yourself.
Why use it?
It helps locate large folders and estimate what space might be releasable without automatically changing or deleting files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **来源**: 改编自 [KKKKhazix/khazix-skills](https://github.com/KKKKhazix/khazix-skills) 的 storage-analyzer(MIT)。本仓库做了 Windows 实测与本地化修复,详见根目录 [THIRD-PARTY-NOTICES.md](.

Good fit Use it to inspect disk usage, review inaccessible directories, and see suggested cleanup commands before deciding whether to run them yourself.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Azzygoatcoder/agent-useful-skills
agentmods
npx agentmods add skills/azzygoatcoder/agent-useful-skills/storage-analyzer

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for storage-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/azzygoatcoder/agent-useful-skills/storage-analyzer/github.svg)](https://agentmods.dev/skills/azzygoatcoder/agent-useful-skills/storage-analyzer)
Your own site
<a href="https://agentmods.dev/skills/azzygoatcoder/agent-useful-skills/storage-analyzer"><img src="https://agentmods.dev/badge/skills/azzygoatcoder/agent-useful-skills/storage-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for storage-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/azzygoatcoder/agent-useful-skills/storage-analyzer"><img src="https://agentmods.dev/badge/skills/azzygoatcoder/agent-useful-skills/storage-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 319 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,639 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00319 $0.03639
Opus 5 $0.00160 $0.01819
Sonnet 5 $0.00064 $0.00728
Haiku 4.5 $0.00032 $0.00364

Measured 9d ago against content hash 5ed62a411b8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

storage-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/build_report.py, scripts/scan.py, scripts/server.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/storage-analyzer/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Storage Analyzer

来源: 改编自 KKKKhazix/khazix-skills 的 storage-analyzer(MIT)。本仓库做了 Windows 实测与本地化修复,详见根目录 THIRD-PARTY-NOTICES.md

对 macOS 做一次只读存储分析,产出交互式 HTML 报告。流程:扫描 → 分析分级 → 生成网页 → 打开。

铁律

  • 全程只读。 只能跑扫描/统计/列目录/读元信息(df、du、diskutil、stat、ls)。绝对禁止 rm、mv、rmdir、清空回收站、改权限等任何写操作。
  • 删除命令只展示,不执行。 报告里给出的清理命令是供用户自己在终端确认后运行的。即使用户在对话里说"帮我删",也要先停下确认(命中全局红线:删除文件必须先问),不要直接代跑。
  • 估算标注清楚。 涉及"可释放空间"一律说明是估算值。
  • 路径、命令保留原文不翻译。

执行流程

Step 1 扫描(只读)

python3 scripts/scan.py > /tmp/storage_scan.json

Windows 路径注意/tmp/ 是 macOS/Unix 习惯,Windows 上 Python 和 Read 工具都不解析它。Windows 用 $TEMP/(Git Bash 展开成真实 Windows 路径 C:\Users\<u>\AppData\Local\Temp\)或当前目录相对路径:

python scripts/scan.py > "$TEMP/storage_scan.json"     # Windows / Git Bash

scan.py 自动识别系统(sys.platform):

  • macOS:扫 home、library、caches、containers、group_containers、app_support、applications、downloads、dev_caches,用 du 算大小。
  • Windows:扫 user_profile、appdata_local、appdata_roaming、temp、downloads、program_files(_x86)、dev_caches,用 os.scandir 算大小;system.disks 含所有盘符。

输出 JSON:system(系统/磁盘信息,含 disk_name 主盘名 + disks 全部盘)+ groups(各组子目录大小,已降序、过滤 50MB 以下)。扫描较慢,耐心等。读不到的目录标 denied,需在报告里列出并提示遗漏体量。

Step 2 分析与分级

先看 system.os 判断系统,读对应的数据布局参考:macOS 读 references/macos.md,Windows 读 references/windows.md(讲该系统东西存哪、怎么辨认、归哪一级)。然后读 /tmp/storage_scan.json 做这几件事:

  1. 挑 Top 5 占用大户,判定类型(系统资产/应用本体/应用数据/应用缓存/开发缓存/用户文件/媒体内容/下载内容/虚拟机镜像/回收站/其他)。
  2. 识别"神秘大目录":UUID 命名的 Container、不明的隐藏目录,要追查它属于哪个 App、装的是什么(例如某 97GB 的 UUID Container 实为 Bilibili 离线视频缓存)。必要时 ls/du 深入一层看清楚,但仍只读。
  3. 三级分类 = 清理决策清单,不是全盘点。 只把"存在'要不要动它'这个决策"的项放进三灯;日常在用的正常应用、操作系统本身、海量零碎小文件没有清理决策,不进三灯,它们落在磁盘条的蓝色"系统及其他"里。判定标准:
    • 🟢 可自动清理:纯缓存、临时文件、安装包残留、明确可再生且不影响功能、不丢用户数据(pip/uv/npm/Xcode DerivedData 等开发缓存、浏览器缓存)。
    • 🟡 需人工判断:含用户数据或有判断成本(离线视频、文档、项目代码 node_modules、聊天记录、设计稿)。给内容画像 + 至少 3 句处置路径(应用内清理 / 系统工具 / 文件管理器手动审查,三选最合适)+ 风险提示。所有橙灯项在服务模式下自动有「在访达/资源管理器打开」按钮(跳过去自己审查删);如果该项有一个核实过、删了不破坏 App 的安全子路径(如 B站离线视频的 .Downloads 目录、旧备份目录),给它 trash_paths → 网页出现「移到废纸篓」按钮(橙灯只准移废纸篓、可逆,绝不给"直接删除")。App 托管又无安全子路径的(Chrome/微信)只给打开按钮、不给 trash_paths。按钮下方会自动写明注意事项(打开只查看不删、移废纸篓可逆需清空才释放等);如果某项在文件管理器里是 App 内部格式、不方便手动挑选,给它一个 open_note 字段做客观说明(会显示在注意事项里)。口吻要中性、像产品说明:直接描述"这里是什么结构、为什么不好手动删、想精细操作该去哪",不要写成"我发现/提醒注意/看着像没视频"这种暴露开发者踩坑视角的话。
    • 🔴 谨慎清理(有决策但不建议手删):你可能想动、但建议别手删的具体项——重复安装的应用、想卸载的大应用、运行中应用的核心数据等。给"为什么不建议手删" + indirect_release具体卸载步骤(自带卸载器 / 启动台长按 / 右键移废纸篓 / AppCleaner 清残留 / App Store 可重装等,要可照做不是空话)。应用项给 app_paths(真实 .app 绝对路径数组)→ 网页出现「在文件管理器打开(去卸载)」按钮,定位到 App 让用户自己正规卸载。红灯不给删除/卸载按钮(应用在系统目录、可能要管理员密码、可能有自带卸载器和残留,后台代删不稳妥)。纯系统文件、APFS 快照不要单独列红卡(没有清理决策),归蓝色即可;系统层面的释放技巧(重启释 swap、Time Machine 快照策略、可清除空间自动回收)写进 summary.long_term 长期建议。

Read the full file on GitHub · 119 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 119 lines · 319 tokens per session scan A 5ed62a411b8e

Subscribe to this mod's changes

storage-analyzer is a skill published in the GitHub repository Azzygoatcoder/agent-useful-skills (6 stars, last pushed 10d ago), licensed MIT. It adds 319 tokens to every session and 3,639 once invoked, about $0.0016 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.