From grimoire
Clears librarian's local repo cache at ~/.grimoire/librarian/cache/ to reclaim disk space. Inspects contents and sizes, confirms with user before rm -rf, preserves curated library/.
npx claudepluginhub joranhonig/grimoireThis skill uses the workspace's default tool permissions.
Clear the librarian's local repository cache at `~/.grimoire/librarian/cache/`.
Adds, removes, or updates library entries in grimoire librarian's libraries.yaml. Supports git repositories and local symlink directories for knowledge bases.
Audits drives for orphaned git worktrees, large AI caches (.ollama, .gemini, .cursor, npm, pip), and artifacts (node_modules, .venv). Generates prioritized cleanup and migration plans for low disk space.
Identifies and cleans disk hogs like Rust target/, node_modules, Python venvs, git garbage, Docker images, Homebrew caches, and hidden temps. Use when disk space is low or full.
Share bugs, ideas, or general feedback.
Clear the librarian's local repository cache at ~/.grimoire/librarian/cache/.
The librarian clones external repositories on demand into ~/.grimoire/librarian/cache/
to enable efficient local code search. Over time this cache accumulates disk space. This
skill provides a safe, confirmed cleanup: it shows exactly what will be removed before
acting, so the researcher can make an informed decision.
Only the transient cache/ directory is touched. The library/ directory — which holds
curated knowledge bases indexed by libraries.yaml — is never removed by this skill.
When this skill is activated, create a todo list from the following steps. Mark each task in_progress before starting it and completed when done.
- [ ] 1. Inspect the cache — list repos and total size
- [ ] 2. Confirm with the user — show what will be removed
- [ ] 3. Remove the cache — rm -rf cache/ only
- [ ] 4. Report freed space — confirm removal and state freed bytes
Check whether ~/.grimoire/librarian/cache/ exists and contains anything:
[ -d ~/.grimoire/librarian/cache ] && ls -1 ~/.grimoire/librarian/cache/
du -sh ~/.grimoire/librarian/cache/*/ # per-repo sizes
du -sh ~/.grimoire/librarian/cache/ # total
Present the findings:
library/ is not affectedThen ask for confirmation before proceeding. Example:
Found 3 cached repositories (420 MB total):
smart-contract-vulnerabilities(12 MB)openzeppelin-contracts(180 MB)uniswap-v3-core(228 MB)Remove these? The
library/directory will not be touched. [y/N]
If the user declines, stop without making any changes.
Run:
rm -rf ~/.grimoire/librarian/cache/
Do not run rm -rf ~/.grimoire/librarian/ — that would remove the library/ directory
and libraries.yaml as well.
If rm exits with an error (e.g. permission denied), report the error and ask the user to
investigate manually. Do not retry.
Confirm that the directory has been removed and state how much disk space was freed. Note that the librarian will automatically re-clone repositories as needed for future queries.
cache/ is affected. Never remove ~/.grimoire/librarian/library/ or
~/.grimoire/librarian/library/libraries.yaml — those are maintained by the researcher.