Agent skill · AI & Agents

Recursive Decomposition

This skill should be used when facing long-context tasks, processing large documents, handling multi-file analysis, aggregating information across many sources, answering questions requiring hierarchical reasoning, or when context length would cause "context rot" degradation. Triggers on phrases like "analyze all files", "process this large document", "aggregate information from", "search across the codebase", or tasks involving 10+ files or 50k+ tokens of input.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill recursive-decomposition --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Version: 1.0.0
Path: skills/analysis/recursive-decomposition/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Recursive Decomposition for Long-Context Tasks Based on the Recursive Language Models (RLM) research by Zhang, Kraska, and Khattab (2025), this skill provides strategies for handling tasks that exceed comfortable context limits through programmatic decomposition and recursive self-invocation. ## Core Principle Instead of loading entire contexts into the processing window, treat inputs as **environmental variables** accessible through code execution. Decompose problems recursively, process segments independently, and aggregate results programmatically. ## When to Apply - **Linear complexity tasks**: Information aggregation requiring analysis of all entries - **Quadratic complexity tasks**: Pairwise reasoning across multiple items - **Multi-hop questions**: Answers requiring evidence from multiple scattered sources - **Large document analysis**: Processing documents beyond comfortable context limits - **Codebase-wide operations**: Analyzing patterns across many files ## Decomposition Strategies ### 1. Filter Before Deep Analysis Narrow the search space before detailed processing: ``` # Instead of reading all files into context: 1. Use Grep/Glob to identify candidate files by patter

What's inside
Steps it walks through
  1. Core Principle
  2. When to Apply
  3. Decomposition Strategies
  4. 1. Filter Before Deep Analysis
  5. 2. Strategic Chunking
  6. 3. Recursive Sub-Queries
  7. 4. Answer Verification
  8. 5. Incremental Output Construction
  9. Implementation Patterns
  10. Pattern A: Codebase Analysis
  11. Pattern B: Multi-Document QA
  12. Pattern C: Information Aggregation
  13. Cost-Performance Tradeoffs
  14. Anti-Patterns to Avoid
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the Recursive Decomposition skill do?

This skill should be used when facing long-context tasks, processing large documents, handling multi-file analysis, aggregating information across many sources, answering questions requiring hierarchical reasoning, or when context length would cause "context rot" degradation. Triggers on phrases like "analyze all files", "process this large document", "aggregate information from", "search across the codebase", or tasks involving 10+ files or 50k+ tokens of input.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill recursive-decomposition --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going