recursive-decomposition

Solid

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. 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.

AI & Automation 35 stars 2 forks Updated 4 months ago MIT

Install

View on GitHub

Quality Score: 72/100

Stars 20%
52
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Recursive Decomposition Guidelines ## References Consult these resources as needed: - ./references/rlm-strategies.md -- Detailed decomposition patterns from the RLM paper - ./references/cost-analysis.md -- When to apply recursive vs. direct approaches - ./references/codebase-analysis.md -- Full walkthrough of codebase-wide analysis - ./references/document-aggregation.md -- Multi-document information extraction ## Core Principles **CRITICAL: Treat inputs as environmental variables, not immediate context.** Most tasks fail when context is overloaded. 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. **Progressive Disclosure**: Load information only when necessary. Start high-level to map the territory, then dive deep into specific areas. ### When Recursive Decomposition is Required - Tasks involving 10+ files - Input exceeding ~50k tokens where single-prompt context is insufficient - Multi-hop questions requiring evidence from multiple scattered sources - Codebase-wide pattern analysis or migration planning ### When Direct Processing Works - Small contexts (<30k tokens) - Single file analysis - Linear complexity tasks with manageable inputs ## Operational Rules - Always identify the search space size first. - Always use `grep` or `glob` before `view_fil...

Details

Author
massimodeluisa
Repository
massimodeluisa/recursive-decomposition-skill
Created
4 months ago
Last Updated
4 months ago
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

agent-md-refactor

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

1,887 Updated 2 months ago
softaworks
AI & Automation Featured

chunking-strategy

Provides chunking strategies for RAG systems. Generates chunk size recommendations (256-1024 tokens), overlap percentages (10-20%), and semantic boundary detection methods. Validates semantic coherence and evaluates retrieval precision/recall metrics. Use when building retrieval-augmented generation systems, vector databases, or processing large documents.

253 Updated 3 days ago
giuseppe-trisciuoglio
AI & Automation Solid

critical-analyst

Deep critical analysis of any text, document, code, or specification to find contradictions (e.g., code does X but spec says Y), ambiguities (vague terms, undefined criteria, multiple interpretations), inconsistencies (different names for the same concept), and logical gaps (missing steps in reasoning chains) — along with suggestions on how to fix each issue. ALWAYS use this skill when the user asks to review, critique, or analyze a document, codebase, spec, requirements, architecture decision, step-by-step explanation, or any text for quality issues. Use it for requests like "find problems with", "review critically", "check for contradictions", "verify consistency", "analyze for issues", "revisar documento", "analisar especificação", or "encontrar problemas em".

21 Updated 3 weeks ago
glaucia86
Data & Documents Solid

research

Gather facts and context from codebase, docs, and web,... Use when exploring patterns, finding implementations, looking up documentation, or researching before decisions.

63 Updated 1 weeks ago
avibebuilder
AI & Automation Solid

analyzing-projects

Analyzes codebases to understand structure, tech stack, patterns, and conventions. Use when onboarding to a new project, exploring unfamiliar code, or when asked "how does this work?" or "what's the architecture?"

1,320 Updated 3 months ago
CloudAI-X