Agent skill

Fda Database

by aipoch in aipoch/medical-research-skills

Query the openFDA API to retrieve FDA regulatory datasets (drugs, devices, adverse events, recalls, submissions, UNII) when you need programmatic safety/regulatory evidence for analysis or research.

MITAuto-check passedBackend & APIs

Install Fda Database

skills CLI
$ npx skills add aipoch/medical-research-skills --skill fda-database -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills fda-database --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'scientific-skills/Evidence Insight/fda-database' .claude/skills/fda-database && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fda-database
GitHub stars
2k
Token cost
~2k tokens
SKILL.md length
459 words
Files
22 (incl. scripts, references)
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

Query the openFDA API to retrieve FDA regulatory datasets (drugs, devices, adverse events, recalls, submissions, UNII) when you need programmatic safety/regulatory evidence for analysis or research.

  • Works in 3 steps: Set an API key (optional, recommended) → Run a complete script → Run the repository examples (if provided)
  • Backend & APIs work in your project
  • SKILL.md covers When to Use, Key Features, Dependencies and Example Usage, plus 1 more section
  • Calls python; needs FDA_API_KEY

What it does

Fda Database is an agent skill from aipoch/medical-research-skills. Query the openFDA API to retrieve FDA regulatory datasets (drugs, devices, adverse events, recalls, submissions, UNII) when you need programmatic safety/regulatory evidence for analysis or research.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts and reference files (for example `fda-database_audit_result_v1.json`, `fda_cache/1cf8286b186012b387cd775ea2e0cc6d.json` and `fda_cache/5c7c1e6be77f7a9025bf3c1cc4a027e2.json`).

It sits in Backend & APIs. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • Backend & APIs work in your project

Example prompts

  • “/fda-database”

Requirements

  • Python 3
  • A credential in FDA_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Set an API key (optional, recommended)
  2. Run a complete script
  3. Run the repository examples (if provided)

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • FDA_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fda Database loads about 2k tokens when it runs, and up to ~24k if it reads all its reference files. Until then it costs about 53 tokens; SKILL.md has 459 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~24k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 459 words, ~1,964 tokens.

Download SKILL.mdSave it as .claude/skills/fda-database/SKILL.md (or your agent's skills folder). This skill also uses 21 other files; get the full folder from GitHub.
name
fda-database
description
Query the openFDA API to retrieve FDA regulatory datasets (drugs, devices, adverse events, recalls, submissions, UNII) when you need programmatic safety/regulatory evidence for analysis or research.
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

When to Use

  1. Pharmacovigilance / safety signal screening when you need adverse event counts, common reactions, or serious-event rates for a drug.
  2. Medical device regulatory research when you need 510(k)/PMA context, device classification, UDI lookups, or device adverse events/recalls.
  3. Recall and enforcement monitoring when you need to track Class I/II/III recalls across drugs, devices, or foods.
  4. Substance identity resolution when you need UNII/CAS/name-based lookups and basic substance relationship/structure retrieval.
  5. Veterinary safety analysis when you need animal adverse events filtered by species/breed and product.

Key Features

  • Unified Python interface (FDAQuery) for multiple openFDA domains (drug, device, food, animalandveterinary, other).
  • Convenience helpers for common tasks:
    • Drug events, labels, recalls, shortages
    • Device events, classification, 510(k), PMA, UDI
    • Food events and recalls
    • Animal/veterinary adverse events
    • Substance (UNII/name) lookups
  • Supports openFDA query patterns:
    • Fielded search strings, date ranges, wildcards
    • Aggregations via count_by_field(...) (with .exact support)
    • Pagination via skip/limit and bulk retrieval via query_all(...)
  • Operational safeguards:
    • Optional API key support for higher daily limits
    • Built-in caching (TTL) and rate limiting (as implemented in scripts/fda_query.py)
    • Basic error handling patterns

Additional endpoint notes and query syntax are typically documented in: references/api_basics.md, references/drugs.md, references/devices.md, references/foods.md, references/animal_veterinary.md, references/other.md.

Dependencies

  • Python 3.9+
  • openFDA API access (public)
  • Optional: openFDA API key (recommended for higher daily quota)

Package-level dependencies (e.g., requests) are defined by the repository implementation in scripts/fda_query.py. If you maintain this skill, pin them in requirements.txt (for example, requests==2.31.0) to ensure reproducibility.

Example Usage

The following example is designed to be runnable in a repository that contains scripts/fda_query.py and the FDAQuery class.

bash
export FDA_API_KEY="your_key_here"
2) Run a complete script
python
import os
from datetime import datetime, timedelta

from scripts.fda_query import FDAQuery


def drug_safety_profile(fda: FDAQuery, drug_name: str):
    # Total adverse events (meta.total)
    events = fda.query_drug_events(drug_name, limit=1)
    total = events.get("meta", {}).get("results", {}).get("total", 0)

    # Top reactions (aggregation)
    reactions = fda.count_by_field(
        "drug",
        "event",
        search=f"patient.drug.medicinalproduct:*{drug_name}*",
        field="patient.reaction.reactionmeddrapt",
        exact=True,
    )
    top_reactions = reactions.get("results", [])[:10]

    # Serious events
    serious = fda.query(
        "drug",
        "event",
        search=f"patient.drug.medicinalproduct:*{drug_name}*+AND+serious:1",
        limit=1,
    )
    serious_total = serious.get("meta", {}).get("results", {}).get("total", 0)

    # Recent recalls
    recalls = fda.query_drug_recalls(drug_name=drug_name)
    recall_results = recalls.get("results", [])

    return {
        "drug": drug_name,
        "total_events": total,
        "serious_events": serious_total,
        "serious_rate_pct": (serious_total / total * 100.0) if total else 0.0,
        "top_reactions": top_reactions,
        "recalls_sample": recall_results[:5],
    }


def monthly_event_trend(fda: FDAQuery, drug_name: str, months: int = 6):
    trends = []
    for i in range(months):
        end = datetime.now() - timedelta(days=30 * i)
        start = end - timedelta(days=30)
        date_range = f"[{start.strftime('%Y%m%d')}+TO+{end.strftime('%Y%m%d')}]"

        search = (
            f"patient.drug.medicinalproduct:*{drug_name}*"
            f"+AND+receivedate:{date_range}"
        )
        result = fda.query("drug", "event", search=search, limit=1)
        count = result.get("meta", {}).get("results", {}).get("total", 0)

        trends.append({"month": start.strftime("%Y-%m"), "events": count})

    return list(reversed(trends))


def main():
    fda = FDAQuery(api_key=os.getenv("FDA_API_KEY"))

    # Drug: safety profile + trend
    profile = drug_safety_profile(fda, "aspirin")
    trend = monthly_event_trend(fda, "aspirin", months=6)

    # Device: quick cross-database lookup
    device_lookup = {
        "adverse_events": fda.query_device_events("pacemaker", limit=10),
        "classification": fda.query_device_classification("DQY"),
        "510k": fda.query_device_510k(applicant="Medtronic"),
        "udi": fda.query("device", "udi", search="brand_name:*pacemaker*", limit=5),
    }

    # Food: recall monitoring
    food_recalls = fda.query_food_recalls(reason="undeclared peanut", limit=10)

    # Substance: UNII lookup
    substance = fda.query_substance_by_unii("R16CO5Y76E")

    print({"drug_profile": profile, "drug_trend": trend})
    print({"device_lookup_keys": list(device_lookup.keys())})
    print({"food_recalls_count": len(food_recalls.get("results", []))})
    print({"substance_keys": list(substance.keys())})


if __name__ == "__main__":
    main()
3) Run the repository examples (if provided)
bash
python scripts/fda_examples.py
Show full SKILL.md (183 more words)Show less

Implementation Details

API domains and endpoints

This skill is a thin client over openFDA endpoints, typically accessed as:

  • Drugs: drug/event, drug/label, drug/ndc, drug/enforcement, drug/drugsfda, drug/drugshortages
  • Devices: device/event, device/510k, device/classification, device/enforcement, device/recall, device/pma, device/registrationlisting, device/udi, device/covid19serology
  • Foods: food/event, food/enforcement
  • Animal/Veterinary: animalandveterinary/event
  • Other/Substances: other/substance, other/nsde

Exact helper method names (e.g., query_drug_events, query_device_510k) are implemented in scripts/fda_query.py.

Query construction
  • Searches are passed as openFDA query strings (Lucene-like), e.g.:
    • Field match: patient.drug.medicinalproduct:aspirin
    • Wildcards: *aspirin* (use sparingly)
    • Boolean: A+AND+B
    • Date range: receivedate:[20240101+TO+20241231]
  • Pagination uses:
    • limit (page size)
    • skip (offset)
  • Aggregations use count_by_field(domain, endpoint, search, field, exact=True):
    • When exact=True, the implementation typically appends .exact to the aggregation field to avoid tokenization issues.
Rate limits and authentication
  • openFDA supports unauthenticated access with lower daily quotas; an API key increases the daily request limit.
  • The client is expected to:
    • Attach the API key when provided
    • Apply rate limiting and retries (per FDAQuery implementation)
Result handling and robustness
  • Responses generally follow:
json
{
  "meta": { "results": { "skip": 0, "limit": 100, "total": 12345 } },
  "results": []
}
  • Always guard for:
    • Missing results
    • Empty result sets
    • error objects returned by the API
Caching
  • If enabled in FDAQuery, caching reduces repeated calls for identical queries.
  • Typical parameters (implementation-dependent):
    • use_cache=True
    • cache_ttl=<seconds>

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 21 other files (scripts, references) in scientific-skills/Evidence Insight/fda-database of aipoch/medical-research-skills.

  • SKILL.md
  • fda-database_audit_result_v1.json
  • fda_cache/1cf8286b186012b387cd775ea2e0cc6d.json
  • fda_cache/5c7c1e6be77f7a9025bf3c1cc4a027e2.json
  • fda_cache/6f0b440698c62cc6b2d485cfb639cf3c.json
  • fda_cache/78a895fc30a8f656ac9cae080c9aa6be.json
  • fda_cache/859253e4be22288a2b4be7028ee5481a.json
  • fda_cache/8e21e949fd31613c165c2f1f7c67b26c.json
  • fda_cache/95ad9e9bdfc1787b38c0bbd0873c7d69.json
  • fda_cache/abc08fa551365fd6037fbf1613cccd7e.json
  • fda_cache/d9ad69e7135faccb5ed17764b6255d0d.json
  • fda_cache/eccae2c6594ad6cea5a198a4dcc0b68c.json
  • fda_cache/fa6d3bcf5c52ce1c6631e69d6f73b47f.json
  • references/animal_veterinary.md
  • references/api_basics.md
  • references/devices.md
  • references/drugs.md
  • references/foods.md
  • references/other.md
  • … and 3 more

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Fda Database next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fda Database compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fda Database this skillaipoch/medical-research-skills2k—~2kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api43k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl190k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    43k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    190k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed

More from aipoch/medical-research-skills

All 567 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    2k GitHub stars~2.2k tokensUpdated 21 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 21 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Categories

Questions about Fda Database

What does Fda Database do?

Query the openFDA API to retrieve FDA regulatory datasets (drugs, devices, adverse events, recalls, submissions, UNII) when you need programmatic safety/regulatory evidence for analysis or research. Fda Database is an agent skill from aipoch/medical-research-skills. Query the openFDA API to retrieve FDA regulatory datasets (drugs, devices, adverse events, recalls, submissions, UNII) when you need programmatic safety/regulatory evidence for analysis or research.

When should I use Fda Database?

Fda Database fits situations like: backend & APIs work in your project.

How do I install Fda Database in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill fda-database -a claude-code`. Or copy the skill folder (scientific-skills/Evidence Insight/fda-database in aipoch/medical-research-skills) into .claude/skills/fda-database in your project. Claude Code loads it when a task matches its description.

How do I install Fda Database in Codex?

Run `npx skills add aipoch/medical-research-skills --skill fda-database -a codex`. Or copy the skill folder (scientific-skills/Evidence Insight/fda-database in aipoch/medical-research-skills) into .agents/skills/fda-database in your project. Codex loads it when a task matches its description.

Can I use Fda Database in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill fda-database -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fda-database, .gemini/skills/fda-database, .github/skills/fda-database and .opencode/skills/fda-database in your project.

What does Fda Database need to run?

Going by SKILL.md and its folder, Fda Database needs the command-line tools its instructions call (python) and credentials named FDA_API_KEY. Our summary lists: Python 3; A credential in FDA_API_KEY.

Does Fda Database access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fda Database safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Fda Database use?

Fda Database is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fda Database use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 23k tokens, read only when the agent opens those files.

What are the alternatives to Fda Database?

Skills that share tags, products or a category with Fda Database: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 43k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fda Database?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.