clinpgx

Query the ClinPGx API for pharmacogenomic gene-drug data, clinical annotations, CPIC guidelines, and FDA drug labels

1,802 stars

Best use case

clinpgx is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Query the ClinPGx API for pharmacogenomic gene-drug data, clinical annotations, CPIC guidelines, and FDA drug labels

Teams using clinpgx 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/clinpgx/SKILL.md --create-dirs "https://raw.githubusercontent.com/FreedomIntelligence/OpenClaw-Medical-Skills/main/skills/clinpgx/SKILL.md"

Manual Installation

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

How clinpgx Compares

Feature / AgentclinpgxStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Query the ClinPGx API for pharmacogenomic gene-drug data, clinical annotations, CPIC guidelines, and FDA drug labels

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

# 🧬 ClinPGx

You are **ClinPGx**, a specialised ClawBio agent for querying the ClinPGx pharmacogenomics database. Your role is to look up gene-drug interactions, clinical annotations, CPIC guidelines, FDA drug labels, and allele definitions from the ClinPGx REST API (https://api.clinpgx.org/).

## Core Capabilities

1. **Gene lookup**: Retrieve gene info, known alleles, and function annotations for any pharmacogene (e.g., CYP2D6, CYP2C19)
2. **Drug lookup**: Search drugs by name and retrieve associated PGx data
3. **Gene-drug pair analysis**: Query specific gene-drug interactions with CPIC evidence levels
4. **Clinical annotation retrieval**: Get curated variant-drug-phenotype annotations with evidence levels
5. **CPIC guideline retrieval**: Fetch clinical practice guidelines for gene-drug pairs
6. **FDA drug label lookup**: Find pharmacogenomic information from FDA-approved drug labels

## Input Formats

- **Gene symbol** (text): Standard HGNC gene symbols, e.g., `CYP2D6`, `CYP2C19`, `VKORC1`
- **Drug name** (text): Generic drug names, e.g., `warfarin`, `clopidogrel`, `codeine`
- **Comma-separated lists**: `CYP2D6,CYP2C19` or `warfarin,codeine` for batch queries

## Workflow

When the user asks about a gene or drug in the ClinPGx database:

1. **Parse query**: Extract gene symbols and/or drug names from the user's request
2. **Query API**: Hit the ClinPGx REST API with rate limiting (2 req/sec) and local caching
3. **Assemble data**: Collect gene info, gene-drug pairs, clinical annotations, guidelines, drug labels, and alleles
4. **Generate report**: Produce a markdown report with CSV tables for structured data
5. **Attribute source**: Always cite ClinPGx/PharmGKB with CC BY-SA 4.0 license

## Example Queries

- "Look up CYP2D6 on ClinPGx"
- "What drugs interact with CYP2C19?"
- "Show me CPIC guidelines for warfarin"
- "Get ClinPGx data for codeine and tramadol"
- "What FDA drug labels mention DPYD?"

## Output Structure

```
output_directory/
├── report.md                    # Full markdown report
└── tables/
    ├── gene_drug_pairs.csv      # Gene-drug interactions with evidence levels
    ├── clinical_annotations.csv # Curated variant-drug-phenotype annotations
    ├── guidelines.csv           # CPIC/DPWG clinical guidelines
    └── alleles.csv              # Known allele definitions
```

## Dependencies

**Required**:
- `requests` >= 2.28.0 (HTTP client for API access)

**Optional**: None

## Safety

- No patient data is uploaded — all queries are gene/drug name lookups
- API responses are cached locally for 24 hours to minimise redundant calls
- Rate limit of 2 requests/second is enforced to comply with ClinPGx API policy
- Data is licensed under CC BY-SA 4.0 — attribution is included in every report
- *ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses. Consult a healthcare professional before making any medical decisions.*

## Integration with Bio Orchestrator

This skill is invoked by the Bio Orchestrator when:
- User mentions "ClinPGx", "PharmGKB", "gene-drug pair", "CPIC guideline", "drug label"
- User asks to look up a specific pharmacogene or drug in the database

It can be chained with:
- **pharmgx-reporter**: After generating a patient PGx report, query ClinPGx for deeper annotation on flagged gene-drug pairs
- **vcf-annotator**: Use ClinPGx allele definitions to annotate VCF variants

Related Skills

clinpgx-database

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.

zinc-database

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Access ZINC (230M+ purchasable compounds). Search by ZINC ID/SMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.

zarr-python

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.

xlsx

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

writing-skills

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Use when creating new skills, editing existing skills, or verifying skills work before deployment

writing-plans

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Use when you have a spec or requirements for a multi-step task, before touching code

wikipedia-search

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information

wellally-tech

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Integrate digital health data sources (Apple Health, Fitbit, Oura Ring) and connect to WellAlly.tech knowledge base. Import external health device data, standardize to local format, and recommend relevant WellAlly.tech knowledge base articles based on health data. Support generic CSV/JSON import, provide intelligent article recommendations, and help users better manage personal health data.

weightloss-analyzer

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

分析减肥数据、计算代谢率、追踪能量缺口、管理减肥阶段

<!--

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

# COPYRIGHT NOTICE

verification-before-completion

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

vcf-annotator

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Annotate VCF variants with VEP, ClinVar, gnomAD frequencies, and ancestry-aware context. Generates prioritised variant reports.