query-planning
Skill1 starsChanged 4 months agoMITView on GitHub
Decompose a clinical or research question into targeted sub-queries — concepts, hypotheses, and synonym-expanded search terms — so retrieval is thorough instead of a single naive lookup. Use before searching literature for anything more than a trivial question.
In this repository8 other files it gives its agents.
- citation-faithfulnessSkill
- claim-extractionSkill
- conflict-detectionSkill
- evidence-coverageSkill
- meta-analysisSkill
- prisma-searchSkill
- rag-injection-defenseSkill
- source-reliabilitySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before prisma-search, whenever the question contains more than one concept: a drug and an outcome, a gene and a disease, an intervention …
- Distinctive: line 29
Cover every concept: If the question names a population or a comparator, a plan that ignores it will miss the studies that matter most.
- Distinctive: line 32
Fall back gracefully: If you cannot plan richly, a plain concept split with synonyms still beats the raw question.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Query Planning
A hard question asked as one flat search gets a shallow answer. "Does metformin reduce mortality in heart failure with diabetes?" is really three questions — a drug, an outcome, and a population — and each needs its own retrieval. This skill makes the agent plan the search before running it, so the evidence it gathers actually spans the question.
When to use
Before prisma-search, whenever the question contains more than one concept: a drug and an outcome, a gene and a disease, an intervention and a comparator, a population qualifier, or a time frame.
The rule
Turn the question into a plan before you search: the core concepts, the hypotheses worth testing, and a set of targeted sub-queries with their synonyms.
Produce four things:
- Concepts — the distinct entities in the question (drug, outcome, population, comparator). Strip filler and generic academic words ("study", "effect", "analysis") so only real concepts remain.
- Hypotheses — the specific claims the search should try to confirm or refute (e.g. "metformin lowers all-cause mortality", "the effect holds in the HF-with-diabetes subgroup").
- Sub-queries — one focused search per concept pairing, not one blob. Retrieve for each, then combine.
- Synonym expansion — for each concept, add the terms a paper might actually use: brand and ingredient names, abbreviations, MeSH-style variants, British/American spellings.
Doing it well
- Cover every concept. If the question names a population or a comparator, a plan that ignores it will miss the studies that matter most.
- Expand, don't drift. Synonyms broaden recall; unrelated terms poison it. "MI" for myocardial infarction — yes. A different disease that co-occurs — no.
- One decomposition, then retrieve per sub-query. Running the sub-queries separately and pooling the results beats a single over-stuffed query that matches nothing.
- Fall back gracefully. If you cannot plan richly, a plain concept split with synonyms still beats the raw question. Never let planning become a blocker.
Output
Question: Does metformin reduce mortality in HF patients with diabetes?
Concepts: metformin | all-cause mortality | heart failure | type 2 diabetes
Hypotheses: (1) metformin lowers all-cause mortality in T2DM
(2) the effect holds in the HF subgroup
Sub-queries: • metformin AND all-cause mortality AND type 2 diabetes
• metformin AND heart failure AND mortality
• metformin AND heart failure (safety / contraindication)
Synonyms: metformin → biguanide, Glucophage
heart failure → HF, cardiac failure, HFrEF, HFpEF
type 2 diabetes → T2DM, NIDDMRetrieve each sub-query, then hand the pooled results to the rest of the pipeline. A planned search finds the subgroup study a flat search would never surface.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

