disk-space-optimizer

disk-space-optimizer is a skill for Claude Code, Codex from OpenCoven/coven. It costs 0 tokens per session (2,503 once invoked), scanned C, original, MIT.

A disk-cleanup workflow that finds removable build files, caches, and old repositories while protecting active development projects. Build artifacts are generated files made during software compilation or testing.

In plain words
What is it for?
Use it to inspect disk usage, find safe cleanup candidates, remove selected stale files or repositories, and report what space remains.
Why use it?
It helps identify what is using disk space without deleting source code, Git history, or active project dependencies. It separates reporting and candidate review from cleanup.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: positional $N argument; mentions Codex; built for openclaw.

Good fit Use it to inspect disk usage, find safe cleanup candidates, remove selected stale files or repositories, and report what space remains.

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

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-space-optimizer

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/opencoven/coven/disk-space-optimizer"><img src="https://agentmods.dev/badge/skills/opencoven/coven/disk-space-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,503 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.00000 $0.02503
Opus 5.5 $0.00000 $0.01001
Sonnet 5.5 $0.00000 $0.00501
Haiku 4.5 $0.00000 $0.00250

Measured 3mo ago against content hash f2ed9543e0b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

disk-space-optimizer 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 3mo 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.

rm -rf ~/.npm && echo "✓ npm cache cleared"
skills/disk-space-optimizer/SKILL.md · 331 lines

How it starts

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

SKILL.md: Disk Space Optimization

Purpose: Intelligently free disk space by removing build artifacts, caches, and stale repositories without affecting active development.

Scope: Analyze disk usage, identify safe cleanup targets, preserve active projects, and report freed space.


Overview

This skill helps manage constrained disk space by:

  1. Diagnosing current usage hotspots
  2. Identifying artifacts that can be safely removed (caches, builds, stale repos)
  3. Preserving all active projects and development environments
  4. Reporting what was freed and what remains

Safe to use: Does NOT delete source code, .git history, or active project dependencies.


Usage

# Full diagnosis and cleanup
openclaw skill disk-space-optimizer analyze --aggressive
openclaw skill disk-space-optimizer cleanup --exclude="active,important"

# Report only (no changes)
openclaw skill disk-space-optimizer report

# Verify what's safe to delete
openclaw skill disk-space-optimizer candidates --days=30

Core Procedures

1. Diagnosis: Identify Hotspots

Goal: Find what's consuming space, categorized by age and type.

# Overall disk usage
df -h ~

# Largest directories by category
du -sh ~/.npm ~/.cache ~/.openclaw/workspace ~/Documents/GitHub 2>/dev/null | sort -rh

# Repository sizes
cd ~/Documents/GitHub && for dir in */; do 
  du -sh "$dir" 2>/dev/null
done | sort -rh

# Build artifacts (largest by far)
find ~/Documents/GitHub -maxdepth 3 -type d \( -name ".next" -o -name "target" -o -name "build" -o -name "dist" \) -exec du -sh {} \; 2>/dev/null | sort -rh

# Git repositories by activity
cd ~/Documents/GitHub && find . -maxdepth 2 -name ".git" -type d | while read d; do
  repo=$(dirname "$d")
  commits=$(git -C "$repo" log --oneline --since='7 days ago' 2>/dev/null | wc -l)
  size=$(du -sh "$d" 2>/dev/null | cut -f1)
  echo "$commits commits | $size | $repo"
done | sort -rn

2. Categorize by Safety

Safe to Remove (auto-regenerate):

  • ~/.npm/ — npm cache
  • ~/.cache/zig, ~/.cache/puppeteer, ~/.cache/cmux, etc. — dev tool caches
  • repo/.next/ — Next.js build (in stale repos, <1 commit/7 days)
  • repo/target/ — Rust build (in stale repos)
  • repo/build/, repo/dist/ — Build artifacts (in inactive repos)
  • repo/node_modules/ — Dependencies (in stale repos only)

Read the full file on GitHub · 331 lines

Files

What ships with it

2 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. 3mo ago First seen · 331 lines · 0 tokens per session scan C f2ed9543e0b7

Subscribe to this mod's changes

disk-space-optimizer is a skill published in the GitHub repository OpenCoven/coven (79 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,503 tokens. 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-30.

Related

disk-space-optimizer compared with skills from other repositories

disk-space-optimizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
disk-space-optimizerOpenCoven/covenSkill79yesterdayMITC0Claude Code, Codex
agent-user-toolsruvnet/rufloSkill83ktodayMITA16Claude Code
agent-self-schedulingsickn33/agentic-awesome-skillsSkill51ktodayMITA24Claude Code
feishuHmbown/CodeWhaleSkill41k4d agoMITA33Claude Code, Codex
mission-slice-sopmvschwarz/openrigSkill9.0ktodayApache-2.0A30Claude Code
google-calendarHmbown/CodewhaleSkill41k2mo agoMITA26Claude Code, Codex
kungfu-agent-onboardingkungfu-systems/kungfuSkill4.5k8d agoApache-2.0A49Claude Code, Codex