skills/science/knowledge-graph-tools/SKILL.md
Drug-discovery knowledge-graph workflow guide for assembling drug-target-disease-pathway relationship graphs from OpenTargets GraphQL, ChEMBL REST, STRING PPI, and Reactome pathway APIs, then running hub detection, shortest-path queries, and neighborhood expansion with networkx. Use when the user asks to build, query, or visualize a biomedical knowledge graph connecting drugs, targets, diseases, and pathways from real public databases without making clinical claims.
npx skillsauth add drugclaw/drugclaw knowledge-graph-toolsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for building and querying biomedical relationship graphs from public drug-discovery APIs, not for clinical decision-making.
Typical triggers:
drug, target, disease, or pathway.which python3 || true
python3 - <<'PY'
mods = ["networkx", "requests"]
for name in mods:
try:
__import__(name)
print(f"{name}: ok")
except Exception as exc:
print(f"{name}: missing ({exc})")
PY
If networkx or requests is missing, say so immediately. If network access is blocked, only the query mode on pre-built GraphML files will work.
templates/knowledge_graph.pyUse templates/knowledge_graph.py --mode build --seed-type disease for:
Quick start:
python3 templates/knowledge_graph.py \
--mode build \
--seed-type disease \
--seed "Crohn's disease" \
--max-targets 30 \
--include-string \
--include-reactome \
--output kg/crohn_graph.graphml \
--summary kg/crohn_summary.json
Deliverables:
entity_type) and typed edges (relation, source_db, score)Use --seed-type drug to start from a drug and expand through its targets:
python3 templates/knowledge_graph.py \
--mode build \
--seed-type drug \
--seed "imatinib" \
--max-targets 20 \
--include-string \
--include-reactome \
--output kg/imatinib_graph.graphml \
--summary kg/imatinib_summary.json
Use --mode query --query-type shortest-path on an existing GraphML file:
python3 templates/knowledge_graph.py \
--mode query \
--input kg/crohn_graph.graphml \
--query-type shortest-path \
--from-node "CHEMBL941" \
--to-node "EFO_0000384" \
--summary kg/path_result.json
Deliverables:
Use --mode query --query-type hubs:
python3 templates/knowledge_graph.py \
--mode query \
--input kg/crohn_graph.graphml \
--query-type hubs \
--top-k 20 \
--summary kg/hub_targets.json
Deliverables:
Use --mode query --query-type neighbors:
python3 templates/knowledge_graph.py \
--mode query \
--input kg/crohn_graph.graphml \
--query-type neighbors \
--center-node "ENSG00000141510" \
--radius 2 \
--summary kg/tp53_neighborhood.json
Deliverables:
Good answers should mention:
For compound and regulatory database lookups from ChEMBL, openFDA, ClinicalTrials.gov, activate pharma-db-tools.
For target-specific intelligence dossiers, activate target-intelligence-tools.
For drug repurposing hypothesis generation, activate drug-repurposing-tools.
For pathway enrichment from gene lists, activate pathway-enrichment-tools.
For network pharmacology analysis, activate network-pharmacology-tools.
For raw bio database lookups in UniProt, PDB, ClinVar, gnomAD, Reactome, STRING, activate bio-db-tools.
This skill queries the following public APIs during build mode:
https://api.platform.opentargets.org/api/v4/graphql — disease-target associations (associatedTargets), known drugs (knownDrugs), and entity search (platform.opentargets.org)https://www.ebi.ac.uk/chembl/api/data — molecule search, mechanism-of-action retrieval, and target cross-references (chembl.gitbook.io)https://version-12-0.string-db.org/api — protein-protein interaction partners with combined confidence scores (string-db.org)https://reactome.org/ContentService — pathway search by gene symbol with species filter (reactome.org)nx.shortest_path, nx.betweenness_centrality, nx.ego_graph (networkx.org)target-intelligence-tools skill in this repository served as the reference implementation for API calling patterns, error handling, and identifier resolution.tools
Survival and time-to-event workflow guide for Kaplan-Meier summaries, log-rank tests, and Cox proportional hazards models with reproducible outputs. Use when the user asks for time-to-event analysis, censored data summaries, hazard ratios, or survival-group comparison for research datasets.
tools
Statistical modeling workflow guide for hypothesis tests, effect-size reporting, statsmodels regression, diagnostics, and structured result export. Use when the user asks for statistical test selection, OLS or logistic regression, coefficient tables, inference, or reproducible statistical summaries for scientific datasets.
tools
Research-method workflow guide for hypothesis framing, peer-review style critique, reproducibility planning, study-design checks, and scientific-writing structure. Use when the user asks for manuscript critique, research-gap framing, hypothesis generation, reproducibility checklists, or study-planning support that should stay on the research side rather than patient-care decisions.
tools
Scientific visualization workflow guide for publication-ready static figures with seaborn or matplotlib and interactive figures with Plotly. Use when the user asks for scientific plots, cohort or assay figures, publication graphics, dashboards, or reusable plotting scripts for research datasets.