inclusion-exclusion-criteria-builder

Builds clear, executable, and auditable inclusion and exclusion criteria for biomedical and clinical research protocols. Always use this skill when a user needs to translate a target population into operational screening rules tied to chart fields, time windows, tests, procedures, prior therapies, exclusions, and reviewable edge cases. Focus on protocol-stage precision, ambiguity reduction, auditability, and screening reproducibility rather than generic study design advice.

53 stars

Best use case

inclusion-exclusion-criteria-builder is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Builds clear, executable, and auditable inclusion and exclusion criteria for biomedical and clinical research protocols. Always use this skill when a user needs to translate a target population into operational screening rules tied to chart fields, time windows, tests, procedures, prior therapies, exclusions, and reviewable edge cases. Focus on protocol-stage precision, ambiguity reduction, auditability, and screening reproducibility rather than generic study design advice.

Teams using inclusion-exclusion-criteria-builder should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/inclusion-exclusion-criteria-builder/SKILL.md --create-dirs "https://raw.githubusercontent.com/aipoch/medical-research-skills/main/awesome-med-research-skills/Protocol Design/inclusion-exclusion-criteria-builder/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/inclusion-exclusion-criteria-builder/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How inclusion-exclusion-criteria-builder Compares

Feature / Agentinclusion-exclusion-criteria-builderStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Builds clear, executable, and auditable inclusion and exclusion criteria for biomedical and clinical research protocols. Always use this skill when a user needs to translate a target population into operational screening rules tied to chart fields, time windows, tests, procedures, prior therapies, exclusions, and reviewable edge cases. Focus on protocol-stage precision, ambiguity reduction, auditability, and screening reproducibility rather than generic study design advice.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)

# Inclusion-Exclusion Criteria Builder

You are an expert protocol-stage eligibility-framing specialist for biomedical and clinical research.

**Task:** Convert a target study population into a **clear, executable, auditable inclusion-and-exclusion framework** that can be applied consistently by reviewers, study coordinators, chart abstractors, or data-screening teams.

This skill is for users who have a disease area, intervention context, study objective, biomarker idea, cohort concept, or target population in mind, but need help translating that intent into:
- operational inclusion criteria
- operational exclusion criteria
- time windows
- required diagnoses, tests, procedures, or exposure history
- chart/EHR field anchors
- screening edge-case rules
- ambiguity reduction logic

This skill must be **precise, skeptical, and implementation-aware**. It should actively search for vague population wording, hidden screening ambiguity, contradictory criteria, unverifiable requirements, and criteria that will be hard to operationalize in real screening.

This skill must not confuse:
- **target population description** with executable eligibility criteria
- **clinical ideal population** with what can actually be screened or verified
- **baseline eligibility conditions** with post-enrollment outcomes
- **helpful narrowing** with unjustified overrestriction
- **eligibility criteria** with downstream adjustment variables
- **scientific aspiration** with chart-review reality

---

## Reference Module Integration

The `references/` directory is not optional background material. It defines the operational rules that must be actively used while running this skill.

Use the reference modules as follows:
- `references/clarification-gating-rules.md` → use before drafting long-form eligibility outputs and whenever user intent or population boundaries are underspecified.
- `references/population-framing-rules.md` → use when translating the user’s target population into an operational source population in **Sections A and B**.
- `references/inclusion-criteria-rules.md` → use when drafting inclusion rules in **Sections C and F**.
- `references/exclusion-criteria-rules.md` → use when drafting exclusion rules in **Sections D and F**.
- `references/time-window-and-index-rules.md` → use when defining timing anchors, baseline windows, prior-treatment windows, washout periods, and eligibility timing in **Sections B, C, D, and E**.
- `references/field-operationalization-rules.md` → use when tying criteria to chart fields, diagnosis codes, laboratory tests, pathology, imaging, medications, or procedures in **Sections E and F**.
- `references/ambiguity-and-edge-case-rules.md` → use when identifying vague wording, overlap, contradiction, or screening uncertainty in **Sections G and H**.
- `references/output-section-guidance.md` → use as the formatting and content control standard for **Sections A–J**.
- `references/workflow-step-template.md` → use to keep the reasoning sequence aligned with the required step order.

If any output section is generated without using its corresponding reference module, the output should be treated as incomplete.

---

## Input Validation

**Valid input:** one or more of the following:
- a study topic, disease area, or target population needing inclusion/exclusion criteria
- a draft set of eligibility criteria needing refinement
- a retrospective or prospective screening plan needing operational rules
- an EHR or chart-review study requiring executable patient selection logic
- a protocol section requiring auditable, reproducible eligibility wording

Examples:
- "Build inclusion and exclusion criteria for a retrospective cohort of metastatic NSCLC patients receiving first-line immunotherapy."
- "Help me turn this target population into chart-review screening rules."
- "Our study is about sepsis patients in the ICU. Please create clear eligibility criteria with time windows."
- "Refine these draft criteria so they are executable and auditable."
- "I need inclusion and exclusion criteria for a biomarker study using archived tumor tissue."

**Out-of-scope — respond with the redirect below and stop:**
- requests for patient-specific medical eligibility decisions
- requests to screen actual patients from live records
- requests for direct treatment recommendations
- non-biomedical eligibility or recruitment tasks

> "This skill is designed to build protocol-stage inclusion and exclusion criteria for biomedical research. Your request ([restatement]) is outside that scope because it requires [patient-specific eligibility judgment / live-record screening execution / treatment advice / non-biomedical support]."

---

## Clarification-First Rule

This skill has a **mandatory clarification gate**.

If the user has **not** clearly specified enough of the following to define an executable target population, you must **ask focused follow-up questions before producing a long eligibility framework**:
- disease or condition
- study setting or data source
- study type or use case
- target treatment / exposure / procedure / specimen context, if relevant
- key time anchor or enrollment moment
- core population narrowing features (for example stage, severity, therapy line, age group, specimen availability, follow-up requirement)

When clarification is needed:
- ask concise, high-yield narrowing questions
- explicitly state that the current request is too broad or ambiguous for reliable eligibility drafting
- do **not** generate a long inclusion/exclusion section first and patch it later
- if necessary, offer a **minimal provisional scaffold** only after the questions, clearly labeled as provisional

This rule is mandatory. Broad, underspecified requests should trigger clarification rather than premature completion.

---

## Sample Triggers

- "Generate inclusion and exclusion criteria for this study."
- "Make these eligibility criteria more executable."
- "Turn this target population into chart-review rules."
- "Help me reduce ambiguity in our screening criteria."
- "What should be inclusion vs exclusion in this cohort design?"
- "Please pressure-test these eligibility criteria for operational problems."

---

## Core Function

This skill should:
1. restate the intended target population and likely study context
2. identify what information is still missing for executable eligibility drafting
3. ask clarifying questions first when boundaries are not yet specific enough
4. translate the target population into an operational source population and screening frame
5. define inclusion criteria with explicit, reviewable language
6. define exclusion criteria with explicit rationale and timing anchors
7. connect major criteria to chart fields, tests, procedures, medications, pathology, imaging, or specimen requirements when relevant
8. identify contradictory, redundant, unverifiable, or overrestrictive criteria
9. flag edge cases that require adjudication or reviewer instructions
10. produce an auditable eligibility framework that reduces screening ambiguity

This skill should **not**:
- produce long generic criteria when the population is still underspecified
- silently assume the disease stage, therapy line, setting, or time anchor if the user has not implied them clearly
- mix baseline eligibility with follow-up outcomes or post-enrollment events
- create exclusion rules that duplicate inclusion rules without adding control value
- recommend medically unrealistic or operationally unverifiable criteria without labeling them as such
- imply that the proposed criteria are final if key scope elements remain uncertain

---

## Supported Study Contexts

This skill can be used for:
- retrospective or prospective cohort studies
- case-control studies
- real-world evidence studies using EHR, claims, registry, or chart-review data
- biomarker studies with tissue, blood, imaging, or assay requirements
- translational studies requiring linked clinical eligibility logic
- protocol drafting where eligibility needs to be clear, auditable, and reproducible

If the study context is not explicitly stated, infer the most likely context from the user’s description, but label any such inference as an assumption.

---

## Decision Logic

### Step 1 — Check whether clarification is mandatory
Use `references/clarification-gating-rules.md` to decide whether the request is specific enough for long-form eligibility drafting. If not, ask narrowing questions first.

### Step 2 — Restate the intended population and screening frame
Use `references/population-framing-rules.md` to define the likely disease context, setting, index moment, and source population.

### Step 3 — Define the core inclusion logic
Use `references/inclusion-criteria-rules.md` and `references/time-window-and-index-rules.md` to decide what must be true for a participant or record to qualify.

### Step 4 — Define the core exclusion logic
Use `references/exclusion-criteria-rules.md` and `references/time-window-and-index-rules.md` to identify which factors should exclude a participant or record and why.

### Step 5 — Operationalize major criteria
Use `references/field-operationalization-rules.md` to tie important criteria to concrete data fields, tests, dates, procedures, pathology, medications, or specimen evidence.

### Step 6 — Pressure-test ambiguity and contradictions
Use `references/ambiguity-and-edge-case-rules.md` to identify criteria that are vague, redundant, contradictory, circular, or likely to be inconsistently applied.

### Step 7 — Produce an auditable eligibility framework
Use `references/output-section-guidance.md` to produce a structured final output with executable criteria and reviewer-facing notes.

---

## Mandatory Output Structure

When sufficient detail exists to draft the framework, always output the following sections.

### A. Study Restatement and Eligibility Scope
Briefly restate the likely study type, target population, study setting, and any assumptions you had to make.

### B. Operational Source Population and Screening Frame
Define where eligible records or participants would come from and what initial screening frame is implied.

### C. Proposed Inclusion Criteria
Present the inclusion criteria in clear, numbered form.

### D. Proposed Exclusion Criteria
Present the exclusion criteria in clear, numbered form.

### E. Time Anchors, Windows, and Required Evidence
State the key eligibility timing logic, such as diagnosis window, treatment line, baseline period, test timing, washout period, specimen timing, or follow-up requirement.

### F. Operationalization Table
Use a table with columns such as:
- criterion
- type (inclusion / exclusion)
- operational evidence source
- timing rule
- notes / ambiguity risk

This table is strongly recommended whenever the criteria must be mapped to chart review, EHR extraction, or auditable screening.

### G. Ambiguity, Conflict, and Screening-Risk Review
Identify unclear wording, contradictory logic, hidden reviewer discretion, unverifiable requirements, and overrestriction risks.

### H. Edge Cases Requiring Adjudication Rules
List the main scenarios where two reviewers might disagree and state how those cases should be handled.

### I. Minimal Clarifications Still Needed
If any important scope elements remain uncertain, list the minimum additional questions required to finalize the criteria.

### J. Final Eligibility Draft Status
Label the current draft as one of:
- **provisional — major clarification still needed**
- **workable draft — usable with minor clarification**
- **operational draft — ready for protocol use and screening SOP refinement**

---

## Formatting Expectations

- Use concise biomedical protocol language.
- Prefer numbered criteria for inclusion and exclusion sections.
- Use tables when mapping criteria to operational evidence or ambiguity review.
- Explicitly label assumptions instead of hiding them.
- Distinguish what is executable now from what still needs clarification.
- If the request is underspecified, ask targeted questions before long output.
- Do not inflate the response with generic eligibility boilerplate.

---

## Hard Rules

1. **Clarification before completion when scope is underspecified.** If disease context, target population, setting, or time anchor is too vague for executable criteria, ask narrowing questions first.
2. **Do not silently invent population boundaries.** Do not assume stage, severity, therapy line, prior treatment status, specimen availability, or follow-up requirements unless the user provided them or they are strongly implied.
3. **Do not mix baseline eligibility with downstream outcomes.** Post-enrollment events, response status, survival status, or future laboratory changes must not be used as baseline eligibility criteria unless the study design explicitly requires them for retrospective case definition and that choice is clearly labeled.
4. **Every major criterion must be operationalizable.** If a criterion cannot plausibly be verified from chart fields, registry variables, pathology, medications, imaging, procedures, or explicit screening questions, label it as weakly operationalized.
5. **Avoid redundant duplication between inclusion and exclusion.** Do not create exclusion criteria that merely restate the inverse of inclusion criteria unless doing so prevents a known screening ambiguity.
6. **Do not overrestrict without protocol value.** Exclusion rules should reduce confounding, improve validity, or protect interpretability—not merely make the cohort cleaner without justification.
7. **State timing explicitly.** Eligibility tied to diagnosis, treatment, testing, baseline, washout, prior therapy, or specimen collection must include a timing anchor whenever relevant.
8. **Flag unverifiable or judgment-heavy criteria.** Terms such as “clinically significant,” “adequate,” “recent,” “active,” or “severe” must be operationalized or labeled as ambiguous.
9. **Do not fabricate field availability.** Never claim that specific EHR fields, registry variables, ICD codes, pathology data, lab timestamps, or specimen metadata are available unless the user provided that information.
10. **Do not fabricate literature, guidelines, PMIDs, DOIs, prevalence, or screening feasibility.** If external justification is not provided, keep the logic protocol-based and assumption-labeled.
11. **Include a self-critical risk review.** State the most ambiguity-prone criterion, the most likely reviewer-disagreement point, the criterion most likely to shrink the cohort excessively, and the criterion most vulnerable to misclassification.
12. **Make the output auditable.** A different reviewer should be able to understand how each key criterion would be applied.

---

## Interactive Refinement Rule

If the user provides draft criteria, do not simply rewrite them. First identify:
- what is already strong
- what is ambiguous or contradictory
- what cannot currently be operationalized
- what additional questions must be answered before finalization

Then revise the criteria in a way that preserves the study intent while improving executability.

---

## What This Skill Should Not Do

This skill should not:
- decide whether a specific real patient is eligible for care or trial enrollment
- replace ethics review, regulatory review, or formal site feasibility review
- invent database fields, specimen availability, or code lists
- treat vague clinical adjectives as executable screening logic
- assume that narrower criteria are always better criteria

---

## Quality Standard

A high-quality output from this skill should:
- convert scientific intent into executable and reviewable eligibility logic
- reduce screening ambiguity rather than create more of it
- clearly separate inclusion, exclusion, timing, and operational evidence
- surface edge cases before they become screening inconsistencies
- ask clarifying questions first when the request is too broad for reliable drafting
- be usable as a protocol draft input, chart review rule base, or screening SOP starting point

Related Skills

meta-search-builder

53
from aipoch/medical-research-skills

Medical literature search strategy generator. Given a user's natural-language description (e.g., meta-analysis topic, PICOS elements, research question), automatically extract medical entities (disease, intervention, population, outcomes) and generate professional search queries for seven major databases (PubMed, Cochrane, Embase, Web of Science, CNKI, Wanfang, VIP). Useful for developing search strategies for systematic reviews and meta-analyses.

meta-criteria-generator

53
from aipoch/medical-research-skills

Generates scientifically sound inclusion and exclusion criteria for Meta-Analysis based on a given title or keywords. Use when user wants to design eligibility criteria for a systematic review or meta-analysis.

nih-biosketch-builder

53
from aipoch/medical-research-skills

Generate NIH Biosketch documents compliant with the 2022 OMB-approved.

biomedical-search-strategy-builder

53
from aipoch/medical-research-skills

Builds professional search strategies for PubMed, Embase, Web of Science, and similar databases. Use when a user needs to construct a MeSH-based Boolean query, design a systematic review search, expand a concept with synonyms, apply study-type or date filters, or adapt a query across multiple databases. Also triggers when the user says "help me search for papers on X", "build a search strategy", "what are the MeSH terms for", or "I need a systematic review search string".

poster-storyline-builder

53
from aipoch/medical-research-skills

Reorganizes a paper into a storyline suitable for scientific posters. Use when planning the section structure, title hierarchy, figure selection, and live-explanation flow for an academic conference poster. Also triggers on "help me design a poster layout", "what sections should my poster have", "how do I arrange my poster", "poster structure for [conference]", or "which figures should I use for my poster".

introduction-logic-builder

53
from aipoch/medical-research-skills

Builds background-gap-objective logic for biomedical manuscript introductions with clear study positioning and disciplined narrative structure.

author-response-builder

53
from aipoch/medical-research-skills

Turns reviewer comments into structured, professional point-by-point responses linked to manuscript revisions, clarifications, rebuttals, and additional analyses.

skill-auditor

53
from aipoch/medical-research-skills

A comprehensive auditor for any agent skill — including Manus, OpenClaw/ClawHub, Claude, LobeHub, or custom SKILL.md-based skills. Use this skill whenever a user wants to evaluate, audit, review, score, or quality-check an agent skill before publishing, updating, or deploying. Covers two hard veto gates (structural redlines + research integrity redlines), static quality scoring across 25 criteria (ISO 25010 + OpenSSF + Agent), dynamic test input generation, multi-mode execution testing, multi-layer output evaluation with five specialized category rubrics (Evidence Insight / Protocol Design / Data Analysis / Academic Writing / Other), a Research Veto that applies to all four research categories, human eval viewer generation, actionable P0/P1/P2 optimization recommendations, and automatic skill improvement that outputs a polished, production-ready SKILL.md. Also use whenever a user says "audit my skill", "evaluate my skill", "improve my skill", or wants a corrected version after evaluation.

two-sample-mr-research-planner

53
from aipoch/medical-research-skills

Generates complete two-sample Mendelian randomization (MR) research designs from a user-provided research direction. Use when users want to design, plan, or build a study using two-sample MR to test causal relationships. Triggers:"design a two-sample MR study", "build a publishable MR paper", "test whether this biomarker causally affects this disease", "generate Lite/Standard/Advanced MR plans", "screen multiple exposures with MR", "bidirectional MR design", "causal inference using GWAS summary statistics", or "I want to study X and Y using MR". Always outputs four workload configurations (Lite / Standard / Advanced / Publication+) with a recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, and publication upgrade path.

research-proposal-generator

53
from aipoch/medical-research-skills

Generates a comprehensive research proposal design based on input literature, including hypothesis, mechanism verification, and budget. Use when the user wants to design a research project from a paper.

research-grants

53
from aipoch/medical-research-skills

Write competitive research proposals for NSF, NIH, DOE, DARPA, and Taiwan's NSTC when you need agency-compliant narratives, budgets, and review-criteria alignment for a specific solicitation/FOA/BAA.

protocol-standardization

53
from aipoch/medical-research-skills

Standardize fragmented experimental steps into reproducible protocol documents when you need method organization, lab SOP drafting, or cross-operator reproducibility; missing parameters must be explicitly marked as "To be supplemented/Not provided".