agentleFS
StaymanHouStaymanHou/Claudesk/.claude/skills/clear-build-cache/SKILL.md

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
  • In this repository2 other files it gives its agents.

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
  1. Distinctive:

    Delete the incremental caches:

    line 19
  2. Very specific:

    Run from the project root (/Users/stayman/Personal/projects/claudesk).

    line 30
  3. Very specific:

    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 …

    line 40

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Report the size about to be reclaimed:
    du -sh src-tauri/target/debug/incremental src-tauri/target/release/incremental 2>/dev/null
  2. Delete the incremental caches:
    rm -rf src-tauri/target/debug/incremental src-tauri/target/release/incremental
  3. 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/null guards 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 (in src-tauri/) — removes the entire target/ (~all of it); next build is a full cold rebuild.
    • cargo sweep --time 7 (needs cargo 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 that incremental clearing doesn't address.
  • 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 choice.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.