Agent skill

Knowledge Graph Tools

by DrugClaw in DrugClaw/DrugClaw

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…

Apache-2.0Auto-check passedKnowledge Management

Install Knowledge Graph Tools

skills CLI
$ npx skills add DrugClaw/DrugClaw --skill knowledge-graph-tools -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DrugClaw/DrugClaw knowledge-graph-tools --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DrugClaw/DrugClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/science/knowledge-graph-tools .claude/skills/knowledge-graph-tools && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
knowledge-graph-tools
GitHub stars
125
Token cost
~1.7k tokens
SKILL.md length
558 words
Files
2
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

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…

  • Works in 6 steps: Every node gets a typed label: drug,… → Every edge records its source database… → Use canonical identifiers: Ensembl for… → …
  • The user asks to build
  • SKILL.md covers Working Rules, Environment Check, Bundled Assets and Build: Disease-Centric Graph, plus 7 more sections
  • Runs Python scripts from its folder; calls python3; reaches reactome.org and api.platform.opentargets.org

What it does

Knowledge Graph Tools is an agent skill from DrugClaw/DrugClaw. 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.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `template/knowledge_graph.py`).

It sits in Knowledge Management, covering Knowledge graphs, Drug discovery and cheminformatics and GraphQL. It works with NetworkX and GraphQL. The repository describes itself as: 💊 AI Research Assistant for Accelerated Drug Discovery. 🦞. The licence is Apache-2.0.

When your agent uses it

  • The user asks to build
  • Visualize a biomedical knowledge graph connecting drugs
  • Pathways from real public databases without making clinical claims

Example prompts

  • “/knowledge-graph-tools”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Every node gets a typed label: drug, target, disease, or pathway.
  2. Every edge records its source database and, where available, an evidence score.
  3. Use canonical identifiers: Ensembl for targets, ChEMBL for drugs, EFO for diseases, Reactome stable IDs for pathways.
  4. Hub analysis reflects database connectivity, not biological importance; well-studied proteins dominate.
  5. Shortest-path hypotheses are topological leads, not validated biology.
  6. Do not claim causal or therapeutic conclusions from graph structure alone.

What it can do on your machine

Read from SKILL.md and the folder at commit 960a6e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • reactome.org
    • api.platform.opentargets.org
    • ebi.ac.uk
    • version-12-0.string-db.org

    Also links to:

    • platform.opentargets.org
    • chembl.gitbook.io
    • string-db.org
    • networkx.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Knowledge Graph Tools loads about 1.7k tokens when it runs. Until then it costs about 123 tokens; SKILL.md has 558 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~123
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DrugClaw/DrugClaw at commit 960a6e0, republished under its Apache-2.0 licence (© DrugClaw). 558 words, ~1,672 tokens.

Download SKILL.mdSave it as .claude/skills/knowledge-graph-tools/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
knowledge-graph-tools
description
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.

Knowledge Graph Tools

Use this skill for building and querying biomedical relationship graphs from public drug-discovery APIs, not for clinical decision-making.

Typical triggers:

  • build a knowledge graph seeded from a disease, a drug, or a target list
  • find shortest paths from a drug to a disease through intermediate targets and pathways
  • identify hub targets that bridge multiple disease areas or drug mechanisms
  • expand the neighborhood around a protein to see connected drugs, diseases, and pathways
  • merge OpenTargets, ChEMBL, STRING, and Reactome data into one queryable graph

Working Rules

  1. Every node gets a typed label: drug, target, disease, or pathway.
  2. Every edge records its source database and, where available, an evidence score.
  3. Use canonical identifiers: Ensembl for targets, ChEMBL for drugs, EFO for diseases, Reactome stable IDs for pathways.
  4. Hub analysis reflects database connectivity, not biological importance; well-studied proteins dominate.
  5. Shortest-path hypotheses are topological leads, not validated biology.
  6. Do not claim causal or therapeutic conclusions from graph structure alone.

Environment Check

bash
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.

Bundled Assets

  • templates/knowledge_graph.py

Build: Disease-Centric Graph

Use templates/knowledge_graph.py --mode build --seed-type disease for:

  • fetching disease-associated targets from OpenTargets
  • fetching known drugs for those targets from OpenTargets
  • adding protein-protein interactions from STRING
  • adding pathway membership from Reactome
  • assembling typed nodes and edges into a single graph

Quick start:

bash
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:

  • GraphML file with typed nodes (entity_type) and typed edges (relation, source_db, score)
  • summary JSON with node/edge counts by type, top hubs, and data sources queried

Build: Drug-Centric Graph

Use --seed-type drug to start from a drug and expand through its targets:

bash
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

Query: Shortest Path

Use --mode query --query-type shortest-path on an existing GraphML file:

bash
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:

  • summary JSON with path length, node sequence, and edge relations for each step

Query: Hub Analysis

Use --mode query --query-type hubs:

bash
python3 templates/knowledge_graph.py \
  --mode query \
  --input kg/crohn_graph.graphml \
  --query-type hubs \
  --top-k 20 \
  --summary kg/hub_targets.json

Deliverables:

  • summary JSON with top-K nodes ranked by degree and betweenness centrality, with entity type
Show full SKILL.md (229 more words)Show less

Query: Neighborhood Expansion

Use --mode query --query-type neighbors:

bash
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:

  • summary JSON with subgraph node list, edge list, and entity-type breakdown

Output Expectations

Good answers should mention:

  • seed entity and type (drug, disease, or target list)
  • which APIs were queried (OpenTargets, ChEMBL, STRING, Reactome)
  • graph size: node count by type, edge count by relation type
  • for hub queries: top hub identifiers, degrees, and entity types
  • for path queries: full path with intermediate nodes and edge types
  • identifier schemes used
  • where GraphML and JSON were saved

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.

Reference

This skill queries the following public APIs during build mode:

  • OpenTargets Platform GraphQL — https://api.platform.opentargets.org/api/v4/graphql — disease-target associations (associatedTargets), known drugs (knownDrugs), and entity search (platform.opentargets.org)
  • ChEMBL REST API — https://www.ebi.ac.uk/chembl/api/data — molecule search, mechanism-of-action retrieval, and target cross-references (chembl.gitbook.io)
  • STRING API v12 — https://version-12-0.string-db.org/api — protein-protein interaction partners with combined confidence scores (string-db.org)
  • Reactome Content Service — https://reactome.org/ContentService — pathway search by gene symbol with species filter (reactome.org)
  • Graph analysis uses networkx — nx.shortest_path, nx.betweenness_centrality, nx.ego_graph (networkx.org)
  • The target-intelligence-tools skill in this repository served as the reference implementation for API calling patterns, error handling, and identifier resolution.

© DrugClaw, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/science/knowledge-graph-tools of DrugClaw/DrugClaw.

  • SKILL.md
  • template/knowledge_graph.py

Open the folder on GitHubat commit 960a6e0

Compare with similar skills

Knowledge Graph Tools next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Knowledge Graph Tools compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knowledge Graph Tools this skillDrugClaw/DrugClaw125—~1.7kAutomated safety check: PassApache-2.0
Opentargets Databasejaechang-hits/SciAgent-Skills3701 repos~5.1kAutomated safety check: PassApache-2.0
Pdb Databasejaechang-hits/SciAgent-Skills3701 repos~7.7kAutomated safety check: PassBSD-3-Clause
Chebi QueryQSong-github/DrugClaw1161 repos~773Automated safety check: PassNone
Torchdrugdavila7/claude-code-templates32k12 repos~3.5kAutomated safety check: PassMIT
TorchdrugK-Dense-AI/scientific-agent-skills48k1 repos~3kAutomated safety check: NotesApache-2.0

Similar skills

  • Opentargets Database

    jaechang-hits/SciAgent-Skills

    Query Open Targets GraphQL API for target-disease associations, evidence, drug links, safety.

    370 GitHub starsUsed in 1 repo~5.1k tokens
    Research & ScienceAuto-check passed
  • Pdb Database

    jaechang-hits/SciAgent-Skills

    Query RCSB PDB (200K+ structures) via the public REST + GraphQL APIs with plain requests (no SDK).

    370 GitHub starsUsed in 1 repo~7.7k tokens
    Research & ScienceAuto-check passed
  • Chebi Query

    QSong-github/DrugClaw

    Query the ChEBI (Chemical Entities of Biological Interest) database.

    116 GitHub starsUsed in 1 repo~773 tokens
    Knowledge ManagementAuto-check passed
  • Torchdrug

    davila7/claude-code-templates

    Graph-based drug discovery toolkit. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Research & ScienceAuto-check passed
  • Torchdrug

    K-Dense-AI/scientific-agent-skills

    Builds and troubleshoots TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and…

    48k GitHub starsUsed in 1 repo~3k tokens
    Research & ScienceAuto-check: notes
  • Torchdrug English

    aipoch/medical-research-skills

    PyTorch-native Graph Neural Network framework for molecules and proteins.

    2k GitHub stars~2.6k tokensUpdated 20 days ago
    Research & ScienceAuto-check passed

More from DrugClaw/DrugClaw

All 25 skills in this repo
  • Bio DB Tools

    DrugClaw/DrugClaw

    Query public biology databases and APIs including UniProt, RCSB PDB, AlphaFold DB, ClinVar, dbSNP, gnomAD, Ensembl, GEO, InterPro, KEGG, OpenTargets, Reactome, and STRING.

    125 GitHub stars~1.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Grn Tools

    DrugClaw/DrugClaw

    Gene regulatory network workflow guide for transcriptomics and single-cell expression matrices using Arboreto, GRNBoost2, and GENIE3.

    125 GitHub stars~692 tokensUpdated 6 mo ago
    Auto-check passed
  • Literature Review Tools

    DrugClaw/DrugClaw

    Research-literature workflow guide for evidence-matrix assembly, citation-table normalization, structured review synthesis, and research-gap mapping.

    125 GitHub stars~923 tokensUpdated 6 mo ago
    Auto-check passed
  • Medical Data Tools

    DrugClaw/DrugClaw

    Medical data workflow guide for DICOM metadata inspection and basic de-identification, physiological signal analysis with NeuroKit2, and cohort-table profiling for clinical research datasets.

    125 GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Omics Tools

    DrugClaw/DrugClaw

    Omics and single-cell workflow guide for AnnData, Scanpy-style dataset profiling, PyDESeq2-oriented count checks, pysam alignment inspection, and pyOpenMS mass-spectrometry summaries.

    125 GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • Patent Landscape Tools

    DrugClaw/DrugClaw

    Drug-patent landscape workflow guide for searching US patents via the PatentsView API, classifying pharmaceutical claim types (NCE, formulation, method-of-use, polymorph, combination, biologic…

    125 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed

Works with

Questions about Knowledge Graph Tools

What does Knowledge Graph Tools do?

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…. Knowledge Graph Tools is an agent skill from DrugClaw/DrugClaw. 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.

When should I use Knowledge Graph Tools?

Knowledge Graph Tools fits situations like: the user asks to build; visualize a biomedical knowledge graph connecting drugs; pathways from real public databases without making clinical claims.

How do I install Knowledge Graph Tools in Claude Code?

Run `npx skills add DrugClaw/DrugClaw --skill knowledge-graph-tools -a claude-code`. Or copy the skill folder (skills/science/knowledge-graph-tools in DrugClaw/DrugClaw) into .claude/skills/knowledge-graph-tools in your project. Claude Code loads it when a task matches its description.

How do I install Knowledge Graph Tools in Codex?

Run `npx skills add DrugClaw/DrugClaw --skill knowledge-graph-tools -a codex`. Or copy the skill folder (skills/science/knowledge-graph-tools in DrugClaw/DrugClaw) into .agents/skills/knowledge-graph-tools in your project. Codex loads it when a task matches its description.

Can I use Knowledge Graph Tools in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DrugClaw/DrugClaw --skill knowledge-graph-tools -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-graph-tools, .gemini/skills/knowledge-graph-tools, .github/skills/knowledge-graph-tools and .opencode/skills/knowledge-graph-tools in your project.

What does Knowledge Graph Tools need to run?

Going by SKILL.md and its folder, Knowledge Graph Tools needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Knowledge Graph Tools access the network?

SKILL.md names 8 domains. In commands or code: reactome.org, api.platform.opentargets.org, ebi.ac.uk and version-12-0.string-db.org; the agent is likely to contact these when it follows the instructions. As links in the text: platform.opentargets.org, chembl.gitbook.io, string-db.org and networkx.org. This is read from the text; nothing was executed.

Is Knowledge Graph Tools safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Knowledge Graph Tools use?

Knowledge Graph Tools is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Knowledge Graph Tools use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Knowledge Graph Tools?

Skills that share tags, products or a category with Knowledge Graph Tools: Opentargets Database (jaechang-hits/SciAgent-Skills, 370 stars), Pdb Database (jaechang-hits/SciAgent-Skills, 370 stars), Chebi Query (QSong-github/DrugClaw, 116 stars) and Torchdrug (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knowledge Graph Tools?

DrugClaw (a GitHub organization) maintains it in DrugClaw/DrugClaw, which has 125 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on March 23, 2026.

Source: DrugClaw/DrugClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.