再帰的分解で長コンテキストタスクを処理するスキル。大規模タスクを管理可能なチャンクに分割。
Decompose long-context tasks. Keep the context small.
An Agent Skill for Claude Code, Codex, Cursor and compatible agents, based on the Recursive Language Models research
Install · Usage · How it works · Structure · Acknowledgments
Large codebases, dozens of documents, long reports: as the context grows, models miss details, link distant parts by guesswork and lose accuracy. The Recursive Language Models paper calls it context rot.
When a task spans 10+ files or 50k+ tokens, the skill makes the agent treat the input as an environment to query instead of text to swallow:
Tested on the Anthropic Cookbook (196 files): 142 files scanned, 18 with API calls, 8 patterns and 4 anti-patterns reported with file:line references.
With the skills CLI:
npx skills add massimodeluisa/recursive-decomposition-skill
Add -g for a user-level install, -a claude-code (or another agent) to target one agent.
As a Claude Code plugin:
claude plugin marketplace add massimodeluisa/recursive-decomposition-skill
claude plugin install recursive-decomposition@recursive-decomposition-skill
Manual: copy skills/recursive-decomposition into ~/.claude/skills/ (or your agent's skills directory) and restart the agent.
/recursive-decomposition applies the protocol to the current task./recursive-decomposition src/ sizes that input first, then runs the protocol.The skill also activates on its own for prompts like:
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 issues across all Python files
| Situation | Approach |
|---|---|
| 10+ files, 50k+ tokens, or a multi-hop question across scattered sources | Decompose |
| 30k to 50k tokens | Decompose when completeness matters; otherwise read directly |
| Under 30k tokens, one file, or a localized answer | Read directly |
Results reported in the paper:
| Task | Direct model | With RLM |
|---|---|---|
| Multi-hop QA (6 to 11M tokens) | 70% | 91% |
| Linear aggregation | baseline | +28 to 33% |
| Quadratic reasoning | under 0.1% | 58% |
| Context scaling | 2^14 tokens | 2^18 tokens |
RLM runs were about 3x cheaper than summarisation baselines.
recursive-decomposition-skill/
├── .claude-plugin/ plugin.json, marketplace.json (the repo is the plugin)
├── .github/ bash validator and CI workflow
├── skills/recursive-decomposition/
│ ├── SKILL.md protocol, rules, patterns
│ └── references/ rlm-strategies, cost-analysis, codebase-analysis, document-aggregation
├── assets/ social preview, logo (light and dark)
├── AGENTS.md · CONVENTIONS.md · CONTRIBUTING.md · CHANGELOG.md
└── LICENSE
This skill is based on the Recursive Language Models paper. Thanks to the authors:
| Alex L. Zhang MIT CSAIL | Tim Kraska MIT | Omar Khattab MIT CSAIL, creator of DSPy |
Recursive Language Models, Alex L. Zhang, Tim Kraska, Omar Khattab, arXiv:2512.24601, December 2025. Abstract · PDF
This skill is an independent project and is not affiliated with the authors or MIT.
Massimo De Luisa: massimo.deluisa.bio
MIT, see LICENSE.
互換性
トピック