leopu00/job-hunter-team/cache-prune
Claude Code and agent skill by leopu00/job-hunter-team
- community
Checking that the SKILL.md file is still in the repository.
Reclaim disk on the shared JHT caches (`uv` wheel cache + `codex` SQLite log) every ~24h. Owned by the Dottore — single-instance, runs at the end of a routine round when the team is idle. Never run mid-emergency: the SQLite VACUUM blocks for ~30s on a 200 MB DB and would steal cycles from a Sentinel-driven recovery. Migrated from the Captain so the Captain stays focused on coordination, not housekeeping.
Install
npx vskill@latest install leopu00/job-hunter-team/cache-pruneSKILL.md
The same SKILL.md was published earlier as leopu00/job-hunter-team/cache-prune.
cache-prune — reclaim shared caches
The shared $JHT_HOME accumulates two caches that grow monotonically until reclaimed:
| Path | What it stores | Typical growth (sample 2026-05-02) | |
|---|---|---|---|
$JHT_HOME/.cache/uv/ | wheel cache for every uv pip install | ~364 MB | |
$JHT_HOME/.codex/logs_2.sqlite | Codex telemetry SQLite (71% TRACE rows) | ~223 MB |
Neither is needed on disk: uv re-downloads if it has to, Codex truncates TRACE rows safely. The numbers above came from a continuous run; on a fresh $JHT_HOME they start at 0 and reach hundreds of MB within a few days.
The single safe command
Idempotent and no-op when there's nothing to reclaim. Internally:
uv cache prune— drops stale wheels (keeps the active set referenced by current installs).- SQLite
VACUUMonlogs_2.sqliteafter deleting old TRACE rows. - Cleanup of ephemeral Codex temp files.
Each step has a safety gate: idle > 1h on the operations that are destructive (VACUUM lock, TRACE delete) — if the team is actively burning tokens the step is skipped.
When to run
- 👨⚕️ End of a routine Dottore round (~24h of continuous run, or at the start of an idle operational day).
- 📉 On demand if
du -sh $JHT_HOME/.cache $JHT_HOME/.codexshows growth > 800 MB total. - 🚫 NEVER mid-budget-critical (proj > 95%) — the VACUUM 30s blocks the Codex SQLite the Sentinel reads through the bridge.
- 🚫 NEVER in reaction to a Sentinel
[ORDINE]— orders demand pacing/scaling actions, not housekeeping.
Safety: what NOT to touch
The team has other caches that look similar but are NOT in scope here:
| Path | Why hands-off | |
|---|---|---|
.cache/ms-playwright/ | browser binaries pinned by version — re-downloading is slow + flaky | |
.cache/claude-cli-nodejs/ | Anthropic CLI runtime cache, recreated lazily but bigger when warm | |
$JHT_HOME/logs/ | Sentinel state lives here. Wiping it loses the EMA window and several minutes of monitoring history. |
The blast radius of cache prune is limited to the two paths in the table at the top.
⚠️ `cache clear` is forbidden. That command (a destructive cousin ofcache pruneexposed byjht) wipeslogs/together with the caches, destroying Sentinel state. If you ever feel the urge tocache clear, escalate to the user instead.
Anomalous growth — escalate
If du -sh shows a path outside the 2 targets above growing fast (e.g. .cache/ms-playwright/ doubled, .codex/sessions/ ballooning), do NOT prune it on your own. Capture:
…log it to dottore-actions.jsonl with event=disk_anomaly + the du output, and surface it to the user via the Captain (jht-tmux-send CAPITANO). A new path growing might mean a new tool was added without budget for cleanup.
Output to log
Append to /jht_home/logs/dottore-actions.jsonl:
If a step was skipped by the idle gate, set the corresponding _freed_mb to null and add "skipped": ["vacuum"].
Anti-patterns
- ❌ Running
cache prunefrom the Captain — that responsibility was migrated here. The Captain coordinates, the Dottore maintains. - ❌ Running it while a Writer is mid-CV (their loop touches the uv cache occasionally for pandoc/typst libs).
- ❌ Adding a cron-like loop in the Dottore prompt — the Dottore is one-shot ~30 min cadence, you fit cache-prune at end-of-round when it makes sense, not on a fixed schedule.
- ❌ Bypassing the
jht.js cache prunewrapper to runuv cache prune/sqlite vacuumdirectly — you skip the idle gate and the unified logging.
See also
agents/dottore/dottore.md— when in the Dottore's lifecycle to slot this skill (end-of-round only).py-tools-audit— sister maintenance skill (Python packages, ~weekly cadence).agents/_team/team-rules.mdT13 — uv-as-the-only-installer rule (why the uv cache exists in the first place).
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/_skills/cache-prune/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/leopu00/job-hunter-team/cache-prune)