clean-cache

clean-cache is a skill for Claude Code from addxai/enterprise-harness-engineering. It costs 54 tokens per session (2,741 once invoked), scanned C, original, Apache-2.0.

A workspace tool that scans Flutter, Android, iOS, and Node.js projects for build files and caches, then removes selected items in safety levels.

In plain words
What is it for?
Use it to find cache usage across projects and remove build artifacts, project dependencies, or global development caches according to the chosen cleanup level.
Why use it?
It helps recover disk space when development files grow large. Safer cleanup runs first, while deeper cleanup requires confirmation and may require downloads or setup again.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the enterprise-harness-engineering plugin — 25 skills shipped together

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/addxai/enterprise-harness-engineering/clean-cache
Any agent
npx skills add addxai/enterprise-harness-engineering --skill clean-cache
Clone the repo
git clone --depth 1 https://github.com/addxai/enterprise-harness-engineering

Made for: Claude Code.

Or install enterprise-harness-engineering, the plugin that ships this one along with the rest of its 25 skills.

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 clean-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/addxai/enterprise-harness-engineering/clean-cache.svg)](https://agentmods.dev/skills/addxai/enterprise-harness-engineering/clean-cache)
Your own site
<a href="https://agentmods.dev/skills/addxai/enterprise-harness-engineering/clean-cache"><img src="https://agentmods.dev/badge/skills/addxai/enterprise-harness-engineering/clean-cache.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,741 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.1 $0.00054 $0.02741
Opus 5 $0.00027 $0.01371
Sonnet 5 $0.00011 $0.00548
Haiku 4.5 $0.00005 $0.00274

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

Security

Grade C, and why

clean-cache 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 6d 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.

find "$WORKSPACE" -name ".dart_tool" -type d -maxdepth 6 -exec rm -rf {} + 2>/dev/null
skills/clean-cache/SKILL.md · 251 lines

How it starts

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

Batch Project Cache Cleanup (Clean Cache)

Description

When developing multiple Flutter/Android/iOS projects, build artifacts and dependency caches grow rapidly. This Skill batch-scans the workspace, performs tiered cleanup by safety level, and frees disk space while preserving global dependency caches to avoid re-downloading on the next build.

Rules

Rule 0 — Safety Tiers (Core Principle)

Cleanup is divided into three tiers. Only L1 is executed by default; L2/L3 require explicit user confirmation:

Tier What Gets Deleted Rebuild Cost Estimated Space Freed
L1 Safe Cleanup Build artifacts (build/, DerivedData, .dart_tool/, bazel-*) + stale dev tool caches (Homebrew old version packages, Bazel global cache) Recompile only, no network cost Large
L2 Dependency Cleanup Project-level dependencies (Pods/, node_modules/, .gradle/caches/) Requires pod install / npm install / gradle sync, but recovers from global cache, relatively fast Medium
L3 Deep Cleanup Global caches (~/.gradle/caches/, CocoaPods repo index, Pub global cache) All projects need to re-download on first build, very slow Small

Key distinction: L2 deletes project-internal Pods/, node_modules/, but global caches remain (~/.cocoapods/repos/, npm cache, ~/.gradle/caches/), so re-installing will mostly recover packages from local cache without re-downloading.

Rule 1 — Step 1: Scan Workspace

Accept the user-specified workspace root directory (default ~/Desktop or the parent of the current directory) and scan all cleanable cache directories:

# Scan script — find all cache directories and their sizes
WORKSPACE="${1:-.}"

echo "=== L1 Build Artifacts (safe to delete, just recompile) ==="
# Flutter build artifacts
find "$WORKSPACE" -name ".dart_tool" -type d -maxdepth 6 2>/dev/null | while read d; do du -sh "$d"; done
# Android build artifacts
find "$WORKSPACE" -path "*/app/build" -type d -maxdepth 6 2>/dev/null | while read d; do du -sh "$d"; done
find "$WORKSPACE" -name "build" -path "*android*" -type d -maxdepth 6 2>/dev/null | while read d; do du -sh "$d"; done
# iOS DerivedData (global)
du -sh ~/Library/Developer/Xcode/DerivedData/ 2>/dev/null
# Bazel artifacts
find "$WORKSPACE" -name "bazel-*" -type l -maxdepth 4 2>/dev/null | while read d; do echo "$d (symlink)"; done
# Homebrew old version packages cache
du -sh ~/Library/Caches/Homebrew/ 2>/dev/null
# Bazel global cache
du -sh ~/Library/Caches/bazel/ 2>/dev/null
du -sh ~/Library/Caches/bazelisk/ 2>/dev/null

echo ""
echo "=== L2 Project-Level Dependencies (need install after deletion, but recover from global cache) ==="
# iOS Pods
find "$WORKSPACE" -name "Pods" -type d -maxdepth 5 2>/dev/null | while read d; do du -sh "$d"; done
# Node modules
find "$WORKSPACE" -name "node_modules" -type d -maxdepth 5 -prune 2>/dev/null | while read d; do du -sh "$d"; done
# Android .gradle (project-level)
find "$WORKSPACE" -name ".gradle" -type d -maxdepth 4 2>/dev/null | while read d; do du -sh "$d"; done
# Flutter .flutter-plugins
find "$WORKSPACE" -name ".flutter-plugins" -type f -maxdepth 5 2>/dev/null
find "$WORKSPACE" -name ".flutter-plugins-dependencies" -type f -maxdepth 5 2>/dev/null

echo ""
echo "=== L3 Global Caches (all projects must re-download after deletion, use caution) ==="
du -sh ~/.gradle/caches/ 2>/dev/null
du -sh ~/.cocoapods/repos/ 2>/dev/null
du -sh ~/.pub-cache/ 2>/dev/null
du -sh ~/Library/Caches/CocoaPods/ 2>/dev/null
npm cache ls 2>/dev/null | wc -l | xargs -I{} echo "npm cache: {} entries"

Read the full file on GitHub · 251 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. 6d ago First seen · 251 lines · 54 tokens per session scan C f26909e7c649

Subscribe to this mod's changes

clean-cache is a skill published in the GitHub repository addxai/enterprise-harness-engineering (44 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 2,741 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

peon-ping-create-pack

Internal — invoked headlessly by peon create; humans should run peon create instead. Author and render a brand-new PeonPing draft pack — invoked headlessly as: "Use the peon-ping-create-pack skill to draft a pack: name= flavor= vibe= draftroot= . Follow the skill exactly." Authors all 7 CESP categories honoring the…

PeonPing/peon-ping · 134 tokens

peon-ping-use

Set which voice pack (character voice) plays for the current chat session. Automatically enables sessionoverride rotation mode if not already set. Use when user wants a specific character voice like GLaDOS, Peon, or Kerrigan for this conversation.

PeonPing/peon-ping · 55 tokens

peon-ping-rename

Rename the current Claude session for peon-ping notifications and terminal tab title. Use when user wants to give this session a custom name like "/peon-ping-rename Auth Refactor". Call with no argument to reset to auto-detect.

PeonPing/peon-ping · 57 tokens

peon-ping-toggle

Toggle peon-ping sound notifications on/off. Use when user wants to mute, unmute, pause, or resume peon sounds during a Claude Code session. Also handles config changes like volume, pack rotation, categories — any peon-ping setting.

PeonPing/peon-ping · 58 tokens

peon-ping-log

Log exercise reps for the Peon Trainer. Use when user says they did pushups, squats, or wants to log reps. Examples - "/peon-ping-log 25 pushups", "/peon-ping-log 30 squats", "log 50 pushups".

PeonPing/peon-ping · 64 tokens

peon-ping-remix

Internal — invoked headlessly by the peon eval server; humans should run peon eval instead. Execute one PeonPing reroll job — invoked headlessly by the peon eval server as: "Use the peon-ping-remix skill to execute the reroll job at ". Reads the job JSON (scope, category, index, caption), rewrites the affected sound…

PeonPing/peon-ping · 116 tokens