disk-cleanup

disk-cleanup is a skill for Claude Code from yonatangross/orchestkit. It costs 61 tokens per session (1,993 once invoked), scanned A, original, MIT.

A disk-cleanup skill for files left by agents and worktrees, including caches, Docker build data, and old logs. It requires a dry run and user confirmation before applying safe cleanup.

In plain words
What is it for?
Use it when agent work has filled the disk, to inventory files and remove eligible caches or clean, merged worktrees.
Why use it?
It reduces disk usage while keeping unreadable or uncertain items and asking separately about risky items.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code.

Part of the ork plugin — 83 skills, 39 commands, 36 agents, 32 hooks shipped together

Good fit Use it when agent work has filled the disk, to inventory files and remove eligible caches or clean, merged worktrees.

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

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 83 skills, 39 commands, 36 agents, 32 hooks.

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-cleanup

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/disk-cleanup"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/disk-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,993 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.00061 $0.01993
Opus 5.5 $0.00024 $0.00797
Sonnet 5.5 $0.00012 $0.00399
Haiku 4.5 $0.00006 $0.00199

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

Security

Grade A, and why

disk-cleanup 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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/disk_cleanup.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.

plugins/ork/skills/disk-cleanup/SKILL.md · 145 lines

How it starts

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

disk-cleanup, get the disk back from your agents

Running many agents and worktrees fills a disk fast: a fresh node_modules per worktree, a build cache per tool, Docker layers, browser downloads, session logs. This skill finds all of it, sorts it by how safe it is to remove, and removes only what is provably safe, after you confirm.

Critical rules

  1. Dry run first, always. Run the script without --apply, show the inventory, and get an explicit yes from the user in the conversation before any --apply.
  2. --apply touches two tiers only. SAFE (caches that refill on their own) and REGENERABLE (merged, clean, idle worktrees; rebuildable stores). ASK FIRST items are listed with the command to run. The script never runs them and neither do you without the user naming the item.
  3. Unreadable is KEEP. A failed git, gh, lsof or docker call keeps the item and says why. Never remove on a guess.
  4. A worktree is removed only when all of these hold: its tip is on the default branch (or equals the head of a merged PR), the tree is clean, it holds no ignored file outside a rebuildable folder (node_modules, .venv, dist, build, .next, __pycache__ and the like; an ignored .env.local keeps the tree), it is not locked, no process has its working directory inside, nothing in it changed for 60 minutes, and it sits under the home directory. Removal is git worktree remove without force. The branch stays.
  5. Report the measured number. The freed total is free space before versus after. The inventory total is an estimate and is labelled as one.

Instructions

  1. Dry run. From a repo you work in (the script scans its worktrees) or with --root DIR for a folder that holds several repos:

    python3 "${CLAUDE_SKILL_DIR}/scripts/disk_cleanup.py"
    python3 "${CLAUDE_SKILL_DIR}/scripts/disk_cleanup.py" --root ~/code
    

    Exit 0 means nothing to clean, 3 means findings, 2 means it could not look.

  2. Show the user the inventory as printed. Lead with the verdict line, then name the three biggest rows and any KEEP lines that explain why a worktree was left alone.

  3. Ask the user to confirm. Offer the narrower forms when they hesitate: --tier safe (caches only) or --only npm-cache (one item id, or a section such as docker).

  4. Apply with the command the dry run printed under "To act on exactly this list". It pins --only to the ids the user just saw, so anything that became removable after the dry run (a worktree that merged or went idle meanwhile) is left alone:

Read the full file on GitHub · 145 lines

Files

What ships with it

3 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. 5d ago Changed 244c16e02472
  2. 7d ago Changed efec2cf3032f
  3. 11d ago Changed 0f6c504d2e6f
  4. 16d ago Changed · +6 lines a5273075bdd5
  5. 17d ago Changed · +2 lines 6dded03f0e8b
  6. 18d ago First seen · 137 lines · 61 tokens per session scan A 17a1a83b21ec

Subscribe to this mod's changes

disk-cleanup is a skill published in the GitHub repository yonatangross/orchestkit (312 stars, last pushed today), licensed MIT. It adds 61 tokens to every session and 1,993 once invoked, about $0.0002 per session on Opus 5.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-11-12.

Related

disk-cleanup compared with skills from other repositories

disk-cleanup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
disk-cleanupyonatangross/orchestkitSkill312todayMITA61Claude Code
gadgetomnigent-ai/omnigentSkill12ktodayApache-2.0A46Claude Code
configure-workspaceshumanlayer/humanlayerSkill13k7d agoApache-2.0A29Claude Code
resolve-inputsomnigent-ai/omnigentSkill12ktodayApache-2.0A22Claude Code, Codex
otto-drive-promnigent-ai/omnigentSkill12ktodayApache-2.0A14Claude Code, Codex
herdr-kit-workflowsmastra-ai/mastraSkill30ktodaynoneA61Claude Code, Codex
wisdom-forgetSnowflake-Labs/cocoplusSkill72923d agoMITA34Claude Code