Skip to content

PrimeKG Knowledge Graph Lookup

Query a pinned PrimeKG biomedical knowledge graph CSV for gene, drug, disease and phenotype links

Stars
55,780
Licence
MIT
Files
3 files

What it does

Once installed, the agent can look up biomedical entities (genes, drugs, diseases, phenotypes) in a local copy of the PrimeKG knowledge graph CSV and report the recorded associations between them, including short two-hop paths. It keeps relation labels, IDs and data provenance (DOI, file checksum, version) attached to results, and warns that a path supports a hypothesis only and is not proof of causality, efficacy, or a diagnosis. The helper script reads the CSV locally and does not send queries over the network.

Great for

  • Researchers reproducing analyses that use a specific PrimeKG release
  • Students exploring how diseases, genes and drugs are linked in a knowledge graph
  • Data users generating hypotheses that need traceable relation and source information

Skip it if

  • Clinical or prescribing decisions: the graph records associations, not treatment efficacy or diagnoses, and the skill says so explicitly
  • Machines with little RAM: the helper loads the whole multi-GB CSV into memory for each query
  • Users wanting the newer OptimusKG graph: upstream recommends it for new work and this skill only supports PrimeKG CSVs

Try asking

  • “Find genes and drugs associated with Alzheimer disease in PrimeKG and list the recorded relation types”
  • “Resolve the drug 'metformin' to its node ID in my pinned kg.csv and show its indications and contraindications”
  • “Show the one- and two-hop paths connecting a given gene to a phenotype, with provenance noted”
  • “Verify the checksum and metadata of my downloaded PrimeKG kg.csv before running any analysis”
Step-by-step guide: how to use PrimeKG Knowledge Graph LookupInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 3 original files, the MIT licence and an attribution note.

    primekg.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip primekg.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip primekg.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Download and checksum the pinned kg.csv yourself, then set PRIMEKG_DATA to its path before querying
  • Pick the intended node from search results and pass its type and source, since bare IDs are rejected when ambiguous
  • Record the DOI, version, file ID, checksum and retrieval date alongside every result

What's inside

  • references/data-contract.md
  • scripts/query_primekg.py
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.