cleanup-unused-files

cleanup-unused-files is a skill for Codex from OpenCoven/coven. It costs 78 tokens per session (1,070 once invoked), scanned C, original, MIT.

A cleanup skill for removing reproducible local clutter such as caches, build results, temporary folders, logs, and tool state.

In plain words
What is it for?
Use it to clean project output, package-manager and SDK caches, temporary files, old logs, and other specified developer-machine junk.
Why use it?
It helps recover disk space by targeting files that can usually be regenerated, while calling out higher-risk locations.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions Codex.

Good fit Use it to clean project output, package-manager and SDK caches, temporary files, old logs, and other specified developer-machine junk.

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

Made for: 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 cleanup-unused-files

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/opencoven/coven/cleanup-unused-files"><img src="https://agentmods.dev/badge/skills/opencoven/coven/cleanup-unused-files.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,070 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.00078 $0.01070
Opus 5 $0.00039 $0.00535
Sonnet 5 $0.00016 $0.00214
Haiku 4.5 $0.00008 $0.00107

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

Security

Grade C, and why

cleanup-unused-files 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 12d 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 ~/.codex
skills/cleanup-unused-files/SKILL.md · 173 lines

How it starts

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

Cleanup Unused Files

Optimize for reclaiming disk space fast.

Prefer obvious, reproducible junk over careful semantic analysis.

Default stance

  • Target caches, build output, temp folders, and local tool state first.
  • Prefer exact paths over broad globs.
  • Be explicit about blast radius.
  • Treat anything under source directories as higher risk unless it is known build output.
  • If the cleanup touches machine-wide tool state or login/session data, call that out clearly before running it.

Primary targets

Common high-yield cleanup targets include:

  • project build output like target/, dist/, .next/, coverage/, .turbo/
  • package-manager caches
  • SDK/tool caches
  • app caches under ~/Library/Caches
  • stale temp folders
  • old logs, dumps, and exports
  • backup/swap/temp files

Examples of the user's preferred cleanup style:

rm -rf ~/.codex
rm -rf ~/Library/Caches
rm -rf ~/.rustup
rm -rf ~/.bun
rm -rf ~/.npm
rm -rf ~/.lmstudio
rm -rf src-tauri/target

Also valid tool-native cleanup commands when they fit better:

cargo clean --manifest-path src-tauri/Cargo.toml
npm cache clean --force
brew cleanup --prune=all
rustup toolchain list | grep -v default | xargs -I{} rustup toolchain uninstall {}

Workflow

1) Identify cleanup scope

Determine whether the user wants:

  • project-only cleanup
  • home-directory cache cleanup
  • machine-wide developer reset
  • maximum disk recovery regardless of re-download cost

If the request is vague, default to an audit of likely large cache directories first.

2) Prefer highest-yield directories

When disk recovery is the goal, focus on these before hunting tiny files:

  • ~/Library/Caches
  • ~/.npm
  • ~/.bun
  • ~/.rustup
  • ~/.cargo
  • ~/.codex
  • ~/.lmstudio
  • repo-local target/, dist/, .next/, coverage/
  • large temp/export folders under the workspace or home directory

3) Distinguish safe nukes from state resets

Usually safe and reproducible:

  • build output
  • download caches
  • derived data
  • package caches
  • logs
  • temp files

Read the full file on GitHub · 173 lines

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. 12d ago First seen · 173 lines · 78 tokens per session scan C 1809cdbba4da

Subscribe to this mod's changes

cleanup-unused-files is a skill published in the GitHub repository OpenCoven/coven (47 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 1,070 once invoked, about $0.0004 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-30.