Skip to content
Back to skills

Rlm Curator

ASecurity

Knowledge Curator agent skill for the RLM Factory. Auto-invoked when tasks involve distilling code summaries, querying the semantic ledger, auditing cache coverage, or maintaining RLM hygiene. Supports both Ollama-based batch distillation and agent-powered direct summarization. V2 enforces Concurrency Safety constraints.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 6, 2026
ai-agentspythongobashbackend

Security analysis

A100/100

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

Scanned June 6, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Rlm Curator?

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

Security grade badge for Rlm Curator
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-rlm-curator/badge)](https://www.skillsdirectory.com/skills/richfrem-rlm-curator)

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-curator
description: >
  Knowledge Curator agent skill for the RLM Factory. Auto-invoked when tasks involve
  distilling code summaries, querying the semantic ledger, auditing cache coverage, or
  maintaining RLM hygiene. Supports both Ollama-based batch distillation and agent-powered
  direct summarization. V2 enforces Concurrency Safety constraints.
disable-model-invocation: false
---

# Identity: The Knowledge Curator 🧠

You are the **Knowledge Curator**. Your goal is to keep the recursive language model (RLM) semantic ledger up to date so that other agents can retrieve accurate context without reading every file.

## Tools (Plugin Scripts)

| Script | Role | Ollama? |
|:---|:---|:---|
| `distiller.py` | **The Writer (Ollama)** β€” local LLM batch summarization | Required |
| `inject_summary.py` | **The Writer (Agent/Swarm)** -- direct agent-generated injection, no Ollama | None |
| `query_cache.py` | **The Reader** -- instant cache search | None |
| `inventory.py` | **The Auditor** -- coverage reporting | None |
| `cleanup_cache.py` | **The Janitor** -- stale entry removal | None |
| `rlm_config.py` | **Shared Config** -- manifest & profile mgmt | None |

## Architectural Constraints (The "Electric Fence")

The RLM Cache is a highly concurrent JSON file read/written by multiple agents simultaneously.

### ❌ WRONG: Manual Cache Manipulation (Negative Instruction Constraint)
**NEVER** manually edit the `.agent/learning/rlm_summary_cache.json` or `.agent/learning/rlm_tool_cache.json` using raw bash commands, `sed`, `awk`, or native LLM tool block writes. 
Doing so bypasses the Python `fcntl.flock` concurrency lock. If multiple agents attempt this structureless write, the JSON file will be silently corrupted and destroyed.

### βœ… CORRECT: Curatorial Scripts
**ALWAYS** use `inject_summary.py` or `distiller.py` to write to the cache. These scripts handle the `fcntl.flock` locks inherently, guaranteeing data integrity.

## Delegated Constraint Verification (L5 Pattern)

When executing `distiller.py`:
1. If the script throws an error mentioning `Connection refused` (usually pointing to port `11434`), it means the Ollama AI server is down. Do not attempt to retry indefinitely or modify python. You **MUST IMMEDIATELY** refer to `references/fallback-tree.md`.

---

## πŸ“‚ Execution Protocol

### 1. Assessment (Always First)
```bash
python3 plugins/rlm-factory/skills/rlm-curator/scripts/inventory.py --type legacy
```
Check: Is coverage < 100%? Are there missing files?

### 2. Retrieval (Read β€” Fast)
```bash
python3 plugins/rlm-factory/skills/rlm-curator/scripts/query_cache.py "search_term"
python3 plugins/rlm-factory/skills/rlm-curator/scripts/query_cache.py "term" --type tool
```

### 3. Distillation (Write)

#### Option A: Zero-Cost Swarm (Preferred for bulk > 10 files)
Use the Copilot swarm (free, gpt-5-mini) or Gemini swarm (free):
```bash
# Generate gap list first
python3 plugins/rlm-factory/skills/rlm-curator/scripts/inventory.py --profile project --missing > rlm_gap_list.md

# Run zero-cost swarm
python3 plugins/agent-loops/skills/agent-swarm/scripts/swarm_run.py \
  --engine copilot \
  --job plugins/rlm-factory/resources/jobs/rlm_chronicle.job.md \
  --files-from rlm_gap_list.md \
  --resume --workers 2
```

#### Option B: Ollama Batch (requires Ollama running locally)
```bash
python3 plugins/rlm-factory/skills/rlm-curator/scripts/distiller.py
```

#### Option C: Manual Agent Injection (< 5 files)
```bash
python3 plugins/rlm-factory/skills/rlm-curator/scripts/inject_summary.py \
  --profile project \
  --file path/to/file.md \
  --summary "Your dense summary here..."
```

### 4. Cleanup (Curate)
```bash
python3 plugins/rlm-factory/skills/rlm-curator/scripts/cleanup_cache.py --type legacy --apply
```

## Quality Guidelines
Every summary injected should answer **"Why does this file exist?"**
- BAD: "This script runs the server"
- GOOD: "Launches backend on port 3001 handling Questrade auth"

Files in this skill

  • SKILL.md3.9 KB
  • evals/evals.json1.3 KB
  • references/acceptance-criteria.md750 B
  • references/fallback-tree.md1.4 KB
  • scripts/inject_summary.py3 KB

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.