disk-triage

disk-triage is a skill for Claude Code, Codex from moonlight-lupin/agent-skills. It costs 28 tokens per session (1,754 once invoked), scanned C, original, MIT.

A procedure for finding and reclaiming disk space on a Linux virtual machine. It measures storage first, ranks space users, separates safe cleanup from actions needing approval, and checks the result.

In plain words
What is it for?
It helps investigate and clean storage after large builds, Git operations, or accumulated Docker images, caches, logs, and temporary files.
Why use it?
It reduces the risk of deleting the wrong files while addressing a full or nearly full disk. It also checks less obvious causes, such as exhausted inodes and deleted files still held open by programs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit It helps investigate and clean storage after large builds, Git operations, or accumulated Docker images, caches, logs, and temporary files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/moonlight-lupin/agent-skills/disk-triage
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 moonlight-lupin/agent-skills --skill disk-triage
Clone the repo
git clone --depth 1 https://github.com/moonlight-lupin/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 disk-triage

README.md
[![agentmods](https://agentmods.dev/badge/skills/moonlight-lupin/agent-skills/disk-triage/github.svg)](https://agentmods.dev/skills/moonlight-lupin/agent-skills/disk-triage)
Your own site
<a href="https://agentmods.dev/skills/moonlight-lupin/agent-skills/disk-triage"><img src="https://agentmods.dev/badge/skills/moonlight-lupin/agent-skills/disk-triage/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 disk-triage

Your own site · 80×15
<a href="https://agentmods.dev/skills/moonlight-lupin/agent-skills/disk-triage"><img src="https://agentmods.dev/badge/skills/moonlight-lupin/agent-skills/disk-triage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,754 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.00028 $0.01754
Opus 5.5 $0.00011 $0.00702
Sonnet 5.5 $0.00006 $0.00351
Haiku 4.5 $0.00003 $0.00175

Measured 20d ago against content hash 41259ff53814, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

disk-triage 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 20d ago.

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.

| Browser automation caches | `rm -rf ~/.cache/puppeteer ~/.cache/ms-playwright` | ~650M; re-downloads if needed |
devops/disk-triage/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.

Disk Cleanup

Reclaim disk space on a Linux VM. The skill runs a triage — survey every space consumer, split targets into safe vs ask, execute the approved set, then verify the delta.

When to Use

  • User says "disk cleanup", "free up space", "clean up the VM"
  • Disk usage above 80%
  • After large builds, git operations, or Docker image accumulation

Procedure

1. Baseline

df -h

Done: used and available numbers recorded for all mounts for the before/after comparison.

2. Survey

Requires root for apt, journalctl, and /var/log operations. Non-root users can survey but cannot clean system paths.

Build a ranked list of every consumer over ~50M. Survey all mounts, not just /.

# All mounts (not just /)
df -h
df -i                           # inode exhaustion — "No space left on device" with free blocks

# Deleted-but-open files (canonical "df says full, du says empty" case)
lsof +L1 2>/dev/null | head -20

# Hermes data + user caches + tmp (stay on one filesystem, don't cross mounts)
du -xsh ~/.hermes/*/ 2>/dev/null | sort -rh | head -20
du -xsh ~/.hermes/projects/*/ 2>/dev/null | sort -rh | head -20
du -xsh ~/.cache/*/ 2>/dev/null | sort -rh | head -15
du -xsh /tmp/* 2>/dev/null | sort -rh | head -15

# Memory store (if Mnemosyne is installed)
du -xsh ~/.hermes/mnemosyne/data/* 2>/dev/null | sort -rh

# Session checkpoints (if present)
du -xsh ~/.hermes/checkpoints/store/ 2>/dev/null

# Docker
docker system df                # shows build cache separately from images
docker images --format "{{.Size}}\t{{.Repository}}:{{.Tag}}" | sort -rh | head -25
docker ps -a --filter "status=exited" --format "{{.Image}}" | sort -u

# System
du -xsh /var/cache/apt /var/log ~/.cache/pip ~/.cache/uv 2>/dev/null
journalctl --disk-usage
find /var/log \( -name "*.gz" -o -name "*.1" -o -name "*.old" \) 2>/dev/null

# Bloated git repos (orphaned tmp_pack files from interrupted operations)
find ~/.hermes/projects -name ".git" -type d -exec sh -c 'du -sh "$1" 2>/dev/null' _ {} \; | sort -rh | head -10

Read the full file on GitHub · 142 lines

Files

What ships with it

1 file 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. 20d ago First seen · 142 lines · 28 tokens per session scan C 41259ff53814

Subscribe to this mod's changes

disk-triage is a skill published in the GitHub repository moonlight-lupin/agent-skills (136 stars, last pushed 2d ago), licensed MIT. It adds 28 tokens to every session and 1,754 once invoked, about $0.0001 per session on Opus 5.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-11-11.

Related

disk-triage compared with skills from other repositories

disk-triage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
disk-triagemoonlight-lupin/agent-skillsSkill1362d agoMITC28Claude Code, Codex
product-description-generatornexscope-ai/eCommerce-SkillsSkill1.6k20d agoMITA126Claude Code, Codex
tiktok-shop-cross-bordernexscope-ai/eCommerce-SkillsSkill1.6k20d agoMITA55Claude Code, Codex
supply-chain-optimization-tiktoknexscope-ai/eCommerce-SkillsSkill1.6k20d agoMITA57Claude Code, Codex
ecommerce-landing-pagenexscope-ai/eCommerce-SkillsSkill1.6k20d agoMITA45Claude Code, Codex
product-title-optimizationnexscope-ai/eCommerce-SkillsSkill1.6k20d agoMITA44Claude Code, Codex
walmart-listing-optimizationnexscope-ai/eCommerce-SkillsSkill1.6k20d agoMITA35Claude Code, Codex