Query UniProt protein database. Use when user asks about protein sequences, functions, annotations, domains, or protein identifiers. Triggers on "uniprot", "protein function", "protein sequence", "gene product", "protein info".
npx skills add https://github.com/BioTender-max/awesome-bio-agent-skills --skill query-uniprot
Query the UniProt REST API for protein information.
import requests
import json
BASE_URL = "https://rest.uniprot.org"
# 1. Search by gene name (default: human, reviewed/Swiss-Prot)
def search_uniprot(gene_name, organism_id=9606, max_results=5):
url = f"{BASE_URL}/uniprotkb/search"
params = {
"query": f"gene_exact:{gene_name} AND organism_id:{organism_id} AND reviewed:true",
"format": "json",
"size": max_results,
"fields": "accession,id,gene_names,protein_name,organism_name,length,cc_function,ft_domain,sequence"
}
r = requests.get(url, params=params)
r.raise_for_status()
return r.json()
# 2. Get by accession ID
def get_uniprot_entry(accession):
url = f"{BASE_URL}/uniprotkb/{accession}.json"
r = requests.get(url)
r.raise_for_status()
return r.json()
# 3. Get FASTA sequence
def get_fasta(accession):
url = f"{BASE_URL}/uniprotkb/{accession}.fasta"
r = requests.get(url)
r.raise_for_status()
return r.text
# Example usage
data = search_uniprot("TP53")
for entry in data.get("results", []):
acc = entry["primaryAccession"]
name = entry.get("proteinDescription", {}).get("recommendedName", {}).get("fullName", {}).get("value", "N/A")
gene = entry.get("genes", [{}])[0].get("geneName", {}).get("value", "N/A")
length = entry.get("sequence", {}).get("length", "N/A")
# Extract function
functions = [c["texts"][0]["value"] for c in entry.get("comments", []) if c["commentType"] == "FUNCTION"]
func_text = functions[0][:200] if functions else "N/A"
print(f"Accession: {acc}")
print(f"Protein: {name}")
print(f"Gene: {gene}")
print(f"Length: {length} aa")
print(f"Function: {func_text}")
gene_exact:BRCA1 AND organism_id:9606keyword:kinase AND organism_id:9606cc_disease:cancer AND organism_id:9606go:apoptosis AND organism_id:9606Present: Accession, protein name, gene, organism, length, function summary, and UniProt link.
Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.
Access BRENDA enzyme database via SOAP API. Retrieve kinetic parameters (Km, kcat), reaction equations, organism data, and substrate-specific enzyme information for biochemical research and metabolic pathway analysis.
Access ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genotype-guided dosing decisions.
Query NCBI ClinVar for variant clinical significance. Search by gene/position, interpret pathogenicity classifications, access via E-utilities API or FTP, annotate VCFs, for genomic medicine.
Access COSMIC cancer mutation database. Query somatic mutations, Cancer Gene Census, mutational signatures, gene fusions, for cancer research and precision oncology. Requires authentication.
Query Ensembl genome database REST API for 250+ species. Gene lookups, sequence retrieval, variant analysis, comparative genomics, orthologs, VEP predictions, for genomic research.
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
Query NCBI Gene via E-utilities/Datasets API. Search by symbol/ID, retrieve gene info (RefSeqs, GO, locations, phenotypes), batch lookups, for gene annotation and functional analysis.
Take biotender-max/query-uniprot from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.