Mindket

Recursive Decomposition Skill

Newversion 2 · updated
Star54

Overview

Massimo De Luisa’s skill for long-context jobs, even ones that fit the window. Claude sizes the input, searches before it reads, hands each batch to a sub-agent and checks the merged answer. It follows a long-context research paper.

Recursive Decomposition Skill is an open-source project on GitHub in the Developer category, listed by Mindket. It is free. This is version 2, last updated on . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

At a glance

Runs in
  • Claude Code, all your projects: the skills CLI with -g, or the plugin
  • Claude Code, one project: a copy of the skill folder in that project’s .claude/skills/
  • Codex, Cursor and other agents: the skills CLI with -a, or a copy of the folder in the agent’s skills folder
Start with
npx skills add massimodeluisa/recursive-decomposition-skill

Platform

Claude CodeCoding agent
CodexCoding agent
CursorCode editor

About

What it is

Recursive Decomposition Skill is Massimo De Luisa’s skill for long-context jobs, such as a whole codebase, a folder of documents or a pile of PDFs, even when they fit the context window. It makes Claude size the input first, search before it reads, and give each batch of files to its own sub-agent. Claude then checks the merged answer against the sources. It rests on the Recursive Language Models paper, which names the problem context rot.

  1. You ask about a whole repo, a document folder or PDFs
  2. Claude sizes the input and searches before it reads
  3. Claude gives each batch to one sub-agent, one level deep
  4. Claude merges the answers and spot-checks the sources

Who it suits

People who point Claude at something too large, dense or scattered to trust to one read. Think of an inherited codebase, a docs folder full of PRDs or meeting notes, or a stack of PDFs. It is not for one file or one function. For those, the skill tells Claude to read directly.

Who uses it, and how
WhoWhat they askExample
Developers on a big codebaseAn answer built from every fileA developer asks which API endpoints are defined across all the route files.
Product and project managersOne list from many documentsA manager asks for the key decisions from all the meeting notes in docs/.
Security reviewersOne finding list across many filesA reviewer asks Claude to find security issues across all the Python files.
Whoever owns a big PDF folderFacts from files Claude cannot read rawSomeone asks for the ten largest PDFs and the titles of the three largest.

Where to use it

The README names Claude Code, Codex, Cursor and compatible agents, and it ships a Claude Code plugin.

  • Claude Code, all your projects: the skills CLI with -g, or the plugin
  • Claude Code, one project: a copy of the skill folder in that project’s .claude/skills/
  • Codex, Cursor and other agents: the skills CLI with -a, or a copy of the folder in the agent’s skills folder

How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with every route the README gives.

What you need first
NeedDetail
An agent that reads Agent SkillsClaude Code, Codex, Cursor or a compatible one. It needs a sub-agent or task tool, since the skill hands each batch to one
Node.js with npmFor the npx command below. The README names no version. A PDF job also runs npx, when Claude calls Firecrawl’s anydoc
Accounts and keysNone for the skill. Only the optional cloud step for scanned PDFs counts Firecrawl credits. Claude Code itself runs on your Claude account
  1. Install the skill with one command. The line below uses the skills CLI. Add -g for a user-level install, or -a claude-code to aim it at one agent.
  2. Start your agent, or restart it. Claude Code’s docs say an open session sees a new skill at once, unless its skills folder was made after the session started. Then run /reload-skills or restart.
  3. Run /recursive-decomposition on a task. Give it a path or a question, and Claude does the sizing, searching and batching.
npx skills add massimodeluisa/recursive-decomposition-skill

Claude Code can also take it as a plugin. Run these two lines in a terminal, not inside a session. The marketplace registers as recursive-decomposition-skill, so the install reads the plugin’s name, @ and that name. Claude Code’s docs say a plugin skill then runs as /recursive-decomposition:recursive-decomposition.

claude plugin marketplace add massimodeluisa/recursive-decomposition-skill
claude plugin install recursive-decomposition@recursive-decomposition-skill

To copy it by hand, take the folder skills/recursive-decomposition from the repository into ~/.claude/skills/ and restart the agent. The README gives no command for that. Pick one route, because Claude Code’s docs say a plugin skill and a copied skill both load, so you would see it twice.

How to use it

Run /recursive-decomposition with a path or a question, or ask in plain words and let the skill load by itself. These are the README’s own prompts.

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

Claude does the six steps below, and you read the answer.

What Claude does, in order
StepWhat Claude does
SizeCounts files, lines, bytes or PDF pages before it reads anything
FilterSearches by file type, keyword and meaning before it opens a file
ChunkCuts what is left into batches of 5 to 10 files or natural units
RecurseWrites the batch count, then sends one sub-agent per batch in one parallel wave. Sub-agents never start more sub-agents
VerifyChecks the merged answer against a small slice of the sources and re-reads any disagreement
SynthesiseCombines the results into one answer with file and line references
When Claude splits the work and when it reads directly
SituationWhat Claude does
One file, one function or a single needleReads it directly
A list of everything, where completeness mattersSplits the work
Pairwise or multi-hop questions across scattered sourcesSplits it, even under 30k tokens
Ten or more files, or 50k tokens or moreSplits it
Under 30k tokens with an answer in one placeReads it directly

Example

You inherit a large TypeScript project and want to know how it handles errors everywhere, not in one file.

/recursive-decomposition Analyze error handling patterns across this entire codebase

You get one report of the error types by area, what already agrees, what does not and what to change, with file references.

For newcomers and experts

If you are new. A skill is a folder with a SKILL.md file that your agent reads when your task fits its description. This one is for big jobs only. Try it on a docs folder first, and ask for one list that covers every file. Context rot means answers get worse as the input grows, even inside a large window.

For experts. SKILL.md states hard rules. Claude must size the input before it reads and search a folder instead of listing its whole tree. A file over 2,000 lines or 50 KB is read by line range. A PDF over 100 pages or 30 MB is read by metadata or after a split. Claude may load no more than 5 files into the main context without a written batch plan.

Each sub-agent gets its own brief with the files, the question and the output schema. Depth stays at 1, and the batch count is written before launch. Claude never raises depth because a merge looks thin. It re-reads the disagreement instead. In the paper GPT-5, run as a recursive model, scored 58.0 F1 at depth 1 and 76.0 at depth 3 on OOLONG-Pairs. The skill’s notes add that another model can score worse when it goes deeper, so the skill stays at depth 1.

For PDFs, Claude first converts the file to markdown, then searches the markdown. Claude runs this line, with your file in place of FILE.

npx -y @firecrawl/anydoc FILE -o .firecrawl/out.md

Scanned pages make anydoc exit with code 3. Claude then reruns it with --ocr hosted or calls Firecrawl’s cloud firecrawl parse. SKILL.md gives that cloud step about 1 credit per PDF page and a 50 MB cap.

Good to know

It is one skill with no script, and it spends extra tokens on coordination.

  • Cost: The README says the paper’s runs cost about 3x less than summarising. The skill’s own cost page lists $0.99 against $0.57 for compaction on one task. Treat cost as unsettled
  • Small jobs: for one file or a quick lookup, reading directly is faster
  • Paper numbers: on multi-hop questions over 6 to 11 million tokens, SKILL.md gives 91.3% for the method against 70.5% for compaction. Inputs that size are far larger than most projects, and the score is no promise for your files
  • Maker’s check: on 131 public PDFs, plain pdftotext was faster but got no title from the largest file, a scan. The skill was slower because it ran OCR on that file
  • Privacy: your files and the sub-agents’ briefs go to your agent’s model as in any other work. A scanned PDF sent to the cloud parse goes to Firecrawl
  • Updates: the README gives no update or removal step
  • Maker: Massimo De Luisa, MIT licensed. An independent project, not affiliated with the paper’s authors, the university MIT, tccao or Firecrawl. Mindket lists the skill and is not the maker

README and files

README
# Recursive Decomposition Skill: setup notes

This kit holds setup notes written by Mindket. It does not contain the skill or its reference pages. Those install from Massimo De Luisa’s repository: https://github.com/massimodeluisa/recursive-decomposition-skill

License: MIT, Copyright (c) 2026 MDL. Full text: https://github.com/massimodeluisa/recursive-decomposition-skill/blob/main/LICENSE

Recursive Decomposition Skill is an independent project by Massimo De Luisa. The README says it is not affiliated with the paper’s authors, MIT, tccao or Firecrawl. Mindket lists it and is not the maker.

The pages these notes came from: the README (https://github.com/massimodeluisa/recursive-decomposition-skill/blob/main/README.md), the skill’s SKILL.md (https://github.com/massimodeluisa/recursive-decomposition-skill/blob/main/skills/recursive-decomposition/SKILL.md), its four reference pages in the same folder, the plugin files in https://github.com/massimodeluisa/recursive-decomposition-skill/tree/main/.claude-plugin and the changelog. Facts about where Claude Code loads skills and plugins come from Claude Code’s own docs, named where they are used. Mindket copied every command and ran none of them.

## What it is

One skill for long-context jobs. When a task covers a whole codebase, many documents, a pile of PDFs or a dense aggregate, the skill tells the agent to treat the input as something to query, not text to swallow. It is based on the Recursive Language Models paper by Alex L. Zhang, Tim Kraska and Omar Khattab (https://arxiv.org/abs/2512.24601), which calls the slow decay of answers on long inputs “context rot”.

The skill is a text file of instructions for the agent. It has no script of its own. In the README’s words, the agent does six things:

1. Size the input before reading anything.
2. Filter the search space with searches, not reads.
3. Chunk what remains into batches of 5 to 10 files or natural units.
4. Recurse at depth 1 with one sub-agent per batch, each with a self-contained brief. Sub-agents do not spawn sub-agents.
5. Verify the merged answer on a small window against the sources.
6. Synthesise programmatically, with file and line references.

Every one of those steps is the agent’s work. Your part is the question and, afterwards, reading the answer.

## Files in this kit

- setup/claude-code.md: the README’s two Claude Code routes (the skills CLI and the plugin), the manual copy, and how to check it loaded
- setup/other-agents.md: Codex, Cursor and other agents that read Agent Skills
- setup/first-run.md: the two commands, the prompts the README lists, when the agent splits the work, and the PDF route

## What you need first

- An agent that reads Agent Skills, such as Claude Code, Codex or Cursor. The README names those three.
- An agent with a sub-agent or task tool. The skill hands each batch to one, and its SKILL.md says tool names differ between agents.
- Node.js with npm, for the npx command in the first route. The README names no version. A job with PDFs also uses npx, when the agent runs Firecrawl’s anydoc.
- No account or API key for the skill itself. Only the optional cloud route for scanned PDFs, Firecrawl’s `firecrawl parse`, counts credits: SKILL.md says about 1 credit per PDF page. Claude Code itself runs on your Claude account.

## What installs where

- Skills CLI: one skill named recursive-decomposition, in the agent’s skills folder. The README says -g makes it a user-level install and -a targets one agent.
- Plugin: Claude Code keeps the plugin’s files itself. The plugin is named recursive-decomposition and its marketplace is named recursive-decomposition-skill.
- Manual: the folder skills/recursive-decomposition from the repository, copied into ~/.claude/skills/ or your agent’s skills folder.

## Your data

The skill is text. Whatever the agent reads in your files, and whatever it hands to its sub-agents, goes to your agent’s model as in any other work. Apart from the PDF route below, the skill adds more passes over your files, not a new place to send them. PDFs are converted to markdown first. SKILL.md prefers Firecrawl’s local anydoc and names the cloud `firecrawl parse` for scanned pages, so a scanned PDF may be sent to that cloud service. Check Firecrawl’s own terms before you send a private document that way.

## Update and remove

The README gives no update or removal step. setup/claude-code.md says what Claude Code’s own docs give for a plugin and for a skill folder.
Files
README.md  4 KB
setup/claude-code.md  4 KB
setup/first-run.md  5 KB
setup/other-agents.md  2 KB

4 files, 15 KB, downloaded as a zip.

What’s new

  • Version 2 · 2026-11-09

    Updated by Mindket to the current version of this kit.

  • Version 1 · 2026-11-07

Compare with similar

Listed GitHub projects in the same category that share the most topics with this one.

ProductStarsActivityLanguageLicenseLast change
Recursive Decomposition Skill This page54——MIT—
Cheap AgentShares claude-code-skill · claude-code-plugin · ai-agents310ActiveTypeScriptMIT
Claude-Mem by thedotmackShares claude-code-plugin · claude-skills · ai-agents116,866ActiveTypeScriptApache-2.0
PonytailShares claude-code-plugin · llm · ai-agents186,952ActiveJavaScriptMIT
Claude Code Skills & PluginsShares claude-code-skills · claude-skills29,769ActivePythonMIT
pstackShares claude-code-skills · claude-skills4,132—JavaScriptMIT—
Numbers as Mindket last read them, from 2026-11-07 to 2026-11-14. Activity is read from each project’s last change on GitHub: Active within 30 days, Quiet within 180, Stale after that.

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar projects

See all in Developer

Ponytail

dietrichgebert · Skill

Guides AI coding agents to write minimal code by prioritizing existing repository components and standard libraries. It adds auditing, code review, and trackin…

New187k

Claude-Mem by thedotmack

thedotmack · Kit

Alex Newman’s memory plugin for Claude Code and other coding agents. It records what the agent does in each session, turns that into short searchable notes and…

New117k

Cheap Agent

muaaz9329 · Kit

Moves routine coding in Claude Code or Codex to a low-cost model that must prove its work with a test, so your main model's usage lasts longer.

New310