rlm-distill-agent

rlm-distill-agent is a skill for Claude Code from richfrem/agent-plugins-skills. It costs 208 tokens per session (1,160 once invoked), scanned A, original, MIT.

An agent skill that reads files and adds one-sentence summaries to an RLM, or Recursive Language Model, cache ledger.

In plain words
What is it for?
It is for finding uncached files, summarizing them, and injecting those summaries into the project cache.
Why use it?
It fills gaps when new files are created or existing files change, reducing the need to repeatedly read the same files in full.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument; mentions Claude Code; mentions Gemini CLI.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is # See: ../SKILL.md.

Part of the agent-memory plugin — 13 skills, 2 commands, 9 agents shipped together

Good fit It is for finding uncached files, summarizing them, and injecting those summaries into the project cache.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills
agentmods
npx agentmods add skills/richfrem/agent-plugins-skills/rlm-distill-agent

Made for: Claude Code.

Or install agent-memory, the plugin that ships this one along with the rest of its 13 skills, 2 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rlm-distill-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/rlm-distill-agent/github.svg)](https://agentmods.dev/skills/richfrem/agent-plugins-skills/rlm-distill-agent)
Your own site
<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/rlm-distill-agent"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/rlm-distill-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rlm-distill-agent

Your own site · 80×15
<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/rlm-distill-agent"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/rlm-distill-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 208 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,160 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00208 $0.01160
Opus 5 $0.00104 $0.00580
Sonnet 5 $0.00042 $0.00232
Haiku 4.5 $0.00021 $0.00116

Measured 5d ago against content hash 79a65048dd94, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

rlm-distill-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/check_cached.py, scripts/cleanup_cache.py, scripts/distill_one.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/agent-memory/skills/rlm-distill-agent/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 Distill Agent

Role

You ARE the distillation engine. Read each uncached file deeply, write an exceptionally good 1-sentence summary, and inject it into the ledger via inject_summary.py.

When to Use

  • Files are missing from the ledger (as reported by inventory.py)
  • A new plugin, skill, or document was just created
  • A file's content changed significantly since it was last summarized

Prerequisites

First-time setup or missing profile? Run the rlm-init skill first:

# See: ../SKILL.md
# Creates rlm_profiles.json, manifest, and empty cache

Execution Protocol

1. Identify missing files

python ./scripts/inventory.py --profile project
python ./scripts/inventory.py --profile tools

2. For each missing file -- read deeply and write a great summary

Read the entire file with view_file. Do not skim.

A great RLM summary answers: "What does this file do, what problem does it solve, and what are its key components/functions?" in one dense sentence.

3. Inject the summary

python ./scripts/inject_summary.py \
  --profile project \
  --file ../SKILL.md \
  --summary "Provides atomic file CRUD operations for markdown notes using POSIX rename and fcntl.flock."

The script handles atomic writes safely. Never write to the Markdown files manually.

4. Batching -- if 50+ files are missing

Do not attempt manual distillation for large batches. Choose an engine based on the user's CLI context and cost profile, then delegate to the agent swarm:

CRITICAL: Determine User's CLI Context First! Before blindly using --engine copilot, determine which agent CLI the user is running (Claude Code, GitHub Copilot CLI, or Google Gemini CLI). You can often tell from the terminal process or simply by asking the user which AI CLI they have access to.

Read the full file on GitHub · 118 lines

Files

What ships with it

48 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 118 lines · 208 tokens per session scan A 79a65048dd94

Subscribe to this mod's changes

rlm-distill-agent is a skill published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed today), licensed MIT. It adds 208 tokens to every session and 1,160 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

notebook

Project notes system to prevent AI context loss and reasoning loops. Init notes, save mid-flow, recover context, migrate messy notes, resolve lessons. Subcommands: /notebook, /notebook save, /notebook recover, /notebook migrate.

catcatcatstudio/cat-skills · 54 tokens

dotagents-standard

Set up, author, and navigate the dotagents standard — a slim AGENTS.md "router" at the repository root plus a hidden .agents/ directory (rules, context, memory, personas, skills, specs, logs, tasks) that splits agent context into small per-topic files loaded on demand (progressive disclosure). Use this WHENEVER the…

zaventh/dotagents-standard-skill · 230 tokens

memento

Context handoff for fresh sessions. Saves unsaved session knowledge to notebook, then produces a short orientation block to paste into a new chat. Use when user says '/memento', 'hand off context', 'prepare for fresh chat', 'save and brief', or before clearing context. NOT for: recovering context (use /notebook…

catcatcatstudio/cat-skills · 78 tokens

sync-rules

Iteration closeout knowledge routing for AI-assisted development. Use when the user asks to summarize changed function points into a knowledge base, update project docs or generated superpower docs after code changes, sync rules, distill lessons from an iteration, record durable decisions, or remember user…

wunamesst/skills · 108 tokens

poly-wiki

A knowledge-base compiler for turning scattered notes and source material into an organised, reusable wiki. It also supports searching, importing, extracting general lessons, and checking the wiki for problems.

wunamesst/skills · 109 tokens

poly-wiki

Multi-platform knowledge base compiler. Compile raw materials into structured knowledge, maintain a reusable knowledge network. Triggers: wiki compile extract ingest lint query knowledge base notes Zettelkasten.

wunamesst/skills · 39 tokens