[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JKJDM8CT2XT6PJ9FDWQ9MZ":3,"skill-same:01M6JKJDM8CT2XT6PJ9FDWQ9MZ":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6JKJDM8CT2XT6PJ9FDWQ9MZ","clinpgx-database",null,"Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.","transaurus\u002Fstaging-davila7-claude-code-templates","transaurus","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F210882017?v=4","01M6JH1R6ZCRXGJCTDP5ZKZBE6","Page Turner Agent","01M6JH1RBBR2P6Y0XWDGM4B0G7",0,"MIT","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fclinpgx-database\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",[27,28,29,30,31,32,33,34,35,36,37,38,39,40],"database","clinpgx database","clinpgx","guidelines","data","access","decisions","functions","query","drug interactions","pharmacogenomics","CPIC","for","gene","2026-11-10 10:12:30",false,"---\nname: clinpgx-database\ndescription: \"Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.\"\n---\n\n# ClinPGx Database\n\n## Overview\n\nClinPGx (Clinical Pharmacogenomics Database) is a comprehensive resource for clinical pharmacogenomics information, successor to PharmGKB. It consolidates data from PharmGKB, CPIC, and PharmCAT, providing curated information on how genetic variation affects medication response. Access gene-drug pairs, clinical guidelines, allele functions, and drug labels for precision medicine applications.\n\n## When to Use This Skill\n\nThis skill should be used when:\n\n- **Gene-drug interactions**: Querying how genetic variants affect drug metabolism, efficacy, or toxicity\n- **CPIC guidelines**: Accessing evidence-based clinical practice guidelines for pharmacogenetics\n- **Allele information**: Retrieving allele function, frequency, and phenotype data\n- **Drug labels**: Exploring FDA and other regulatory pharmacogenomic drug labeling\n- **Pharmacogenomic annotations**: Accessing curated literature on gene-drug-disease relationships\n- **Clinical decision support**: Using PharmDOG tool for phenoconversion and custom genotype interpretation\n- **Precision medicine**: Implementing pharmacogenomic testing in clinical practice\n- **Drug metabolism**: Understanding CYP450 and other pharmacogene functions\n- **Personalized dosing**: Finding genotype-guided dosing recommendations\n- **Adverse drug reactions**: Identifying genetic risk factors for drug toxicity\n\n## Installation and Setup\n\n### Python API Access\n\nThe ClinPGx REST API provides programmatic access to all database resources. Basic setup:\n\n```bash\nuv pip install requests\n```\n\n### API Endpoint\n\n```python\nBASE_URL = \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002F\"\n```\n\n**Rate Limits**:\n- 2 requests per second maximum\n- Excessive requests will result in HTTP 429 (Too Many Requests) response\n\n**Authentication**: Not required for basic access\n\n**Data License**: Creative Commons Attribution-ShareAlike 4.0 International License\n\nFor substantial API use, notify the ClinPGx team at api@clinpgx.org\n\n## Core Capabilities\n\n### 1. Gene Queries\n\n**Retrieve gene information** including function, clinical annotations, and pharmacogenomic significance:\n\n```python\nimport requests\n\n# Get gene details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\")\ngene_data = response.json()\n\n# Search for genes by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\",\n                       params={\"q\": \"CYP\"})\ngenes = response.json()\n```\n\n**Key pharmacogenes**:\n- **CYP450 enzymes**: CYP2D6, CYP2C19, CYP2C9, CYP3A4, CYP3A5\n- **Transporters**: SLCO1B1, ABCB1, ABCG2\n- **Other metabolizers**: TPMT, DPYD, NUDT15, UGT1A1\n- **Receptors**: OPRM1, HTR2A, ADRB1\n- **HLA genes**: HLA-B, HLA-A\n\n### 2. Drug and Chemical Queries\n\n**Retrieve drug information** including pharmacogenomic annotations and mechanisms:\n\n```python\n# Get drug details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\u002FPA448515\")  # Warfarin\ndrug_data = response.json()\n\n# Search drugs by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                       params={\"name\": \"warfarin\"})\ndrugs = response.json()\n```\n\n**Drug categories with pharmacogenomic significance**:\n- Anticoagulants (warfarin, clopidogrel)\n- Antidepressants (SSRIs, TCAs)\n- Immunosuppressants (tacrolimus, azathioprine)\n- Oncology drugs (5-fluorouracil, irinotecan, tamoxifen)\n- Cardiovascular drugs (statins, beta-blockers)\n- Pain medications (codeine, tramadol)\n- Antivirals (abacavir)\n\n### 3. Gene-Drug Pair Queries\n\n**Access curated gene-drug relationships** with clinical annotations:\n\n```python\n# Get gene-drug pair information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2D6\", \"drug\": \"codeine\"})\npair_data = response.json()\n\n# Get all pairs for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2C19\"})\nall_pairs = response.json()\n```\n\n**Clinical annotation sources**:\n- CPIC (Clinical Pharmacogenetics Implementation Consortium)\n- DPWG (Dutch Pharmacogenetics Working Group)\n- FDA (Food and Drug Administration) labels\n- Peer-reviewed literature summary annotations\n\n### 4. CPIC Guidelines\n\n**Access evidence-based clinical practice guidelines**:\n\n```python\n# Get CPIC guideline\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\u002FPA166104939\")\nguideline = response.json()\n\n# List all CPIC guidelines\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                       params={\"source\": \"CPIC\"})\nguidelines = response.json()\n```\n\n**CPIC guideline components**:\n- Gene-drug pairs covered\n- Clinical recommendations by phenotype\n- Evidence levels and strength ratings\n- Supporting literature\n- Downloadable PDFs and supplementary materials\n- Implementation considerations\n\n**Example guidelines**:\n- CYP2D6-codeine (avoid in ultra-rapid metabolizers)\n- CYP2C19-clopidogrel (alternative therapy for poor metabolizers)\n- TPMT-azathioprine (dose reduction for intermediate\u002Fpoor metabolizers)\n- DPYD-fluoropyrimidines (dose adjustment based on activity)\n- HLA-B*57:01-abacavir (avoid if positive)\n\n### 5. Allele and Variant Information\n\n**Query allele function and frequency data**:\n\n```python\n# Get allele information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2D6*4\")\nallele_data = response.json()\n\n# Get all alleles for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                       params={\"gene\": \"CYP2D6\"})\nalleles = response.json()\n```\n\n**Allele information includes**:\n- Functional status (normal, decreased, no function, increased, uncertain)\n- Population frequencies across ethnic groups\n- Defining variants (SNPs, indels, CNVs)\n- Phenotype assignment\n- References to PharmVar and other nomenclature systems\n\n**Phenotype categories**:\n- **Ultra-rapid metabolizer** (UM): Increased enzyme activity\n- **Normal metabolizer** (NM): Normal enzyme activity\n- **Intermediate metabolizer** (IM): Reduced enzyme activity\n- **Poor metabolizer** (PM): Little to no enzyme activity\n\n### 6. Variant Annotations\n\n**Access clinical annotations for specific genetic variants**:\n\n```python\n# Get variant information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\u002Frs4244285\")\nvariant_data = response.json()\n\n# Search variants by position (if supported)\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\",\n                       params={\"chromosome\": \"10\", \"position\": \"94781859\"})\nvariants = response.json()\n```\n\n**Variant data includes**:\n- rsID and genomic coordinates\n- Gene and functional consequence\n- Allele associations\n- Clinical significance\n- Population frequencies\n- Literature references\n\n### 7. Clinical Annotations\n\n**Retrieve curated literature annotations** (formerly PharmGKB clinical annotations):\n\n```python\n# Get clinical annotations\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"gene\": \"CYP2D6\"})\nannotations = response.json()\n\n# Filter by evidence level\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"evidenceLevel\": \"1A\"})\nhigh_evidence = response.json()\n```\n\n**Evidence levels** (from highest to lowest):\n- **Level 1A**: High-quality evidence, CPIC\u002FFDA\u002FDPWG guidelines\n- **Level 1B**: High-quality evidence, not yet guideline\n- **Level 2A**: Moderate evidence from well-designed studies\n- **Level 2B**: Moderate evidence with some limitations\n- **Level 3**: Limited or conflicting evidence\n- **Level 4**: Case reports or weak evidence\n\n### 8. Drug Labels\n\n**Access pharmacogenomic information from drug labels**:\n\n```python\n# Get drug labels with PGx information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"drug\": \"warfarin\"})\nlabels = response.json()\n\n# Filter by regulatory source\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"source\": \"FDA\"})\nfda_labels = response.json()\n```\n\n**Label information includes**:\n- Testing recommendations\n- Dosing guidance by genotype\n- Warnings and precautions\n- Biomarker information\n- Regulatory source (FDA, EMA, PMDA, etc.)\n\n### 9. Pathways\n\n**Explore pharmacokinetic and pharmacodynamic pathways**:\n\n```python\n# Get pathway information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\u002FPA146123006\")  # Warfarin pathway\npathway_data = response.json()\n\n# Search pathways by drug\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\",\n                       params={\"drug\": \"warfarin\"})\npathways = response.json()\n```\n\n**Pathway diagrams** show:\n- Drug metabolism steps\n- Enzymes and transporters involved\n- Gene variants affecting each step\n- Downstream effects on efficacy\u002Ftoxicity\n- Interactions with other pathways\n\n## Query Workflow\n\n### Workflow 1: Clinical Decision Support for Drug Prescription\n\n1. **Identify patient genotype** for relevant pharmacogenes:\n   ```python\n   # Example: Patient is CYP2C19 *1\u002F*2 (intermediate metabolizer)\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2C19*2\")\n   allele_function = response.json()\n   ```\n\n2. **Query gene-drug pairs** for medication of interest:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   pair_info = response.json()\n   ```\n\n3. **Retrieve CPIC guideline** for dosing recommendations:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   guideline = response.json()\n   # Recommendation: Alternative antiplatelet therapy for IM\u002FPM\n   ```\n\n4. **Check drug label** for regulatory guidance:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                          params={\"drug\": \"clopidogrel\"})\n   label = response.json()\n   ```\n\n### Workflow 2: Gene Panel Analysis\n\n1. **Get list of pharmacogenes** in clinical panel:\n   ```python\n   pgx_panel = [\"CYP2C19\", \"CYP2D6\", \"CYP2C9\", \"TPMT\", \"DPYD\", \"SLCO1B1\"]\n   ```\n\n2. **For each gene, retrieve all drug interactions**:\n   ```python\n   all_interactions = {}\n   for gene in pgx_panel:\n       response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                              params={\"gene\": gene})\n       all_interactions[gene] = response.json()\n   ```\n\n3. **Filter for CPIC guideline-level evidence**:\n   ```python\n   for gene, pairs in all_interactions.items():\n       for pair in pairs:\n           if pair.get('cpicLevel'):  # Has CPIC guideline\n               print(f\"{gene} - {pair['drug']}: {pair['cpicLevel']}\")\n   ```\n\n4. **Generate patient report** with actionable pharmacogenomic findings.\n\n### Workflow 3: Drug Safety Assessment\n\n1. **Query drug for PGx associations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                          params={\"name\": \"abacavir\"})\n   drug_id = response.json()[0]['id']\n   ```\n\n2. **Get clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"drug\": drug_id})\n   annotations = response.json()\n   ```\n\n3. **Check for HLA associations** and toxicity risk:\n   ```python\n   for annotation in annotations:\n       if 'HLA' in annotation.get('genes', []):\n           print(f\"Toxicity risk: {annotation['phenotype']}\")\n           print(f\"Evidence level: {annotation['evidenceLevel']}\")\n   ```\n\n4. **Retrieve screening recommendations** from guidelines and labels.\n\n### Workflow 4: Research Analysis - Population Pharmacogenomics\n\n1. **Get allele frequencies** for population comparison:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                          params={\"gene\": \"CYP2D6\"})\n   alleles = response.json()\n   ```\n\n2. **Extract population-specific frequencies**:\n   ```python\n   populations = ['European', 'African', 'East Asian', 'Latino']\n   frequency_data = {}\n   for allele in alleles:\n       allele_name = allele['name']\n       frequency_data[allele_name] = {\n           pop: allele.get(f'{pop}_frequency', 'N\u002FA')\n           for pop in populations\n       }\n   ```\n\n3. **Calculate phenotype distributions** by population:\n   ```python\n   # Combine allele frequencies with function to predict phenotypes\n   phenotype_dist = calculate_phenotype_frequencies(frequency_data)\n   ```\n\n4. **Analyze implications** for drug dosing in diverse populations.\n\n### Workflow 5: Literature Evidence Review\n\n1. **Search for gene-drug pair**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   pair = response.json()\n   ```\n\n2. **Retrieve all clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   annotations = response.json()\n   ```\n\n3. **Filter by evidence level and publication date**:\n   ```python\n   high_quality = [a for a in annotations\n                   if a['evidenceLevel'] in ['1A', '1B', '2A']]\n   ```\n\n4. **Extract PMIDs** and retrieve full references:\n   ```python\n   pmids = [a['pmid'] for a in high_quality if 'pmid' in a]\n   # Use PubMed skill to retrieve full citations\n   ```\n\n## Rate Limiting and Best Practices\n\n### Rate Limit Compliance\n\n```python\nimport time\n\ndef rate_limited_request(url, params=None, delay=0.5):\n    \"\"\"Make API request with rate limiting (2 req\u002Fsec max)\"\"\"\n    response = requests.get(url, params=params)\n    time.sleep(delay)  # Wait 0.5 seconds between requests\n    return response\n\n# Use in loops\ngenes = [\"CYP2D6\", \"CYP2C19\", \"CYP2C9\"]\nfor gene in genes:\n    response = rate_limited_request(\n        \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002F\" + gene\n    )\n    data = response.json()\n```\n\n### Error Handling\n\n```python\ndef safe_api_call(url, params=None, max_retries=3):\n    \"\"\"API call with error handling and retries\"\"\"\n    for attempt in range(max_retries):\n        try:\n            response = requests.get(url, params=params, timeout=10)\n\n            if response.status_code == 200:\n                return response.json()\n            elif response.status_code == 429:\n                # Rate limit exceeded\n                wait_time = 2 ** attempt  # Exponential backoff\n                print(f\"Rate limit hit. Waiting {wait_time}s...\")\n                time.sleep(wait_time)\n            else:\n                response.raise_for_status()\n\n        except requests.exceptions.RequestException as e:\n            print(f\"Attempt {attempt + 1} failed: {e}\")\n            if attempt == max_retries - 1:\n                raise\n            time.sleep(1)\n```\n\n### Caching Results\n\n```python\nimport json\nfrom pathlib import Path\n\ndef cached_query(cache_file, api_func, *args, **kwargs):\n    \"\"\"Cache API results to avoid repeated queries\"\"\"\n    cache_path = Path(cache_file)\n\n    if cache_path.exists():\n        with open(cache_path) as f:\n            return json.load(f)\n\n    result = api_func(*args, **kwargs)\n\n    with open(cache_path, 'w') as f:\n        json.dump(result, f, indent=2)\n\n    return result\n\n# Usage\ngene_data = cached_query(\n    'cyp2d6_cache.json',\n    rate_limited_request,\n    \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\"\n)\n```\n\n## PharmDOG Tool\n\nPharmDOG (formerly DDRx) is ClinPGx's clinical decision support tool for interpreting pharmacogenomic test results:\n\n**Key features**:\n- **Phenoconversion calculator**: Adjusts phenotype predictions for drug-drug interactions affecting CYP2D6\n- **Custom genotypes**: Input patient genotypes to get phenotype predictions\n- **QR code sharing**: Generate shareable patient reports\n- **Flexible guidance sources**: Select which guidelines to apply (CPIC, DPWG, FDA)\n- **Multi-drug analysis**: Assess multiple medications simultaneously\n\n**Access**: Available at https:\u002F\u002Fwww.clinpgx.org\u002Fpharmacogenomic-decision-support\n\n**Use cases**:\n- Clinical interpretation of PGx panel results\n- Medication review for patients with known genotypes\n- Patient education materials\n- Point-of-care decision support\n\n## Resources\n\n### scripts\u002Fquery_clinpgx.py\n\nPython script with ready-to-use functions for common ClinPGx queries:\n\n- `get_gene_info(gene_symbol)` - Retrieve gene details\n- `get_drug_info(drug_name)` - Get drug information\n- `get_gene_drug_pairs(gene, drug)` - Query gene-drug interactions\n- `get_cpic_guidelines(gene, drug)` - Retrieve CPIC guidelines\n- `get_alleles(gene)` - Get all alleles for a gene\n- `get_clinical_annotations(gene, drug, evidence_level)` - Query literature annotations\n- `get_drug_labels(drug)` - Retrieve pharmacogenomic drug labels\n- `search_variants(rsid)` - Search by variant rsID\n- `export_to_dataframe(data)` - Convert results to pandas DataFrame\n\nConsult this script for implementation examples with proper rate limiting and error handling.\n\n### references\u002Fapi_reference.md\n\nComprehensive API documentation including:\n\n- Complete endpoint listing with parameters\n- Request\u002Fresponse format specifications\n- Example queries for each endpoint\n- Filter operators and search patterns\n- Data schema definitions\n- Rate limiting details\n- Authentication requirements (if any)\n- Troubleshooting common errors\n\nRefer to this document when detailed API information is needed or when constructing complex queries.\n\n## Important Notes\n\n### Data Sources and Integration\n\nClinPGx consolidates multiple authoritative sources:\n- **PharmGKB**: Curated pharmacogenomics knowledge base (now part of ClinPGx)\n- **CPIC**: Evidence-based clinical implementation guidelines\n- **PharmCAT**: Allele calling and phenotype interpretation tool\n- **DPWG**: Dutch pharmacogenetics guidelines\n- **FDA\u002FEMA labels**: Regulatory pharmacogenomic information\n\nAs of July 2025, all PharmGKB URLs redirect to corresponding ClinPGx pages.\n\n### Clinical Implementation Considerations\n\n- **Evidence levels**: Always check evidence strength before clinical application\n- **Population differences**: Allele frequencies vary significantly across populations\n- **Phenoconversion**: Consider drug-drug interactions that affect enzyme activity\n- **Multi-gene effects**: Some drugs affected by multiple pharmacogenes\n- **Non-genetic factors**: Age, organ function, drug interactions also affect response\n- **Testing limitations**: Not all clinically relevant alleles detected by all assays\n\n### Data Updates\n\n- ClinPGx continuously updates with new evidence and guidelines\n- Check publication dates for clinical annotations\n- Monitor ClinPGx Blog (https:\u002F\u002Fblog.clinpgx.org\u002F) for announcements\n- CPIC guidelines updated as new evidence emerges\n- PharmVar provides nomenclature updates for allele definitions\n\n### API Stability\n\n- API endpoints are relatively stable but may change during development\n- Parameters and response formats subject to modification\n- Monitor API changelog and ClinPGx blog for updates\n- Consider version pinning for production applications\n- Test API changes in development before production deployment\n\n## Common Use Cases\n\n### Pre-emptive Pharmacogenomic Testing\n\nQuery all clinically actionable gene-drug pairs to guide panel selection:\n\n```python\n# Get all CPIC guideline pairs\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"cpicLevel\": \"A\"})  # Level A recommendations\nactionable_pairs = response.json()\n```\n\n### Medication Therapy Management\n\nReview patient medications against known genotypes:\n\n```python\npatient_genes = {\"CYP2C19\": \"*1\u002F*2\", \"CYP2D6\": \"*1\u002F*1\", \"SLCO1B1\": \"*1\u002F*5\"}\nmedications = [\"clopidogrel\", \"simvastatin\", \"escitalopram\"]\n\nfor med in medications:\n    for gene in patient_genes:\n        response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                               params={\"gene\": gene, \"drug\": med})\n        # Check for interactions and dosing guidance\n```\n\n### Clinical Trial Eligibility\n\nScreen for pharmacogenomic contraindications:\n\n```python\n# Check for HLA-B*57:01 before abacavir trial\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"HLA-B\", \"drug\": \"abacavir\"})\npair_info = response.json()\n# CPIC: Do not use if HLA-B*57:01 positive\n```\n\n## Additional Resources\n\n- **ClinPGx website**: https:\u002F\u002Fwww.clinpgx.org\u002F\n- **ClinPGx Blog**: https:\u002F\u002Fblog.clinpgx.org\u002F\n- **API documentation**: https:\u002F\u002Fapi.clinpgx.org\u002F\n- **CPIC website**: https:\u002F\u002Fcpicpgx.org\u002F\n- **PharmCAT**: https:\u002F\u002Fpharmcat.clinpgx.org\u002F\n- **ClinGen**: https:\u002F\u002Fclinicalgenome.org\u002F\n- **Contact**: api@clinpgx.org (for substantial API use)\n","# ClinPGx Database\n\n## Overview\n\nClinPGx (Clinical Pharmacogenomics Database) is a comprehensive resource for clinical pharmacogenomics information, successor to PharmGKB. It consolidates data from PharmGKB, CPIC, and PharmCAT, providing curated information on how genetic variation affects medication response. Access gene-drug pairs, clinical guidelines, allele functions, and drug labels for precision medicine applications.\n\n## When to Use This Skill\n\nThis skill should be used when:\n\n- **Gene-drug interactions**: Querying how genetic variants affect drug metabolism, efficacy, or toxicity\n- **CPIC guidelines**: Accessing evidence-based clinical practice guidelines for pharmacogenetics\n- **Allele information**: Retrieving allele function, frequency, and phenotype data\n- **Drug labels**: Exploring FDA and other regulatory pharmacogenomic drug labeling\n- **Pharmacogenomic annotations**: Accessing curated literature on gene-drug-disease relationships\n- **Clinical decision support**: Using PharmDOG tool for phenoconversion and custom genotype interpretation\n- **Precision medicine**: Implementing pharmacogenomic testing in clinical practice\n- **Drug metabolism**: Understanding CYP450 and other pharmacogene functions\n- **Personalized dosing**: Finding genotype-guided dosing recommendations\n- **Adverse drug reactions**: Identifying genetic risk factors for drug toxicity\n\n## Installation and Setup\n\n### Python API Access\n\nThe ClinPGx REST API provides programmatic access to all database resources. Basic setup:\n\n```bash\nuv pip install requests\n```\n\n### API Endpoint\n\n```python\nBASE_URL = \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002F\"\n```\n\n**Rate Limits**:\n- 2 requests per second maximum\n- Excessive requests will result in HTTP 429 (Too Many Requests) response\n\n**Authentication**: Not required for basic access\n\n**Data License**: Creative Commons Attribution-ShareAlike 4.0 International License\n\nFor substantial API use, notify the ClinPGx team at api@clinpgx.org\n\n## Core Capabilities\n\n### 1. Gene Queries\n\n**Retrieve gene information** including function, clinical annotations, and pharmacogenomic significance:\n\n```python\nimport requests\n\n# Get gene details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\")\ngene_data = response.json()\n\n# Search for genes by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\",\n                       params={\"q\": \"CYP\"})\ngenes = response.json()\n```\n\n**Key pharmacogenes**:\n- **CYP450 enzymes**: CYP2D6, CYP2C19, CYP2C9, CYP3A4, CYP3A5\n- **Transporters**: SLCO1B1, ABCB1, ABCG2\n- **Other metabolizers**: TPMT, DPYD, NUDT15, UGT1A1\n- **Receptors**: OPRM1, HTR2A, ADRB1\n- **HLA genes**: HLA-B, HLA-A\n\n### 2. Drug and Chemical Queries\n\n**Retrieve drug information** including pharmacogenomic annotations and mechanisms:\n\n```python\n# Get drug details\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\u002FPA448515\")  # Warfarin\ndrug_data = response.json()\n\n# Search drugs by name\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                       params={\"name\": \"warfarin\"})\ndrugs = response.json()\n```\n\n**Drug categories with pharmacogenomic significance**:\n- Anticoagulants (warfarin, clopidogrel)\n- Antidepressants (SSRIs, TCAs)\n- Immunosuppressants (tacrolimus, azathioprine)\n- Oncology drugs (5-fluorouracil, irinotecan, tamoxifen)\n- Cardiovascular drugs (statins, beta-blockers)\n- Pain medications (codeine, tramadol)\n- Antivirals (abacavir)\n\n### 3. Gene-Drug Pair Queries\n\n**Access curated gene-drug relationships** with clinical annotations:\n\n```python\n# Get gene-drug pair information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2D6\", \"drug\": \"codeine\"})\npair_data = response.json()\n\n# Get all pairs for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"CYP2C19\"})\nall_pairs = response.json()\n```\n\n**Clinical annotation sources**:\n- CPIC (Clinical Pharmacogenetics Implementation Consortium)\n- DPWG (Dutch Pharmacogenetics Working Group)\n- FDA (Food and Drug Administration) labels\n- Peer-reviewed literature summary annotations\n\n### 4. CPIC Guidelines\n\n**Access evidence-based clinical practice guidelines**:\n\n```python\n# Get CPIC guideline\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\u002FPA166104939\")\nguideline = response.json()\n\n# List all CPIC guidelines\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                       params={\"source\": \"CPIC\"})\nguidelines = response.json()\n```\n\n**CPIC guideline components**:\n- Gene-drug pairs covered\n- Clinical recommendations by phenotype\n- Evidence levels and strength ratings\n- Supporting literature\n- Downloadable PDFs and supplementary materials\n- Implementation considerations\n\n**Example guidelines**:\n- CYP2D6-codeine (avoid in ultra-rapid metabolizers)\n- CYP2C19-clopidogrel (alternative therapy for poor metabolizers)\n- TPMT-azathioprine (dose reduction for intermediate\u002Fpoor metabolizers)\n- DPYD-fluoropyrimidines (dose adjustment based on activity)\n- HLA-B*57:01-abacavir (avoid if positive)\n\n### 5. Allele and Variant Information\n\n**Query allele function and frequency data**:\n\n```python\n# Get allele information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2D6*4\")\nallele_data = response.json()\n\n# Get all alleles for a gene\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                       params={\"gene\": \"CYP2D6\"})\nalleles = response.json()\n```\n\n**Allele information includes**:\n- Functional status (normal, decreased, no function, increased, uncertain)\n- Population frequencies across ethnic groups\n- Defining variants (SNPs, indels, CNVs)\n- Phenotype assignment\n- References to PharmVar and other nomenclature systems\n\n**Phenotype categories**:\n- **Ultra-rapid metabolizer** (UM): Increased enzyme activity\n- **Normal metabolizer** (NM): Normal enzyme activity\n- **Intermediate metabolizer** (IM): Reduced enzyme activity\n- **Poor metabolizer** (PM): Little to no enzyme activity\n\n### 6. Variant Annotations\n\n**Access clinical annotations for specific genetic variants**:\n\n```python\n# Get variant information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\u002Frs4244285\")\nvariant_data = response.json()\n\n# Search variants by position (if supported)\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fvariant\",\n                       params={\"chromosome\": \"10\", \"position\": \"94781859\"})\nvariants = response.json()\n```\n\n**Variant data includes**:\n- rsID and genomic coordinates\n- Gene and functional consequence\n- Allele associations\n- Clinical significance\n- Population frequencies\n- Literature references\n\n### 7. Clinical Annotations\n\n**Retrieve curated literature annotations** (formerly PharmGKB clinical annotations):\n\n```python\n# Get clinical annotations\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"gene\": \"CYP2D6\"})\nannotations = response.json()\n\n# Filter by evidence level\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                       params={\"evidenceLevel\": \"1A\"})\nhigh_evidence = response.json()\n```\n\n**Evidence levels** (from highest to lowest):\n- **Level 1A**: High-quality evidence, CPIC\u002FFDA\u002FDPWG guidelines\n- **Level 1B**: High-quality evidence, not yet guideline\n- **Level 2A**: Moderate evidence from well-designed studies\n- **Level 2B**: Moderate evidence with some limitations\n- **Level 3**: Limited or conflicting evidence\n- **Level 4**: Case reports or weak evidence\n\n### 8. Drug Labels\n\n**Access pharmacogenomic information from drug labels**:\n\n```python\n# Get drug labels with PGx information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"drug\": \"warfarin\"})\nlabels = response.json()\n\n# Filter by regulatory source\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                       params={\"source\": \"FDA\"})\nfda_labels = response.json()\n```\n\n**Label information includes**:\n- Testing recommendations\n- Dosing guidance by genotype\n- Warnings and precautions\n- Biomarker information\n- Regulatory source (FDA, EMA, PMDA, etc.)\n\n### 9. Pathways\n\n**Explore pharmacokinetic and pharmacodynamic pathways**:\n\n```python\n# Get pathway information\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\u002FPA146123006\")  # Warfarin pathway\npathway_data = response.json()\n\n# Search pathways by drug\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fpathway\",\n                       params={\"drug\": \"warfarin\"})\npathways = response.json()\n```\n\n**Pathway diagrams** show:\n- Drug metabolism steps\n- Enzymes and transporters involved\n- Gene variants affecting each step\n- Downstream effects on efficacy\u002Ftoxicity\n- Interactions with other pathways\n\n## Query Workflow\n\n### Workflow 1: Clinical Decision Support for Drug Prescription\n\n1. **Identify patient genotype** for relevant pharmacogenes:\n   ```python\n   # Example: Patient is CYP2C19 *1\u002F*2 (intermediate metabolizer)\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\u002FCYP2C19*2\")\n   allele_function = response.json()\n   ```\n\n2. **Query gene-drug pairs** for medication of interest:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   pair_info = response.json()\n   ```\n\n3. **Retrieve CPIC guideline** for dosing recommendations:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fguideline\",\n                          params={\"gene\": \"CYP2C19\", \"drug\": \"clopidogrel\"})\n   guideline = response.json()\n   # Recommendation: Alternative antiplatelet therapy for IM\u002FPM\n   ```\n\n4. **Check drug label** for regulatory guidance:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FdrugLabel\",\n                          params={\"drug\": \"clopidogrel\"})\n   label = response.json()\n   ```\n\n### Workflow 2: Gene Panel Analysis\n\n1. **Get list of pharmacogenes** in clinical panel:\n   ```python\n   pgx_panel = [\"CYP2C19\", \"CYP2D6\", \"CYP2C9\", \"TPMT\", \"DPYD\", \"SLCO1B1\"]\n   ```\n\n2. **For each gene, retrieve all drug interactions**:\n   ```python\n   all_interactions = {}\n   for gene in pgx_panel:\n       response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                              params={\"gene\": gene})\n       all_interactions[gene] = response.json()\n   ```\n\n3. **Filter for CPIC guideline-level evidence**:\n   ```python\n   for gene, pairs in all_interactions.items():\n       for pair in pairs:\n           if pair.get('cpicLevel'):  # Has CPIC guideline\n               print(f\"{gene} - {pair['drug']}: {pair['cpicLevel']}\")\n   ```\n\n4. **Generate patient report** with actionable pharmacogenomic findings.\n\n### Workflow 3: Drug Safety Assessment\n\n1. **Query drug for PGx associations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fchemical\",\n                          params={\"name\": \"abacavir\"})\n   drug_id = response.json()[0]['id']\n   ```\n\n2. **Get clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"drug\": drug_id})\n   annotations = response.json()\n   ```\n\n3. **Check for HLA associations** and toxicity risk:\n   ```python\n   for annotation in annotations:\n       if 'HLA' in annotation.get('genes', []):\n           print(f\"Toxicity risk: {annotation['phenotype']}\")\n           print(f\"Evidence level: {annotation['evidenceLevel']}\")\n   ```\n\n4. **Retrieve screening recommendations** from guidelines and labels.\n\n### Workflow 4: Research Analysis - Population Pharmacogenomics\n\n1. **Get allele frequencies** for population comparison:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fallele\",\n                          params={\"gene\": \"CYP2D6\"})\n   alleles = response.json()\n   ```\n\n2. **Extract population-specific frequencies**:\n   ```python\n   populations = ['European', 'African', 'East Asian', 'Latino']\n   frequency_data = {}\n   for allele in alleles:\n       allele_name = allele['name']\n       frequency_data[allele_name] = {\n           pop: allele.get(f'{pop}_frequency', 'N\u002FA')\n           for pop in populations\n       }\n   ```\n\n3. **Calculate phenotype distributions** by population:\n   ```python\n   # Combine allele frequencies with function to predict phenotypes\n   phenotype_dist = calculate_phenotype_frequencies(frequency_data)\n   ```\n\n4. **Analyze implications** for drug dosing in diverse populations.\n\n### Workflow 5: Literature Evidence Review\n\n1. **Search for gene-drug pair**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   pair = response.json()\n   ```\n\n2. **Retrieve all clinical annotations**:\n   ```python\n   response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FclinicalAnnotation\",\n                          params={\"gene\": \"TPMT\", \"drug\": \"azathioprine\"})\n   annotations = response.json()\n   ```\n\n3. **Filter by evidence level and publication date**:\n   ```python\n   high_quality = [a for a in annotations\n                   if a['evidenceLevel'] in ['1A', '1B', '2A']]\n   ```\n\n4. **Extract PMIDs** and retrieve full references:\n   ```python\n   pmids = [a['pmid'] for a in high_quality if 'pmid' in a]\n   # Use PubMed skill to retrieve full citations\n   ```\n\n## Rate Limiting and Best Practices\n\n### Rate Limit Compliance\n\n```python\nimport time\n\ndef rate_limited_request(url, params=None, delay=0.5):\n    \"\"\"Make API request with rate limiting (2 req\u002Fsec max)\"\"\"\n    response = requests.get(url, params=params)\n    time.sleep(delay)  # Wait 0.5 seconds between requests\n    return response\n\n# Use in loops\ngenes = [\"CYP2D6\", \"CYP2C19\", \"CYP2C9\"]\nfor gene in genes:\n    response = rate_limited_request(\n        \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002F\" + gene\n    )\n    data = response.json()\n```\n\n### Error Handling\n\n```python\ndef safe_api_call(url, params=None, max_retries=3):\n    \"\"\"API call with error handling and retries\"\"\"\n    for attempt in range(max_retries):\n        try:\n            response = requests.get(url, params=params, timeout=10)\n\n            if response.status_code == 200:\n                return response.json()\n            elif response.status_code == 429:\n                # Rate limit exceeded\n                wait_time = 2 ** attempt  # Exponential backoff\n                print(f\"Rate limit hit. Waiting {wait_time}s...\")\n                time.sleep(wait_time)\n            else:\n                response.raise_for_status()\n\n        except requests.exceptions.RequestException as e:\n            print(f\"Attempt {attempt + 1} failed: {e}\")\n            if attempt == max_retries - 1:\n                raise\n            time.sleep(1)\n```\n\n### Caching Results\n\n```python\nimport json\nfrom pathlib import Path\n\ndef cached_query(cache_file, api_func, *args, **kwargs):\n    \"\"\"Cache API results to avoid repeated queries\"\"\"\n    cache_path = Path(cache_file)\n\n    if cache_path.exists():\n        with open(cache_path) as f:\n            return json.load(f)\n\n    result = api_func(*args, **kwargs)\n\n    with open(cache_path, 'w') as f:\n        json.dump(result, f, indent=2)\n\n    return result\n\n# Usage\ngene_data = cached_query(\n    'cyp2d6_cache.json',\n    rate_limited_request,\n    \"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002Fgene\u002FCYP2D6\"\n)\n```\n\n## PharmDOG Tool\n\nPharmDOG (formerly DDRx) is ClinPGx's clinical decision support tool for interpreting pharmacogenomic test results:\n\n**Key features**:\n- **Phenoconversion calculator**: Adjusts phenotype predictions for drug-drug interactions affecting CYP2D6\n- **Custom genotypes**: Input patient genotypes to get phenotype predictions\n- **QR code sharing**: Generate shareable patient reports\n- **Flexible guidance sources**: Select which guidelines to apply (CPIC, DPWG, FDA)\n- **Multi-drug analysis**: Assess multiple medications simultaneously\n\n**Access**: Available at https:\u002F\u002Fwww.clinpgx.org\u002Fpharmacogenomic-decision-support\n\n**Use cases**:\n- Clinical interpretation of PGx panel results\n- Medication review for patients with known genotypes\n- Patient education materials\n- Point-of-care decision support\n\n## Resources\n\n### scripts\u002Fquery_clinpgx.py\n\nPython script with ready-to-use functions for common ClinPGx queries:\n\n- `get_gene_info(gene_symbol)` - Retrieve gene details\n- `get_drug_info(drug_name)` - Get drug information\n- `get_gene_drug_pairs(gene, drug)` - Query gene-drug interactions\n- `get_cpic_guidelines(gene, drug)` - Retrieve CPIC guidelines\n- `get_alleles(gene)` - Get all alleles for a gene\n- `get_clinical_annotations(gene, drug, evidence_level)` - Query literature annotations\n- `get_drug_labels(drug)` - Retrieve pharmacogenomic drug labels\n- `search_variants(rsid)` - Search by variant rsID\n- `export_to_dataframe(data)` - Convert results to pandas DataFrame\n\nConsult this script for implementation examples with proper rate limiting and error handling.\n\n### references\u002Fapi_reference.md\n\nComprehensive API documentation including:\n\n- Complete endpoint listing with parameters\n- Request\u002Fresponse format specifications\n- Example queries for each endpoint\n- Filter operators and search patterns\n- Data schema definitions\n- Rate limiting details\n- Authentication requirements (if any)\n- Troubleshooting common errors\n\nRefer to this document when detailed API information is needed or when constructing complex queries.\n\n## Important Notes\n\n### Data Sources and Integration\n\nClinPGx consolidates multiple authoritative sources:\n- **PharmGKB**: Curated pharmacogenomics knowledge base (now part of ClinPGx)\n- **CPIC**: Evidence-based clinical implementation guidelines\n- **PharmCAT**: Allele calling and phenotype interpretation tool\n- **DPWG**: Dutch pharmacogenetics guidelines\n- **FDA\u002FEMA labels**: Regulatory pharmacogenomic information\n\nAs of July 2025, all PharmGKB URLs redirect to corresponding ClinPGx pages.\n\n### Clinical Implementation Considerations\n\n- **Evidence levels**: Always check evidence strength before clinical application\n- **Population differences**: Allele frequencies vary significantly across populations\n- **Phenoconversion**: Consider drug-drug interactions that affect enzyme activity\n- **Multi-gene effects**: Some drugs affected by multiple pharmacogenes\n- **Non-genetic factors**: Age, organ function, drug interactions also affect response\n- **Testing limitations**: Not all clinically relevant alleles detected by all assays\n\n### Data Updates\n\n- ClinPGx continuously updates with new evidence and guidelines\n- Check publication dates for clinical annotations\n- Monitor ClinPGx Blog (https:\u002F\u002Fblog.clinpgx.org\u002F) for announcements\n- CPIC guidelines updated as new evidence emerges\n- PharmVar provides nomenclature updates for allele definitions\n\n### API Stability\n\n- API endpoints are relatively stable but may change during development\n- Parameters and response formats subject to modification\n- Monitor API changelog and ClinPGx blog for updates\n- Consider version pinning for production applications\n- Test API changes in development before production deployment\n\n## Common Use Cases\n\n### Pre-emptive Pharmacogenomic Testing\n\nQuery all clinically actionable gene-drug pairs to guide panel selection:\n\n```python\n# Get all CPIC guideline pairs\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"cpicLevel\": \"A\"})  # Level A recommendations\nactionable_pairs = response.json()\n```\n\n### Medication Therapy Management\n\nReview patient medications against known genotypes:\n\n```python\npatient_genes = {\"CYP2C19\": \"*1\u002F*2\", \"CYP2D6\": \"*1\u002F*1\", \"SLCO1B1\": \"*1\u002F*5\"}\nmedications = [\"clopidogrel\", \"simvastatin\", \"escitalopram\"]\n\nfor med in medications:\n    for gene in patient_genes:\n        response = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                               params={\"gene\": gene, \"drug\": med})\n        # Check for interactions and dosing guidance\n```\n\n### Clinical Trial Eligibility\n\nScreen for pharmacogenomic contraindications:\n\n```python\n# Check for HLA-B*57:01 before abacavir trial\nresponse = requests.get(\"https:\u002F\u002Fapi.clinpgx.org\u002Fv1\u002FgeneDrugPair\",\n                       params={\"gene\": \"HLA-B\", \"drug\": \"abacavir\"})\npair_info = response.json()\n# CPIC: Do not use if HLA-B*57:01 positive\n```\n\n## Additional Resources\n\n- **ClinPGx website**: https:\u002F\u002Fwww.clinpgx.org\u002F\n- **ClinPGx Blog**: https:\u002F\u002Fblog.clinpgx.org\u002F\n- **API documentation**: https:\u002F\u002Fapi.clinpgx.org\u002F\n- **CPIC website**: https:\u002F\u002Fcpicpgx.org\u002F\n- **PharmCAT**: https:\u002F\u002Fpharmcat.clinpgx.org\u002F\n- **ClinGen**: https:\u002F\u002Fclinicalgenome.org\u002F\n- **Contact**: api@clinpgx.org (for substantial API use)\n",{"name":5,"description":7},"main","34fa6acf794b9a6310d298cbb8fb8c9420a5edcf","cli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fclinpgx-database",2,"https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates","https:\u002F\u002Fgithub.com\u002Ftransaurus","Automated works of Page Turner","2026-03-28 10:12:59",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill clinpgx-database",{"tool":60,"command":61},"bunx","bunx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill clinpgx-database",{"tool":63,"command":64},"pnpm","pnpm dlx skills add transaurus\u002Fstaging-davila7-claude-code-templates --skill clinpgx-database","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fclinpgx-database\u002FSKILL.md",true,[68,74],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fapi_reference.md","REFERENCE","参考文档",17360,"https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fclinpgx-database\u002Freferences\u002Fapi_reference.md",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fquery_clinpgx.py","SCRIPT","脚本",14295,"https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fclinpgx-database\u002Fscripts\u002Fquery_clinpgx.py",[81,110,131,155,175,199],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":90,"publishedAt":41},"01M6JMRJR3BE0HGWFWDZSB853S","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fzapier-make-patterns\u002FSKILL.md",[87],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,39,109],"zapier make patterns","patterns","make","zapier","writing","workflow","automation","code","integrations","business","use","power","complexity","platform","apps","how to","No-Code","which","spawner",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":41},"01M6JMR8YK6SWPCTG1MCQTMN9S","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FSKILL.md",[],[112,117,118,119,120,121,122,123,124,125,126,127,101,128,129,130],"cli","github","commit","pull request","openai","pull","push","flow","open","gh","user","only","stage","github cli",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":138,"publishedAt":41},"01M6JMQNFE64ZASQK90HARRXW8","workflow-automation","Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off.  This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation.  Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fworkflow-automation\u002FSKILL.md",[137],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},[96,97,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,39,109],"Workflow Automation","ai agents","accessibility","workflows","apache","execution","inngest","parallel","orchestrator","resume","n8n","payment","worker","scripts","temporal","with",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":41},"01M6JMQDYJ0XETERPHGDR3EVGN","trigger-dev","Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Ftrigger-dev\u002FSKILL.md",[],[162,163,164,165,166,142,167,143,144,168,101,169,170,171,172,173,174,154,39,109],"dev","trigger dev","trigger","design","typescript","async execution","first","async","developer experience","expert","task","background jobs","long",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":182,"publishedAt":41},"01M6JMQ5J6KK3GSX9FJCWWK6G6","planning-with-files","Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fplanning-with-files\u002FSKILL.md",[181],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[183,184,185,154,186,96,187,188,189,190,191,192,101,193,194,195,196,197,198,39],"planning with files","planning","files","with files","storage","tasks","markdown","knowledge","projects","work","manus","structured output","progress","transforms","multi","output",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":207,"publishedAt":41},"01M6JMPWAT60RXXNEC4V9TRBRS","n8n-workflow-patterns","Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.","https:\u002F\u002Fgithub.com\u002Ftransaurus\u002Fstaging-davila7-claude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-workflow-patterns\u002FSKILL.md",[205,206],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},[96,208,149,209,92,210,211,142,212,188,184,27,213,214,215,216,217,218,219,220],"n8n workflow patterns","workflow patterns","n8n workflow","ai agent","architecture","api","planning workflow","structure","database operations","webhook","processing","http api","scheduled"]