defining-cohort-phenotypes

defining-cohort-phenotypes is a skill for Claude Code from maziyarpanahi/openmed. It costs 191 tokens per session (1,921 once invoked), scanned A, original, Apache-2.0.

A way to define patient groups as reusable, executable rules over the OMOP Common Data Model. OMOP is a shared structure for health data; OHDSI ATLAS authors the rules, CIRCE stores them as JSON, and that JSON can become database-specific SQL.

In plain words
What is it for?
Use it to create or adapt computable phenotypes, reuse PheKB or OHDSI Phenotype Library logic, and combine standard concept sets with OpenMed-extracted text features.
Why use it?
It makes cohort definitions reproducible across compatible health databases and can include facts found in clinical notes. This fills gaps that structured diagnosis and procedure codes may miss.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the openmed-skills plugin — 74 skills shipped together

Good fit Use it to create or adapt computable phenotypes, reuse PheKB or OHDSI Phenotype Library logic, and combine standard concept sets with OpenMed-extracted text features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maziyarpanahi/openmed/defining-cohort-phenotypes
About the project

OpenMed is local-first healthcare AI software that extracts clinical information and removes personally identifying details from clinical text on hardware controlled by the user. Healthcare developers use its Python runtime, Apple Silicon and mobile SDKs, and browser support for on-device clinical NER and PII de-identification.

maziyarpanahi/openmed · 5,290 stars · on GitHub · openmed.life

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add maziyarpanahi/openmed --skill defining-cohort-phenotypes
Clone the repo
git clone --depth 1 https://github.com/maziyarpanahi/openmed

Made for: Claude Code.

Or install openmed-skills, the plugin that ships this one along with the rest of its 74 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for defining-cohort-phenotypes

README.md
[![agentmods](https://agentmods.dev/badge/skills/maziyarpanahi/openmed/defining-cohort-phenotypes/github.svg)](https://agentmods.dev/skills/maziyarpanahi/openmed/defining-cohort-phenotypes)
Your own site
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/defining-cohort-phenotypes"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/defining-cohort-phenotypes/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for defining-cohort-phenotypes

Your own site · 80×15
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/defining-cohort-phenotypes"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/defining-cohort-phenotypes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 191 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00191 $0.01921
Opus 5 $0.00096 $0.00960
Sonnet 5 $0.00038 $0.00384
Haiku 4.5 $0.00019 $0.00192

Measured 11d ago against content hash b989d9877065, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

defining-cohort-phenotypes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/defining-cohort-phenotypes/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Defining cohort phenotypes (OHDSI / OMOP CDM)

A computable phenotype is a portable, executable definition of "which patients have condition X" — concept sets plus inclusion logic that runs against any OMOP CDM-compliant database. In the OHDSI stack, ATLAS authors these visually, CIRCE serializes them to a standardized JSON representation, and that JSON compiles to database-specific SQL. This skill helps you author such definitions and augment them with NLP features that OpenMed extracts from clinical text — exactly the signals that structured codes miss.

OMOP CDM, ATLAS, CIRCE, and the OHDSI Phenotype Library are open source. The vocabulary content you reference (SNOMED CT, CPT4, ICD) is user-supplied — do not bundle restricted terminologies; load them into your own OMOP vocabulary tables with your own licenses.

When to use

  • You need a reproducible cohort definition for analytics or research.
  • You want to reuse an existing PheKB or OHDSI Phenotype Library definition and adapt it.
  • A phenotype depends on facts that live only in free text (e.g. smoking status, symptom severity, social context) and code-based logic alone is weak.

For terminology grounding of individual entities, see coding-icd10, normalizing-rxnorm, mapping-loinc; this skill is about composing them into a cohort.

Anatomy of a CIRCE cohort definition

A CIRCE cohort definition JSON has two parts: ConceptSets (the code lists) and an expression (entry event + inclusion rules). Shape (abridged):

{
  "ConceptSets": [{
    "id": 0, "name": "Type 2 diabetes",
    "expression": { "items": [{
      "concept": { "CONCEPT_ID": 201826,           // OMOP standard concept
                   "CONCEPT_CODE": "44054006",      // SNOMED (user vocab)
                   "VOCABULARY_ID": "SNOMED" },
      "includeDescendants": true                    // pull the hierarchy
    }] }
  }],
  "PrimaryCriteria": {                              // entry event
    "CriteriaList": [{ "ConditionOccurrence": { "CodesetId": 0 } }],
    "ObservationWindow": { "PriorDays": 0, "PostDays": 0 },
    "PrimaryCriteriaLimit": { "Type": "First" }
  },
  "InclusionRules": [{
    "name": "Adult at index",
    "expression": { "Type": "ALL", "CriteriaList": [{
      "Criteria": { "ConditionEra": { "AgeAtStart": { "Value": 18, "Op": "gte" } } }
    }] }
  }]
}

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 149 lines · 191 tokens per session scan A b989d9877065

Subscribe to this mod's changes

defining-cohort-phenotypes is a skill published in the GitHub repository maziyarpanahi/openmed (5,290 stars, last pushed today), licensed Apache-2.0. It adds 191 tokens to every session and 1,921 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

benchmarking

Use this skill when the user wants to benchmark an MLX-VLM change and present the numbers in a PR — fork-vs-main A/B comparisons, isolated-module micro-benchmarks, median-of-N timing with warmup, peak-memory reporting, correctness checks, parameter sweeps, and self-contained reproducible bench scripts to paste into a…

Blaizzy/mlx-vlm · 74 tokens

benchling-integration

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

synthetic-sciences/openscience · 44 tokens

lamindb

This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological…

synthetic-sciences/openscience · 135 tokens

mike-model

Inspect a MIKE+ .sqlite model via the mike-plus MCP server — active simulation/scenario/model type, unit system, the list of simulation setups and scenarios, element counts — and switch the active scenario. Use when an agent needs to understand a MIKE+ model before running or editing it, or must run a scenario…

Zhonghao1995/Agentic-MIKE-Plus · 83 tokens

sider

Category: Drug-centric | Type: DB | Subcategory: Adverse Drug Reaction (ADR) Link: http://sideeffects.embl.de/ | Paper: https://doi.org/10.1093/nar/gkv1075.

QSong-github/DrugClaw · 0 tokens

repodb-query

Query the RepoDB drug repurposing database. Use whenever the user asks about drug-disease associations, drug repurposing candidates, or wants to look up any entity (drug name, indication, DrugBank ID, UMLS CUI, NCT ID) in RepoDB.

QSong-github/DrugClaw · 61 tokens