Skip to content
Back to skills

Rlm Cleanup Agent

ASecurity

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>

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 6, 2026
ai-agentspythonbash

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add richfrem/Project_Sanctuary --skill rlm-cleanup-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rlm Cleanup Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rlm Cleanup Agent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-rlm-cleanup-agent/badge)](https://www.skillsdirectory.com/skills/richfrem-rlm-cleanup-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rlm-cleanup-agent
description: |
  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>
model: inherit
color: orange
tools: ["Bash", "Read", "Write"]
---

# 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
python3 ./scripts/cleanup_cache.py \
  --profile project --dry-run

python3 ./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
python3 ./scripts/cleanup_cache.py \
  --profile project --apply

python3 ./scripts/cleanup_cache.py \
  --profile tools --apply
```

### 4. Verify

```bash
python3 ./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.json` directly.** Always use `cleanup_cache.py`.
- **Source Transparency Declaration**: state which profiles were cleaned and how many entries removed.

<!-- DIAGNOSTIC: npx skills add local update test (SKILL.md) -->

Files in this skill

  • SKILL.md2.3 KB
  • references/BLUEPRINT.md5.9 KB
  • references/RLM_ARCHITECTURE.md3.6 KB
  • references/diagrams/distillation_process.mmd888 B
  • references/diagrams/logic.mmd1.5 KB
  • references/diagrams/rlm-factory-architecture.mmd605 B
  • references/diagrams/rlm-factory-architecture.png38.3 KB
  • references/diagrams/rlm-factory-dual-path.mmd1016 B
  • references/diagrams/rlm-factory-dual-path.png84 KB
  • references/diagrams/rlm-factory-workflow.mmd2.3 KB
  • references/diagrams/rlm_late_binding_flow.mmd1.1 KB
  • references/diagrams/rlm_mechanism_workflow.mmd2 KB
  • references/diagrams/rlm_mechanism_workflow.png62.5 KB
  • references/diagrams/rlm_tool_enrichment_flow.mmd827 B
  • references/diagrams/search_process.mmd2 KB
  • references/diagrams/unpacking.mmd569 B
  • references/diagrams/workflow.mmd1015 B
  • references/examples/rlm_profiles.json808 B
  • references/examples/rlm_summary_cache_manifest.json3.4 KB
  • references/examples/rlm_tools_manifest.json330 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.