jmagly/aiwg/rlm-mode
Claude Code and agent skill by jmagly/aiwg
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Detect requests for recursive decomposition and large-scale operations that benefit from RLM processing
Install
npx vskill@latest install jmagly/aiwg/rlm-modeSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
RLM Mode Skill
You detect when users need large-scale operations that would benefit from recursive decomposition and route to RLM commands instead of attempting to load everything into context.
Triggers
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
- "RLM" / "recursive language model" → explicit RLM mode activation
- "process in chunks" → chunk-based decomposition request
- "decompose and process" → explicit decomposition shorthand
- "fan out" → parallel fan-out processing across files or modules
Core Problem
Loading entire codebases or directory trees into context causes:
- Context window overflow: Exceeding model limits
- Degraded quality: Agent struggles with too much information
- Poor performance: Slow processing, truncated responses
- Memory exhaustion: System crashes on large repos
RLM solution: Decompose → Process in chunks → Aggregate results
Trigger Patterns Reference
| Pattern | Example | Why RLM? | |
|---|---|---|---|
analyze all files | "analyze all TypeScript files for security issues" | Scope exceeds context window | |
search the entire codebase | "search the entire codebase for authentication logic" | Need to traverse full tree | |
review every module | "review every module for proper error handling" | Many independent reviews | |
find all instances | "find all instances of deprecated API usage" | Requires exhaustive search | |
summarize the whole repository | "summarize the whole repository structure" | Hierarchical decomposition | |
check every file | "check every file for missing tests" | File-by-file evaluation | |
scan all directories | "scan all directories for outdated dependencies" | Directory tree traversal | |
across the entire project | "find TODOs across the entire project" | Project-wide aggregation | |
throughout the repository | "identify duplicated code throughout the repository" | Cross-file comparison | |
recursively process | "recursively process src/ and generate docs" | Explicit recursion request | |
batch process | "batch process all markdown files for formatting" | Parallel batch operation | |
apply to all | "apply linting rules to all JavaScript files" | Bulk transformation | |
update every | "update every component to use new API" | Mass refactoring | |
generate for each | "generate tests for each module in lib/" | Templated generation |
Detection Logic
High Confidence (Auto-Suggest)
Patterns that almost always need RLM:
- Quantifiers: "all", "every", "entire", "whole", "throughout"
- Scope words: "codebase", "repository", "project-wide"
- Recursive terms: "recursively", "nested", "hierarchical", "tree"
- Batch terms: "batch", "bulk", "mass", "apply to multiple"
Heuristics:
- User mentions directory paths (
src/,lib/,test/) - User wants aggregated output ("list all", "summarize", "generate report")
- Task involves file count estimation >20 files
- User explicitly says "this might be a lot" or "there are many files"
Medium Confidence (Suggest with Alternatives)
Patterns that might need RLM:
- User asks about "multiple files" without quantity
- User wants to "find patterns" without specifying scope
- Task could be done with grep but user phrases it as analysis
In these cases: Ask user to clarify scope before recommending RLM
Low Confidence (Don't Suggest)
Patterns that DON'T need RLM:
- Single file operations: "analyze this file", "refactor login.ts"
- Specific file list: "check auth.ts, user.ts, and session.ts"
- Interactive exploration: "show me the auth module"
- Already scoped: "in this directory" (with small directory)
Decomposition Strategies
When RLM is appropriate, suggest the right strategy:
Strategy 1: Recursive Query (rlm-query)
Use when: User wants to find, list, or aggregate information
Example triggers:
- "find all functions that use deprecated API"
- "list all files missing tests"
- "identify all TODO comments"
- "show me all error handling patterns"
Suggested command:
The first positional argument is the context source — a single file path or glob pattern. The second is the sub-prompt for the spawned sub-agent.
Example:
Strategy 2: Batch Processing (rlm-batch)
Use when: User wants to transform, update, or generate for multiple files
Example triggers:
- "update every component to use new prop types"
- "add JSDoc comments to all functions"
- "refactor all API calls to use new client"
- "generate tests for each module"
Suggested command:
The first positional argument is the glob pattern that selects target files. The second is the operation applied to each file (use {file} as the placeholder for the current file path).
Example:
Strategy 3: Hierarchical Summary (rlm-batch with summarize aggregation)
Use when: User wants to understand large-scale structure or relationships
Example triggers:
- "summarize the entire repository structure"
- "explain the architecture of this codebase"
- "show me the dependency tree"
- "what are the main modules?"
Suggested command:
Pick a glob pattern that matches your repository layout. Common patterns:
**/README.md— works for monolith and monorepo layouts (use a.gitignore-aware glob to avoidnode_modules/)apps/*/README.md— multi-app monorepospackages/*/README.md— workspace-style monorepossrc/*/index.{ts,js}— top-level module entry points
Example:
Response Templates
When RLM is Clearly Needed
When Scope is Unclear
When User Insists on Direct Processing (Warning)
Parameter Extraction
Context Source Construction
The context source is the first positional argument — a single file path or glob pattern. Construct it from explicit and implicit signals.
From explicit mention:
- "in src/" →
src/**/* - "under lib/components/" →
lib/components/**/* - "the test directory" →
test/**/*
From implicit context:
- No mention →
**/*(whole repo) - "the codebase" →
**/* - "source files" →
src/**/*(ifsrc/exists)
File Type Filters
Combine the directory scope with a type filter to narrow the glob.
From file type mention:
- "TypeScript files" → append
*.ts - "React components" → append
*.{jsx,tsx} - "test files" → append
*.test.{js,ts} - "markdown docs" → append
*.md
From explicit pattern:
- "files matching *.config.js" → use
**/*.config.js
Default:
- No mention → leave the context source broad (
**/*)
Depth Extraction
From explicit mention:
- "top-level only" →
--depth 1 - "two levels deep" →
--depth 2 - "recursively" → omit (use default)
From implicit context:
- Summary request →
--depth 3(reasonable overview) - Search request → omit (exhaustive)
- Transform request → omit (all matches)
Parallelism Extraction
For batch operations (rlm-batch):
- Default:
--max-parallel 4(balanced, mid-sweet-spot) - User mentions "fast" →
--max-parallel 7(upper bound; see context-budget rule) - User mentions "careful" →
--max-parallel 2(conservative)
When AIWG_CONTEXT_WINDOW is declared in the project context, the parallel cap is bounded by the context-budget rule. See @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/context-budget.md.
Clarification Prompts
If Query is Ambiguous
If Scope Seems Too Large
Invocation Examples
Example 1: Find Pattern Across Codebase
User: "find all instances of console.log across the entire project"
Detection:
- Trigger: "all instances", "across the entire project"
- Strategy: rlm-query (finding information)
Extraction:
- Context source: "**/*.{js,ts,jsx,tsx}" (JavaScript/TypeScript files)
- Query: "Find all console.log statements"
Response:
Example 2: Batch Update
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagentic/code/addons/rlm/skills/rlm-mode/SKILL.md
Popularity
- Repository stars
- 96
- Repository forks
- 12
- Repository npm downloads, 7 days
- 2,424
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 19 Mar 2026, 8 months ago.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmagly/aiwg/rlm-mode)