plugins/agent-memory/skills/rlm-distill-agent/SKILL.md
Distills uncached files into the Recursive Language Model(RLM) Summary cache Ledger. You (the agent) ARE the distillation engine. Read each file deeply, write a high-quality 1-sentence summary, inject it via inject_summary.py. The purpose is if you read the full file once and produce a great summary once it will avoid the need to read the file every time you need to know what the script does or what the details of the file are. most cases the RLM summary should be sufficient. Use when files are missing from the ledger and need to be summarized. <example> user: "Summarize these new plugin files into the RLM ledger" assistant: "I'll use rlm-distill-agent to read and summarize each file into the cache." </example> <example> user: "The RLM ledger is missing 40 files -- fill the gaps" assistant: "I'll use rlm-distill-agent to process the missing files." </example>
npx skillsauth add richfrem/agent-plugins-skills rlm-distill-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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).
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.
inventory.py)First-time setup or missing profile? Run the rlm-init skill first:
# See: ../SKILL.md
# Creates rlm_profiles.json, manifest, and empty cache
python ./scripts/inventory.py --profile project
python ./scripts/inventory.py --profile tools
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.
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.
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.
| User's CLI Tool | Recommended Engine Flag | Cost Profile | Workers |
|:-------|:------|:-----|:--------|
| GitHub Copilot CLI | --engine copilot (gpt-5-mini nano tier) | $0 free | --workers 2 (rate-limit safe) |
| Google Gemini CLI | --engine gemini (gemini-3-flash-preview) | $0 free | --workers 5 (high throughput) |
| Claude Code | --engine claude (Haiku / Sonnet) | Low-Medium | --workers 3 |
Default Protocol: Ask the user: "I noticed we have over 50 files to distill. Do you have access to Copilot CLI or Gemini CLI for zero-cost batch processing, or should I use Claude Code?"
Then, run the swarm job based on their answer. For example, if they use Gemini:
python ./scripts/swarm_run.py --engine gemini --workers 5 --files-from rlm_distill_tasks_project.md
Provide a job file describing the summarization task and the gap file from inventory.py --missing.
See SKILL.md for full swarm configuration options.
| Good | Bad | |:-----|:----| | "Atomic file CRUD using POSIX rename + flock, preserving YAML frontmatter via ruamel.yaml." | "This file handles file operations." | | "3-phase search skill: RLM ledger -> ChromaDB -> grep, escalating from O(1) to exact match." | "Searches for things in the codebase." |
*_cache/*.md directory manualy -- always use inject_summary.py.data-ai
Task management agent. Auto-invoked for task creation, status tracking, and kanban board operations using Markdown files across lane directories. V2 enforces Kanban Sovereignty constraints preventing manual task file edits.
development
Create, audit, repair, and document cross-platform symlinks that work correctly on both Windows and macOS/Linux. Use this skill whenever the user mentions symlinks, symbolic links, junction points, .gitconfig symlinks, broken links after git pull, cross-platform path issues, or needs help with ln -s equivalents on Windows. Also trigger when the user reports that files are missing or wrong after switching between Mac and Windows machines using Git. This skill solves the common problem where symlinks committed on macOS show up as plain text files on Windows (and vice versa) because of Git's core.symlinks setting or missing Developer Mode / elevated permissions. **IMPORTANT FOR WINDOWS USERS:** Developer Mode must be enabled before creating symlinks. Without it, Git will check out symlinks as plain-text files or hardlinks, breaking cross-platform workflows.
development
Interactively prepares a targeted Red Team Review package. It conducts a brief discovery interview to determine the threat model, generates a strict security auditor prompt, compiles a manifest of relevant project files, and bundles them into a single Markdown artifact or ZIP archive ready for an external LLM (like Grok, ChatGPT, or Gemini) or a human reviewer.
tools
Reduces AI agent context bloat across three dimensions: (1) duplicate skill deduplication — clears stale agent directory copies since the IDE already reads from plugins/ directly; (2) instruction file optimization — rewrites CLAUDE.md, GEMINI.md, or .github/copilot-instructions.md to under ~80 lines, keeping only rules that directly change agent behaviour; (3) session token efficiency — guidance on cheap subagent delegation, context compounding across turns, and session hygiene. Trigger with "optimize context", "reduce context bloat", "deduplicate skills", "trim CLAUDE.md", "trim GEMINI.md", "fix my context usage", "why are my skills loading twice", "how do I reduce token usage", or "clean up agent directories".