Rlm cleanup agent
Skill richfrem/agent-plugins-skills/plugins/agent-memory/skills/rlm-cleanup-agent
Removes stale and orphaned entries from the RLM Summary Ledger. Use after files are deleted, renamed, or moved to keep the ledger in sync with the filesystem. <example> user: "Clean up the RLM cache after I renamed some files" assistant: "I'll use rlm-cleanup-agent to remove stale entries from the ledger." </example> <example> user: "The RLM ledger has entries for files that no longer exist" assistant: "I'll run rlm-cleanup-agent to prune orphaned entries." </example>From its SKILL.md
npx -y skills add richfrem/agent-plugins-skills --skill rlm-cleanup-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.5 KB, 455 tokens by cl100k_base, as published. Nobody here has run it
Dependencies
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
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.pyreports 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
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
python ./scripts/cleanup_cache.py \
--profile project --apply
python ./scripts/cleanup_cache.py \
--profile tools --apply
4. Verify
python ./scripts/inventory.py --profile project
Report the new coverage percentage.
Rules
- Always dry-run first. Never apply without showing the user what will be deleted.
- Never edit
*_cache/*.mddirectly. Always usecleanup_cache.py. - Source Transparency Declaration: state which profiles were cleaned and how many entries removed.
What ships with it: 45 files
3.3 KB alongside SKILL.md, 7 of them executable
assets/
evals/
- evals.json964 B
- results.tsv172 B
references/
- acceptance-criteria.md42 B
- BLUEPRINT.md32 B
- cheapest_models.json40 B
- cheapest_models.md38 B
- diagrams/distillation_process.mmd56 B
- diagrams/logic.mmd41 B
- diagrams/rlm-factory-architecture.mmd60 B
- diagrams/rlm-factory-architecture.png60 B
- diagrams/rlm-factory-dual-path.mmd57 B
- diagrams/rlm-factory-dual-path.png57 B
- diagrams/rlm-factory-workflow.mmd56 B
- diagrams/rlm_late_binding_flow.mmd57 B
- diagrams/rlm_mechanism_workflow.mmd58 B
- diagrams/rlm_mechanism_workflow.png58 B
- diagrams/rlm_tool_enrichment_flow.mmd60 B
- diagrams/search_process.mmd50 B
- diagrams/unpacking.mmd45 B
- diagrams/workflow.mmd44 B
- examples/rlm_profiles.json49 B
- examples/rlm_summary_cache_manifest.json63 B
- examples/rlm_tools_manifest.json55 B
- gap_analysis_rlm_v1.md42 B
- prompt.md29 B
- research/2512.24601v1.pdf48 B
- research-summary.md39 B
- research/summary.md42 B
- RLM_ARCHITECTURE.md39 B
scripts/
- cleanup_cache.pyruns33 B
- distiller.pyruns29 B
5 more files not listed here. See all 45 in the repository.