deepxiv-fa-drugs
Skill843 starsChanged 8 months agoMITView on GitHub
Search ~257k US drug labels (openFDA SPL): indications, contraindications, interactions, boxed warnings, pharmacologic class. Use when a task needs what a US drug label says.
- Installs packages
In this repository17 other files it gives its agents.
- deepxiv-baseline-tableSkill
- deepxiv-cliSkill
- deepxiv-fa-appraiseSkill
- deepxiv-fa-casesSkill
- deepxiv-fa-cveSkill
- deepxiv-fa-filingsSkill
- deepxiv-fa-frSkill
- deepxiv-fa-grantsSkill
- deepxiv-fa-lawSkill
- deepxiv-fa-osvSkill
- deepxiv-fa-standardsSkill
- deepxiv-fa-stocksSkill
- deepxiv-fa-talentSkill
- deepxiv-fa-trialsSkill
- deepxiv-fa-uk-eu-lawSkill
- deepxiv-fa-us-lawSkill
- deepxiv-trending-digestSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 77
Always pass -d drugs: automatic domain picking is still early.
- Distinctive: line 82
Only the latest version per set_id is kept.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DeepXiv · Drugs (drugs)
~257k US drug labels (openFDA SPL, latest version per set_id; Synced daily; exact counts are in corpus (live)). Indications, contraindications, interacting drugs, boxed-warning gist and one-line summaries are model-extracted; route / product type / pharmacologic class come from the openfda mapping block.
Corpus: 256,993 documents, updated 2026-10.
Setup
pip install -U deepxiv-sdk # deepxiv registers a token on first useWith a registered key (https://data.rag.ac.cn/register), search and read are fair use: 60/min, 5 at once, 5,000/day; on the auto-registered token they spend the deepxiv daily limit at the credits listed below. ask draws on the daily ask allowance (resets 00:00 UTC; a site-wide daily total can run out early at peak times), or 3 lifetime trial asks on the auto-registered token. On 429, back off for Retry-After seconds. Data goes to stdout; cost, quota and sources go to stderr. Exit 0 ok, 1 API error, 2 usage error. The general CLI guide is the deepxiv-cli skill.
Start here
deepxiv fa search drugs "GLP-1 weight loss" -F has_boxed_warning=true -k 5
deepxiv fa search drugs "anticoagulant" -F route=ORAL -F is_rx=true -k 5
deepxiv fa read drugs f5e548d0-cc79-4c34-a3f5-e20a5b8b6564 -l brief
deepxiv fa ask "Which drugs interact with warfarin according to their labels?" -d drugsFree samples: ids f5e548d0-cc79-4c34-a3f5-e20a5b8b6564; queries semaglutide weight loss.
Search
deepxiv fa search drugs "query" [-F FILTER]... [-k N] [--offset N] [--mode M] [--head] [--json]Modes: hybrid, dense, bm25. Up to 100 hits. Cost 2 (with --head: 3).
An empty query is rejected; use "*" to list by filters only. Filters combine with AND; an undeclared field exits 2.
| filter | type | -F syntax | meaning |
route | keyword | k=v, k=a,b | Route of administration Values: ORAL, TOPICAL, INTRAVENOUS, INTRAMUSCULAR, SUBCUTANEOUS, OPHTHALMIC, NASAL, RESPIRATORY (INHALATION) …. |
product_type | keyword | k=v, k=a,b | Product type; UNMAPPED = the SPL has no openfda mapping block Values: HUMAN PRESCRIPTION DRUG, HUMAN OTC DRUG, CELLULAR THERAPY, UNMAPPED. |
is_rx | bool | k=v | Prescription-only |
has_boxed_warning | bool | k=v | Has a boxed warning |
pharm_class_epc | keyword | k=v, k=a,b | Pharmacologic class (EPC) |
effective_year | integer | k=v, k>=n, k=n..m | Label version year, range |
Advanced filters (see deepxiv fa spec drugs): generic_name, substance_names, pharm_class_moa, manufacturer, rxcui, unii, product_ndc, application_number.
Read
deepxiv fa read drugs ID [ID...] [-l brief|detail|full] [-e EXTRA] [-p k=v]... [-f json|md|html]| level | credits | returns |
brief | 1 | Card: the fields needed to triage, same as in search hits |
detail (default) | 2 | Every structured field (rule-derived plus model-generated; model fields are listed in _enrich.fields) |
full | 5 | Full text (not available yet: the label sections live on NAS (openfda/label); the index carries only section names and token counts) |
At -l full, -p section=NAME reads one section and -p characters=N the first N characters.
Facets
deepxiv fa facets drugs FIELD lists the legal values and counts, free. Use it instead of guessing a spelling. Fields: route, product_type, pharm_class_epc.
Ask
deepxiv fa ask "question" -d drugs [-e low|medium|high] [-p k=v]... [--no-stream] [--json]Agentic Q&A over this domain: the model turns the question into filters plus keywords from the domain's own self-description, reads the hits and answers with [drugs:<set_id> <title>] citations; /stream is NDJSON with real token deltas
Always pass -d drugs: automatic domain picking is still early.
What this corpus will and will not tell you
- 67% (171,903) are product_type=UNMAPPED: those SPLs have no openfda mapping block, so generic name / route / pharmacologic class may be empty — use spl_name for the product name.
- Only the latest version per set_id is kept; no label history.
- Indications and contraindications are extracted highlights; go back to the label for prescribing decisions.
- Not medical advice.
- The index holds no full text: level=full is not available yet (the label sections live on NAS (openfda/label); the index carries only section names and token counts).
Citing
Cite records as [openFDA SPL f5e548d0…]. Say plainly when the corpus has nothing.
Generated by scripts/gen_fa_skills.py from deepxiv fa spec drugs --json on 2026-10-19. Field names and prices can change; deepxiv fa spec drugs is the live source.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

