Use this skill when the task is to Generate and optimize clinical trial subject inclusion/exclusion criteria to balance scientific rigor with recruitment feasibility.
Use this skill for protocol design tasks that require explicit assumptions, bounded scope, and a reproducible output format.
Use this skill when you need a documented fallback path for missing inputs, execution errors, or partial evidence.
Workflow
Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.
Use Cases
Protocol Design: Create initial eligibility criteria for new clinical trials
Criteria Optimization: Refine existing criteria to improve enrollment without compromising safety/efficacy
Competitive Analysis: Analyze eligibility patterns across similar trials
Recruitment Strategy: Identify and mitigate barriers to enrollment
Feasibility Assessment: Evaluate if proposed criteria are realistic for target population
{"indication":"Type 2 Diabetes Mellitus","phase":"Phase 2","population":"adults","age_range":{"min":18,"max":75},"study_duration":"24 weeks","treatment_type":"oral","primary_endpoints":["HbA1c change from baseline"],"safety_considerations":["cardiovascular risk"],"concomitant_meds_allowed":["metformin"]}
Existing Criteria Format
{"inclusion_criteria":[{"id":"I1","criterion":"Age 18-75 years","rationale":"Adult population per regulatory guidance","category":"demographics"}],"exclusion_criteria":[{"id":"E1","criterion":"HbA1c < 7.0% or > 11.0%","rationale":"Ensure measurable treatment effect","category":"disease_severity"}]}
Output Format
Generated/Optimized Criteria
{"inclusion_criteria":[{"id":"I1","criterion":"Age 18-75 years, inclusive","category":"demographics","rationale":"Adult population; upper limit for safety","priority":"required","impact":"low"}],"exclusion_criteria":[{"id":"E1","criterion":"HbA1c < 7.5% or > 10.5% at screening","category":"disease_severity","rationale":"Optimal range for detecting treatment effect","priority":"required","impact":"medium","flexibility":"widen by 0.5% if enrollment slow"}],"optimization_notes":["Widened HbA1c range from 7.0-11.0% to 7.5-10.5% based on feasibility data"],"recruitment_metrics":{"estimated_screen_success_rate":0.35,"estimated_enrollment_rate":0.65,"key_barriers":["HbA1c upper limit","concomitant medication restrictions"]}}
Criteria Categories
Category
Description
Examples
demographics
Age, sex, race, ethnicity
Age 18-75, women of childbearing potential
disease_severity
Disease stage, severity markers
HbA1c range, tumor stage, NYHA class
medical_history
Prior conditions, comorbidities
No cardiovascular events within 6 months
concomitant_meds
Allowed/prohibited medications
Stable metformin dose allowed
laboratory
Lab value requirements
eGFR > 30 mL/min, normal liver function
lifestyle
Diet, exercise, habits
Non-smoker, willing to maintain diet
compliance
Ability to participate
Able to provide informed consent
safety
Risk minimization criteria
No history of severe hypoglycemia
Optimization Strategies
Common Modifications
Issue
Strategy
Example
Narrow age range
Widen limits
18-70 → 18-75 years
Restrictive lab values
Adjust thresholds
eGFR > 60 → eGFR > 30 mL/min
Comorbidity exclusions
Add time limits
Exclude "current" vs "history of"
Medication washouts
Shorten periods
4 weeks → 2 weeks
Geographic barriers
Add telemedicine
Include remote visits option
Retention Considerations
Minimize visit frequency when possible
Allow window periods for visit timing
Provide transportation assistance language
Consider patient-reported outcome burden
Technical Details
Difficulty: Medium
Standards: ICH E6(R2) GCP, CDISC Protocol Representation Model
Data Sources: ClinicalTrials.gov eligibility patterns, literature feasibility data
Dependencies: None (pure Python)
References
references/criteria_templates.json - Templates by therapeutic area
references/optimization_guidelines.md - Best practices for criteria optimization
Format requirement: Unless the user specifies otherwise, prefer stable, reviewable Markdown or JSON; if the skill's bundled script requires a fixed format, use that format.
If partially complete: Must explicitly mark as PARTIAL and state which steps are completed and which remain.
Failure Handling
Missing critical input: Explicitly state which fields, files, or identifiers are missing and pause.
Script, template, or resource execution failure: Report the failing step, likely cause, and recovery suggestions — do not silently degrade.
Partial completion only: Return the verified portion first, then list remaining blockers and suggested next steps.
User Checkpoints
Before executing batch processing, overwriting files, long-running searches, or multi-stage generation, confirm scope and output format with the user.
Before proceeding when a key judgment is ambiguous, evidence is insufficient, or the workflow is entering the next stage, confirm with the user.
Quick Validation
Check that key scripts, templates, or reference file paths this skill depends on exist.
Check that the final output contains the core fields, sections, or files specified for this task.
Check that results clearly mark assumptions, limitations, and incomplete items.