primekg
Skill by K-Dense-AI
Queries a pinned PrimeKG knowledge graph CSV for typed gene, drug, disease and phenotype associations. Built for reproducible biological lookup and hypothesis generation with provenance kept.
Install primekg
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/primekg ~/.claude/skills/primekgRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/primekg ~/.gemini/antigravity-cli/skills/primekgAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill queries a pinned Precision Medicine Knowledge Graph (PrimeKG) CSV. It resolves typed gene, drug, disease, and phenotype nodes, retrieves direct associations, summarizes disease context, and finds one- or two-hop undirected association paths. Nodes are identified by ID, type, and source, and reverse rows are consolidated while the original rows are kept.
It is meant for PrimeKG reproducibility, biological association lookup, and hypothesis generation, with relation and data provenance preserved. The source says paths support research hypotheses only, not causality, treatment efficacy, prescribing, or diagnosis. The helper reads the whole CSV for each query and needs Python 3.11+, pandas, and several GB of available RAM.
Written from the project's SKILL.md and checked against it.
What it can do
- search_nodesSearches PrimeKG nodes by literal, case-insensitive name, optionally filtered by node type.
- get_neighborsReturns direct associations for a node, consolidating reverse rows and keeping original evidence rows.
- get_disease_contextSummarizes a disease's genes, drugs, phenotypes, and related diseases, separating drug relation types.
- find_pathsEnumerates simple one- and two-hop undirected association paths between two nodes.
What you need
- Python 3.11+
- pandas
- A downloaded PrimeKG kg.csv file
- Several GB of available RAM
Try asking
- Search PrimeKG for Alzheimer disease nodes and list the candidates
- Show genes and drugs associated with a given disease in PrimeKG
- Find one- or two-hop association paths between two PrimeKG nodes
Good to know
- Reads the whole CSV for each query and is not a bounded-memory graph engine.
- Paths support hypotheses only, not causality, efficacy, or prescribing decisions.
- Does not retrieve clinical text, publications, confidence scores, or current approval status.
- Upstream PrimeKG now recommends OptimusKG for new work; this helper is not an OptimusKG client.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/primekg/SKILL.md, skills/primekg/scripts/query_primekg.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB -
references/data-contract.md7 KB -
scripts/query_primekg.py10 KB
Alternatives to primekg
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
primekg: common questions
What does the PrimeKG skill query?
It queries a pinned PrimeKG CSV file with typed gene, drug, disease, and phenotype nodes, their associations, and short paths between them.
Does it need network access?
The source says network access is needed only to obtain public metadata and data. Local queries need a downloaded PrimeKG CSV.
What license applies?
The skill frontmatter lists the license as Unknown. The Dataverse record declares CC0 1.0 for the dataset, and upstream construction code is MIT.
How do I install primekg?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is primekg free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is primekg safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to primekg?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
