scientific-skills/Evidence Insights/kegg-database/SKILL.md
Direct access to KEGG via the REST API for academic-only pathway/gene/compound/drug queries; use when you need precise HTTP-level control or targeted KEGG ID mapping.
npx skillsauth add aipoch/medical-research-skills kegg-databaseInstall 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.
Note: KEGG REST access is intended for academic use. Non-academic/commercial use may require a separate KEGG license.
kegg_info (database metadata)kegg_list (catalog listing)kegg_find (keyword/property search)kegg_get (entry retrieval; sequences/structures/images)kegg_conv (ID conversion)kegg_link (cross-database linking)kegg_ddi (drug–drug interactions)map00010, hsa00010hsa:10458cpd:C00002dr:D00001ec:1.1.1.1ko:K00001kegg_get: aaseq, ntseq, mol, kcf, image, kgml, json (some formats are single-entry only).>=3.9requests >=2.31.0"""
End-to-end example:
1) Find a human gene by keyword
2) Link the gene to pathways
3) Retrieve one pathway entry
4) Convert the gene ID to UniProt
"""
from scripts.kegg_api import kegg_find, kegg_link, kegg_get, kegg_conv
# 1) Search for a gene keyword in KEGG GENES
hits = kegg_find("genes", "p53")
print("FIND results (first lines):")
print("\n".join(hits.splitlines()[:5]), "\n")
# Choose a known KEGG gene ID for TP53 (human)
gene_id = "hsa:7157"
# 2) Link gene -> pathways
pathway_links = kegg_link("pathway", gene_id)
print("LINK gene -> pathways (first lines):")
print("\n".join(pathway_links.splitlines()[:5]), "\n")
# Parse the first pathway ID from the link output
# Typical line format: path:hsaXXXXX<TAB>hsa:7157
first_line = next((ln for ln in pathway_links.splitlines() if ln.strip()), None)
if not first_line:
raise RuntimeError("No pathways returned for the gene ID.")
path_id = first_line.split("\t")[0].replace("path:", "")
print("Selected pathway:", path_id, "\n")
# 3) Retrieve the pathway entry (flat text)
pathway_entry = kegg_get(path_id)
print("GET pathway entry (first 30 lines):")
print("\n".join(pathway_entry.splitlines()[:30]), "\n")
# 4) Convert KEGG gene ID -> UniProt
uniprot_map = kegg_conv("uniprot", gene_id)
print("CONV KEGG -> UniProt:")
print(uniprot_map)
This skill wraps KEGG REST endpoints into Python functions (see scripts/kegg_api.py):
kegg_info(database_or_org)
Retrieves database or organism metadata (release info, counts, etc.).
kegg_list(database, organism=None)
Lists entries in a database; optionally scoped to an organism (e.g., ("pathway", "hsa")).
Also supports listing explicit IDs (batch-style) when passed as a single string.
kegg_find(database, query, option=None)
Searches by keyword or by chemical properties. Common option values:
formula (exact match)exact_mass (range like 300-310)mol_weight (range)kegg_get(entry_ids, option=None)
Retrieves full entries or specific formats:
aaseq, ntseqmol, kcfimage (PNG), kgml (XML), json (Pathway JSON)Batching rules:
image, kgml, and json typically allow only 1 entry per request.kegg_conv(target_db, source)
Converts IDs between KEGG and external databases (e.g., uniprot, ncbi-geneid, pubchem, chebi).
Output is tab-delimited pairs: source_id<TAB>target_id.
kegg_link(target_db, source)
Cross-references entries across KEGG databases (e.g., gene → pathway, pathway → compound, gene → KO).
kegg_ddi(drug_ids)
Returns known drug–drug interactions for one or more KEGG drug IDs (up to typical batch limits).
image/kgml/json.400 (bad request / malformed parameters)404 (unknown database or entry ID)For detailed endpoint syntax, database lists, and species codes, consult:
references/kegg_reference.mdtools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.