agentsclimarketplace

Database lookup

Skill itallstartedwithaidea/agent-skills/skills/scientific-research/database-lookup

The definitive open-source agent skills library for AI-powered Google Ads management. 73+ skills across 10 categories. Built for googleadsagent.ai™. Works with Claude Code, Cursor, Codex, Gemini, and more.

Install
npx -y skills add itallstartedwithaidea/agent-skills --skill database-lookup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Database Lookup provides unified programmatic access to 78+ scientific and public databases spanning chemistry (PubChem, ChEMBL), biology (UniProt, COSMIC, Ensembl), clinical (ClinicalTrials.gov, FDA), economics (FRED, World Bank), and intellectual property (USPTO, EPO).

SKILL.md

6.6 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it

Database Lookup

Part of Agent Skills™ by googleadsagent.ai™

Description

Database Lookup provides unified programmatic access to 78+ scientific and public databases spanning chemistry (PubChem, ChEMBL), biology (UniProt, COSMIC, Ensembl), clinical (ClinicalTrials.gov, FDA), economics (FRED, World Bank), and intellectual property (USPTO, EPO). The agent constructs API queries, handles pagination, normalizes responses, and caches results for reproducible research workflows.

Scientific research increasingly depends on integrating data from multiple heterogeneous databases. A drug discovery project might query ChEMBL for bioactivity data, UniProt for target protein information, PubChem for compound properties, ClinicalTrials.gov for related clinical studies, and FRED for healthcare spending trends—all for a single research question. This skill abstracts the API differences into a unified query interface.

Each database connector handles authentication, rate limiting, response parsing, and error recovery. Results are normalized into consistent schemas (DataFrames with typed columns) regardless of the source API's format (REST JSON, XML, CSV, SPARQL). Caching prevents redundant API calls and enables offline analysis of previously retrieved data.

Use When

  • Retrieving compound data from PubChem or ChEMBL
  • Querying protein sequences or annotations from UniProt
  • Searching clinical trials on ClinicalTrials.gov
  • Fetching economic indicators from FRED or World Bank
  • Looking up patent information from USPTO
  • Integrating data across multiple scientific databases

How It Works

graph TD
    A[Research Query] --> B[Query Router]
    B --> C{Database Selection}
    C -->|Chemistry| D[PubChem / ChEMBL / DrugBank]
    C -->|Biology| E[UniProt / Ensembl / COSMIC]
    C -->|Clinical| F[ClinicalTrials.gov / FDA / OMIM]
    C -->|Economics| G[FRED / World Bank / BLS]
    C -->|Patents| H[USPTO / EPO / WIPO]
    D --> I[API Request + Rate Limiting]
    E --> I
    F --> I
    G --> I
    H --> I
    I --> J[Response Normalization]
    J --> K[Cache Layer]
    K --> L[Unified DataFrame Output]

The query router identifies the appropriate database based on the query type and entity. All responses pass through normalization to produce consistent DataFrames with standardized column names and types.

Implementation

import requests
import pandas as pd
from functools import lru_cache
from time import sleep

class DatabaseClient:
    BASE_URLS = {
        "pubchem": "https://pubchem.ncbi.nlm.nih.gov/rest/pug",
        "chembl": "https://www.ebi.ac.uk/chembl/api/data",
        "uniprot": "https://rest.uniprot.org/uniprotkb",
        "clinicaltrials": "https://clinicaltrials.gov/api/v2/studies",
        "fred": "https://api.stlouisfed.org/fred/series/observations",
    }

    def __init__(self, cache_dir: str = ".db_cache"):
        self.session = requests.Session()
        self.session.headers["User-Agent"] = "AgentSkills/1.0 (research)"

    def pubchem_compound(self, name: str) -> dict:
        url = f"{self.BASE_URLS['pubchem']}/compound/name/{name}/JSON"
        resp = self._get(url)
        props = resp["PC_Compounds"][0]["props"]
        return {
            "cid": resp["PC_Compounds"][0]["id"]["id"]["cid"],
            "name": name,
            "properties": {p["urn"]["label"]: p["value"] for p in props},
        }

    def chembl_target(self, uniprot_id: str) -> pd.DataFrame:
        url = f"{self.BASE_URLS['chembl']}/target.json"
        resp = self._get(url, params={
            "target_components__accession": uniprot_id,
            "limit": 100,
        })
        return pd.json_normalize(resp["targets"])

    def uniprot_search(self, query: str, limit: int = 25) -> pd.DataFrame:
        url = f"{self.BASE_URLS['uniprot']}/search"
        resp = self._get(url, params={
            "query": query,
            "format": "json",
            "size": limit,
            "fields": "accession,id,protein_name,organism_name,length,sequence",
        })
        return pd.json_normalize(resp["results"])

    def clinical_trials(self, condition: str, status: str = "RECRUITING") -> pd.DataFrame:
        url = self.BASE_URLS["clinicaltrials"]
        resp = self._get(url, params={
            "query.cond": condition,
            "filter.overallStatus": status,
            "pageSize": 50,
        })
        return pd.json_normalize(resp["studies"])

    def fred_series(self, series_id: str, api_key: str) -> pd.DataFrame:
        url = self.BASE_URLS["fred"]
        resp = self._get(url, params={
            "series_id": series_id,
            "api_key": api_key,
            "file_type": "json",
        })
        df = pd.DataFrame(resp["observations"])
        df["value"] = pd.to_numeric(df["value"], errors="coerce")
        df["date"] = pd.to_datetime(df["date"])
        return df

    def _get(self, url: str, params: dict = None) -> dict:
        sleep(0.25)
        resp = self.session.get(url, params=params, timeout=30)
        resp.raise_for_status()
        return resp.json()

Best Practices

  • Respect rate limits: 5 req/s for PubChem, 1 req/s for ChEMBL, 3 req/s for UniProt
  • Cache all API responses locally to enable offline analysis and reduce server load
  • Normalize identifiers (CID, ChEMBL ID, UniProt accession) before cross-database joins
  • Handle pagination for large result sets—never assume all results fit in one response
  • Log every API query for reproducibility, including timestamp and response hash
  • Set a User-Agent header identifying your tool and contact information

Platform Compatibility

PlatformSupportNotes
CursorFullPython + HTTP client
VS CodeFullREST client integration
WindsurfFullAPI query support
Claude CodeFullDatabase query generation
ClineFullAPI integration
aiderPartialCode-level support

Related Skills

Keywords

database-lookup pubchem chembl uniprot clinical-trials fred scientific-databases api-integration data-retrieval


© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License

Gives 0 of the 12 instructions most databases sql skills give in ~1.6k tokens

Counted across 589 of the 662 authors here whose files we hold, read 2026-08-06

  • use parameterized queriesin 36 of 589, across 32 files
  • use timestamptz for timestampsin 30 of 589, across 12 files
  • create indexes concurrentlyin 29 of 589, across 23 files
  • index foreign keysin 28 of 589, across 17 files
  • use numeric type for moneyin 25 of 589, across 8 files
  • select only required columnsin 24 of 589, across 19 files
  • use cursor pagination instead of OFFSETin 23 of 589, across 15 files
  • add indexes manually on foreign key columnsin 22 of 589, across 11 files
  • read individual rule files for detailed explanationsin 18 of 589, across 4 files
  • configure connection poolingin 18 of 589, across 16 files
  • put equality columns before range columns in indexesin 17 of 589, across 9 files
  • normalize to third normal formin 17 of 589, across 8 files

Said here and by no other author read

  • construct api queries
  • handle api authentication
  • enforce api rate limits
  • cache api responses locally
  • normalize identifiers before cross-database joins
  • log every api query for reproducibility

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.