Claude Code skill for handling long-context tasks through recursive decomposition
FAQ
recursive-decomposition-skill is a Claude Code plugin with 1 hand-picked skill for development work, indexed on Flowy. Install it with the command on its page. It includes recursive-decomposition. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
> /plugin marketplace add massimodeluisa/recursive-decomposition-skill> /plugin install recursive-decomposition@recursive-decomposition-skill
When analyzing large codebases, processing many documents, or aggregating information across dozens of files, Claude's context window becomes a bottleneck. As context grows, "context rot" degrades performance:
This skill implements Recursive Language Model (RLM) strategies from Zhang, Kraska, and Khattab's 2025 research, enabling Claude Code to handle inputs up to 2 orders of magnitude beyond normal context limits.
Instead of cramming everything into context, Claude learns to:
| Task Type | Without Skill | With Skill |
|---|---|---|
| Analyze 100+ files | Context overflow / degraded results | Systematic coverage via decomposition |
| Multi-document QA | Missed information | Comprehensive extraction |
| Codebase-wide search | Manual iteration | Parallel sub-agent analysis |
| Information aggregation | Incomplete synthesis | Map-reduce pattern |
We tested on the Anthropic Cookbook (196 files, 356MB):
Task: "Find all Anthropic API calling patterns across the codebase"
Results:
โโโ Files scanned: 142
โโโ Files with API calls: 18
โโโ Patterns identified: 8 distinct patterns
โโโ Anti-patterns detected: 4
โโโ Output: Comprehensive report with file:line references
# Add the marketplace
claude plugin marketplace add massimodeluisa/recursive-decomposition-skill
# Install the plugin
claude plugin install recursive-decomposition@recursive-decomposition
# Clone the repository
git clone https://github.com/massimodeluisa/recursive-decomposition-skill.git ~/recursive-decomposition-skill
# Add as local marketplace
claude plugin marketplace add ~/recursive-decomposition-skill
# Install the plugin
claude plugin install recursive-decomposition
# Copy skill directly to Claude's skills directory
cp -r plugins/recursive-decomposition/skills/recursive-decomposition ~/.claude/skills/
After installation, restart Claude Code for the skill to take effect.
# Update marketplace index
claude plugin marketplace update
# Update the plugin
claude plugin update recursive-decomposition@recursive-decomposition
The skill activates automatically when you describe tasks involving:
"analyze all files in...")"aggregate information from...")"find all occurrences across...")"summarize these 50 documents...")"Analyze error handling patterns across this entire codebase"
"Find all TODO comments in the project and categorize by priority"
"What API endpoints are defined across all route files?"
"Summarize the key decisions from all meeting notes in /docs"
"Find security vulnerabilities across all Python files"
The skill recognizes these patterns:
"analyze all files""process this large document""aggregate information from""search across the codebase"The skill is designed for complex, long-context tasks. Use it when:
When NOT to use:
1000 files โ Glob filter โ 100 files
100 files โ Grep filter โ 20 files
20 files โ Deep analysis
Result: 50x reduction before expensive processing
Main Agent
โโโ Sub-Agent 1 (Batch A) โโ
โโโ Sub-Agent 2 (Batch B) โโผโโ Parallel
โโโ Sub-Agent 3 (Batch C) โโ
โโโ Synthesize results
Re-check synthesized answers against focused evidence to catch context rot errors.
From the RLM paper:
| Task | Direct Model | With RLM | Improvement |
|---|---|---|---|
| Multi-hop QA (6-11M tokens) | 70% | 91% | +21% |
| Linear aggregation | Baseline | +28-33% | Significant |
| Quadratic reasoning | <0.1% | 58% | Massive |
| Context scaling | 2^14 tokens | 2^18 tokens | 16x |
Cost: RLM approaches are ~3x cheaper than summarization baselines while achieving superior quality.
recursive-decomposition-skill/
โโโ .claude-plugin/
โ โโโ marketplace.json # Marketplace manifest
โโโ plugins/
โ โโโ recursive-decomposition/
โ โโโ .claude-plugin/
โ โ โโโ plugin.json # Plugin manifest
โ โโโ README.md # Plugin documentation
โ โโโ skills/
โ โโโ recursive-decomposition/
โ โโโ SKILL.md # Core skill instructions
โ โโโ references/
โ โโโ rlm-strategies.md
โ โโโ cost-analysis.md
โ โโโ codebase-analysis.md
โ โโโ document-aggregation.md
โโโ assets/
โ โโโ logo.png # Project logo
โโโ AGENTS.md # Agent-facing docs
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ LICENSE
โโโ README.md
| File | Purpose |
|---|---|
SKILL.md | Core decomposition strategies and patterns |
references/rlm-strategies.md | Detailed techniques from the RLM paper |
references/cost-analysis.md | When to use recursive vs. direct approaches |
references/codebase-analysis.md | Full walkthrough: multi-file error handling analysis |
references/document-aggregation.md | Full walkthrough: multi-document feature extraction |
This skill is based on the Recursive Language Models research paper. Huge thanks to the authors for their groundbreaking work:
Recursive Language Models
Alex L. Zhang, Tim Kraska, Omar Khattab
arXiv:2512.24601 โข December 2025
We propose Recursive Language Models (RLMs), an inference technique enabling LLMs to handle prompts up to two orders of magnitude beyond model context windows through programmatic decomposition and recursive self-invocation over prompt segments.
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Massimo De Luisa โ @massimodeluisa
MIT License โ see LICENSE for details.
.claude-plugin/
marketplace.json
AGENTS.md
assets/
logo.png
CLAUDE.md
CONTRIBUTING.md
LICENSE
plugins/
recursive-decomposition/
.claude-plugin/
plugin.json
README.md
skills/
recursive-decomposition/
references/
codebase-analysis.md
cost-analysis.md
document-aggregation.md
rlm-strategies.md
SKILL.md
README.mdยฉ 2026 Flowy ยท Free and open source
Built for Claude Code ยท Not affiliated with Anthropic