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

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.

agentmods
npx agentmods add skills/opencoven/coven/disk-space-optimizer
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00000 $0.02503
Opus 5 $0.00000 $0.01252
Sonnet 5 $0.00000 $0.00501
Haiku 4.5 $0.00000 $0.00250

Measured 4d ago against content hash f2ed9543e0b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (46 stars, last pushed today), 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

Other skills, from other repositories

interview

Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec. Discoverable facts should be investigated instead of asked.

Hmbown/CodeWhale · 40 tokens

ppt-review

Read this skill only after current officereview structural output and relevant rendered images exist. Do not use source code, a tool success flag, or the first-slide preview as a substitute for deck evidence.

Orkas-AI/Orkas · 2 tokens

helmor-debug-operate

Operate, reproduce, and debug a running local Helmor desktop development build through the Tauri MCP bridge. Use when the user asks to use Tauri MCP, towery MCP, the local dev build, the Tauri webview, visual end-to-end validation, UI automation, screenshots, DOM/accessibility snapshots, IPC or log tracing…

dohooo/helmor · 117 tokens

wiki

Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to 400K words.

SethGammon/Citadel · 56 tokens

beevibe-team-mesh-negotiation

Multi-round negotiation protocol — covers both initiator and peer roles. Use when about to call negotiate(), when receiving a intent block as a peer, or when receiving an 'escalated' sentinel from a blocked respondnegotiate. Covers proposal crafting, counter-strategy, deadlock detection, when to accept early…

beevibe-ai/beevibe · 112 tokens

project-init

Scaffold an unconfigured directory into a configured pi project. Interactive, profile-driven: previews the planned writes, then writes AGENTS.md, .pi/settings.json and prompt files — optionally also a knowledge base, an openspec/ scaffold, and user-global /.pi/agent/settings.json. Use on a bare directory, or when the…

BlackBeltTechnology/pi-agent-dashboard · 81 tokens