maintenance-measure-cache-size

maintenance-measure-cache-size is a skill for Claude Code, Codex from eaglesakura/agent-skills. It costs 147 tokens per session (1,783 once invoked), scanned C, original, MIT.

A local disk-usage check for development-tool caches and build files. It measures which directories use space and reports possible cleanup targets in a table.

In plain words
What is it for?
Use it to investigate low disk space, large npm, Gradle, Pub, or Docker caches, large home directories, and Library/Caches. It can also suggest cleanup commands without running them.
Why use it?
It shows what is actually taking up disk space before anything is deleted. This helps distinguish caches that can be downloaded or rebuilt from files that should be kept.

Skill for Claude CodeCodex

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

Good fit Use it to investigate low disk space, large npm, Gradle, Pub, or Docker caches, large home directories, and Library/Caches. It can also suggest cleanup commands without running them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eaglesakura/agent-skills/maintenance-measure-cache-size
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add eaglesakura/agent-skills --skill maintenance-measure-cache-size
Clone the repo
git clone --depth 1 https://github.com/eaglesakura/agent-skills

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 maintenance-measure-cache-size

README.md
[![agentmods](https://agentmods.dev/badge/skills/eaglesakura/agent-skills/maintenance-measure-cache-size/github.svg)](https://agentmods.dev/skills/eaglesakura/agent-skills/maintenance-measure-cache-size)
Your own site
<a href="https://agentmods.dev/skills/eaglesakura/agent-skills/maintenance-measure-cache-size"><img src="https://agentmods.dev/badge/skills/eaglesakura/agent-skills/maintenance-measure-cache-size/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 maintenance-measure-cache-size

Your own site · 80×15
<a href="https://agentmods.dev/skills/eaglesakura/agent-skills/maintenance-measure-cache-size"><img src="https://agentmods.dev/badge/skills/eaglesakura/agent-skills/maintenance-measure-cache-size.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,783 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00147 $0.01783
Opus 5 $0.00073 $0.00892
Sonnet 5 $0.00029 $0.00357
Haiku 4.5 $0.00015 $0.00178

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

Security

Grade C, and why

maintenance-measure-cache-size scanned grade C with 1 finding 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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (evals/generate_fixtures.sh), 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| ~/.npm | 2.4GiB | npm キャッシュ | 再取得可能 | rm -rf ~/.npm/_cacache |
packages/machine/.apm/skills/maintenance-measure-cache-size/SKILL.md · 142 lines

How it starts

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

メンテナンス / キャッシュサイズ特定

ローカル環境のキャッシュ・ビルド成果物の占有量を測り、削除してよいか判断できる情報まで揃える。 目的は「何が何 GiB か」ではなく「どこを消せば空き容量が増え、消しても復元できるか」を短時間で示すこと。

いつ使うか

  • ディスク容量不足・キャッシュ肥大・開発ツール掃除の相談
  • ユーザーが追加で Workspace 等の調査ディレクトリを指定したとき

やってはいけないこと

  • ユーザー確認なしに削除・prune・docker system prune 等を実行しない
  • サイズ未測定のまま削除コマンドだけ列挙しない
  • 1GiB 未満を表に混ぜてノイズを増やさない(ルールを変える明示指示がある場合のみ例外)

基本手順

1. 測定単位と除外

  • 占有量は GiB(1024³ バイト)で報告する。表示は小数第1位まででよい(例: 2.4
  • 1GiB 未満は表から除外する
  • 占有サイズの 降順 で並べる

2. ディレクトリ探査アルゴリズム

既定の探索対象(後述)と、ユーザー指定パスを対象にする。

  1. 対象パスが存在しなければスキップ(エラーで止めない)
  2. 各対象の占有を測る(下記コマンド)
  3. 10GiB 超なら、その直下の子ディレクトリを同様に測る(ドリルダウン)
  4. ドリルダウンは 起点から最大 2 階層まで(起点=0、子=1、孫=2)
  5. 子も 10GiB 超かつ階層余裕があれば、さらに掘る

実ディスクの空きに効くのはアロケート済みブロックなので、通常は du のデフォルト(見かけサイズではなく実使用)を使う。

# macOS: 1階層の子を人間可読+ソートしやすい数値で
du -hd 1 <path> 2>/dev/null | sort -hr

# Linux(GNU du)
du -hd 1 <path> 2>/dev/null | sort -hr

トップレベル一覧が欲しいだけのときは du -sh <path>。権限エラーは無視して次へ進む。

3. 用途・復元可否・削除コマンドの埋め方

埋め方の指針
予想される用途 パス名から推定(npm キャッシュ、Gradle、Pub、Homebrew、Docker ビルドキャッシュ等)
復元可否 再取得可能 / 再ビルドで復元 / OS・アプリ用(削除非推奨) / 要確認 など短く
削除コマンド 安全な例を1つ。非推奨なら -。実実行はしない

開発ツールのレジストリ/パッケージキャッシュは多くが 再取得可能Applications や OS 管理下は削除非推奨としコマンドは -

4. 出力フォーマット

必ず次の表にする(列名は固定)。サイズ列は数値+GiB

Path サイズ(GiB) 予想される用途 復元可否 削除コマンド
~/.npm 2.4GiB npm キャッシュ 再取得可能 rm -rf ~/.npm/_cacache
~/Library/Caches/Homebrew 1.2GiB Homebrew キャッシュ 再取得可能 brew cleanup
Docker Build Cache 12.5GiB Docker ビルドキャッシュ 再取得可能 docker builder prune

表の前後に、測定範囲(HOME 想定か、追加パスか)と「削除は未実行」を1〜2文で書いてよい。

結果は cache-size-report.md に保存する(ユーザーが別パスを指定したらそれに従う)。

OSごとの探索対象ディレクトリ

存在するものだけ測る。~ はホームディレクトリ。

macOS / Linux 共通

  • ~/.bundle
  • ~/.cache/
  • ~/.cargo/
  • ~/.cocoapods
  • ~/.composer/
  • ~/.dart*/(グロブで実在するもの)
  • ~/.dlv/
  • ~/.flutter*/
  • ~/.fvm/
  • ~/.gem/
  • ~/.gradle/
  • ~/.gsutil/
  • ~/.nodebrew/
  • ~/.npm/
  • ~/.pub-cache/
  • ~/.sdkman/
  • ~/.yarn/
  • ~/go/
  • ${GOMODCACHE}(未設定なら go env GOMODCACHE で解決。失敗時はスキップ)

Read the full file on GitHub · 142 lines

Files

What ships with it

5 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. 10d ago First seen · 142 lines · 147 tokens per session scan C 6d3664edd6f7

Subscribe to this mod's changes

maintenance-measure-cache-size is a skill published in the GitHub repository eaglesakura/agent-skills (2 stars, last pushed 5d ago), licensed MIT. It adds 147 tokens to every session and 1,783 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens