clear-build-cache
Skill11 starsChanged 2 days agoMITView on GitHub
Reclaim disk by clearing Cargo's incremental compilation cache under src-tauri/target. Use when the user asks to clear the build cache, shrink the target folder, or free up disk space from Rust/Tauri builds.
- Deletes or force-pushes
- Installs packages
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Delete the incremental caches:
- Very specific: line 30
Run from the project root (/Users/stayman/Personal/projects/claudesk).
- Very specific: line 40
Do not delete deps/, build/, or release artifacts as part of this skill — that's what cargo clean is for and it's a heavier, explicit …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clear build cache
Cargo's incremental/ directories under src-tauri/target are pure cache that
only ever grows — they're safe to delete anytime. Deleting them reclaims disk at
the cost of one slower next build (the rest of target/ stays warm). This is the
cheap reclaim; it does NOT touch deps/, build/, or release artifacts.
Steps
- Report the size about to be reclaimed:
du -sh src-tauri/target/debug/incremental src-tauri/target/release/incremental 2>/dev/null - Delete the incremental caches:
rm -rf src-tauri/target/debug/incremental src-tauri/target/release/incremental - Report the new total so the user sees the result:
du -sh src-tauri/target 2>/dev/null
Notes
- Run from the project root (
/Users/stayman/Personal/projects/claudesk). - The
2>/dev/nullguards are intentional — either incremental dir may be absent (e.g. no release build has run), and that is not an error. - This is the lightweight option. For a deeper reclaim, mention to the user:
cargo clean(insrc-tauri/) — removes the entiretarget/(~all of it); next build is a full cold rebuild.cargo sweep --time 7(needscargo install cargo-sweep) — prunes only stale dependency-version artifacts not touched in N days, keeping the current working set warm. Good for the gradual stale-deps/buildup thatincrementalclearing doesn't address.
- Do not delete
deps/,build/, or release artifacts as part of this skill — that's whatcargo cleanis for and it's a heavier, explicit choice.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

