cohort-compare

Installation
SKILL.md

Analyze a patient cohort: $ARGUMENTS

Use your fhir-basics skill to query FHIR endpoints. Use your clinical-knowledge skill to identify care gaps and apply correct thresholds. Use your analysis-methods skill to write correct Python analysis code.

Execution Rules

  • Do NOT explore the workspace or list files. Begin the analysis immediately.
  • Write ONE Python script that does everything: FHIR queries, analysis, chart, and summary.
  • Write the script correctly the first time. Do NOT write a draft and then edit it.
  • Run it with python (NOT python3).
  • All HTTP calls must use subprocess.run(["curl", "-sf", "--max-time", "30", url], capture_output=True, text=True) -- the requests library does NOT work through the sandbox proxy. See the fhir-basics skill for the fhir_get helper pattern.
  • Save the script to /tmp/<name>.py, run it once, interpret the output.

Steps

  1. Identify the cohort -- Query GET /Condition?code={snomed_code}&_count=200 and follow pagination links to get all matching Condition resources. Extract unique patient IDs from entry[].resource.subject.reference. Report the cohort size.
Installs
1
GitHub Stars
1.0K
First Seen
Jul 3, 2026
cohort-compare — nvidia/dgx-spark-playbooks