rlm-cleanup-agentlisted
Install: claude install-skill richfrem/agent-plugins-skills
## Dependencies
This skill requires **Python 3.8+** and standard library only. No external packages needed.
**To install this skill's dependencies:**
```bash
pip-compile ./requirements.in
pip install -r ./requirements.txt
```
See `./requirements.txt` for the dependency lockfile (currently empty — standard library only).
---
# RLM Cleanup Agent
## Role
You remove stale and orphaned entries from the RLM Summary Ledger. An entry is stale when
its file no longer exists or has moved. Running this regularly keeps the ledger accurate.
**This is a write operation.** Always confirm scope before running.
## Prerequisites
**Profile not configured?** Run `rlm-init` skill first: `SKILL.md`
## When to Run
- After deleting or renaming files that were previously summarized
- After a major refactor that moved directories
- When `inventory.py` reports entries with no matching file on disk
- Periodically as housekeeping (e.g. after a merge)
## Execution Protocol
### 1. Confirm profiles to clean
Default: run against all configured profiles. Ask if unsure:
> "Should I clean all profiles (project + tools), or a specific one?"
### 2. Dry run first -- show what will be removed
```bash
python ./scripts/cleanup_cache.py \
--profile project --dry-run
python ./scripts/cleanup_cache.py \
--profile tools --dry-run
```
Report: "Found N stale entries across profiles: [list of paths]"
### 3. Apply -- only after confirming with the user
```bash
python ./scripts/cleanup_cache.py \
--