massimodeluisa/recursive-decomposition-skill logo

massimodeluisa/recursive-decomposition-skill

Free

Handle long-context tasks (100+ files) via decomposition

FreeFree tier
Inputs: text
Type
Open Source

About massimodeluisa/recursive-decomposition-skill

Recursive Decomposition Skill is a skill for Claude Code that enables handling of long-context tasks (e.g., analyzing 100+ files, multi-document QA, codebase-wide searches) by recursively decomposing inputs. Inspired by research on Recursive Language Models, the skill allows Claude to filter, chunk, recurse, verify, and synthesize information across inputs up to two orders of magnitude beyond normal context limits. It spawns sub-agents for independent analysis of segments and aggregates results programmatically. Tested on the Anthropic Cookbook (196 files, 356MB), it successfully scanned 142 files, identified 18 files with API calls, and produced a comprehensive report with file:line references. The skill is open source and available via the Claude Code Marketplace or manual installation.

Key Features

Filter: narrow search space before deep analysis
Chunk: partition inputs strategically
Recurse: spawn sub-agents for independent segments
Verify: re-check answers on smaller, focused windows
Synthesize: aggregate results programmatically
Handles inputs up to 2 orders of magnitude beyond normal context limits
Parallel sub-agent analysis for codebase-wide searches
Map-reduce pattern for information aggregation
Automatic activation for tasks describing large-scale file analysis, multi-document processing, or long-context reasoning

Pros & Cons

Pros
  • Enables analysis of inputs far beyond normal context limits
  • Maintains accuracy by verifying answers on smaller windows
  • Spawning sub-agents allows parallel processing of independent segments
  • Systematic decomposition reduces context rot and missed details
  • Open source and free to use
  • Easy installation via Claude Code Marketplace or manual setup
Cons
  • Requires Claude Code as the underlying AI platform
  • May introduce latency due to spawning and aggregating multiple sub-agents
  • Optimal for tasks that can be naturally decomposed; not suited for highly interdependent contexts

Best For

Analyze 100+ files with systematic coverage via decompositionMulti-document question answering with comprehensive extractionCodebase-wide search and pattern identificationInformation aggregation from many documentsLong-context summarization and reasoning over large evidence sets

FAQ

How does the Recursive Decomposition Skill work?
It implements a recursive decomposition approach: Claude first filters and chunks the input, then spawns sub-agents to analyze independent segments, verifies answers on smaller windows, and finally synthesizes a programmatic aggregate result.
What types of tasks benefit from this skill?
Tasks involving large-scale file analysis (e.g., analyzing all files in a directory), multi-document processing, codebase-wide searches, and long-context reasoning benefit. It is designed for inputs significantly exceeding normal context limits.
How do I install the skill?
Install via the Claude Code Marketplace using 'claude plugin marketplace add massimodeluisa/recursive-decomposition-skill' and 'claude plugin install recursive-decomposition@recursive-decomposition', or manually by copying the skill directory to ~/.claude/skills/.
Is the skill free?
Yes, the skill is open source and free to use. It is available on GitHub under an open source license (MIT).