agentleFS
Hash-7777Hash-7777/Hash-Medical-Reasearch-Agent-Skills/skills/query-planning/SKILL.md

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.

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
  1. Distinctive:

    Before prisma-search, whenever the question contains more than one concept: a drug and an outcome, a gene and a disease, an intervention …

    line 14
  2. Distinctive:

    Cover every concept: If the question names a population or a comparator, a plan that ignores it will miss the studies that matter most.

    line 29
  3. Distinctive:

    Fall back gracefully: If you cannot plan richly, a plain concept split with synonyms still beats the raw question.

    line 32

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. 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.
  2. 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").
  3. Sub-queries — one focused search per concept pairing, not one blob. Retrieve for each, then combine.
  4. 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, NIDDM

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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.