public-db-lookup
Skill9 starsChanged 4 months agoMITView on GitHub
Fetch compact JSON records from UniProt, NCBI, MGnify, InterPro, AlphaFold DB, STRING, or ENA. Use when looking up an accession, taxon, entry, or structure in a public database.
- Reads credentials
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- ai-scientist-evaluatorSkill
- arxiv-searchSkill
- beautiful-data-vizSkill
- bio-annotationSkill
- bio-assembly-qcSkill
- bio-binning-qcSkill
- bio-fasta-database-curatorSkill
- bio-foundation-housekeepingSkill
- bio-gene-callingSkill
- bioinformatics-projectSkill
- bio-interdomain-hgtSkill
- bio-logicSkill
- bio-phylogenomicsSkill
- bio-prefect-dask-nextflowSkill
- bio-protein-clustering-pangenomeSkill
- bio-reads-qc-mappingSkill
- biorxiv-searchSkill
- bio-stats-ml-reportingSkill
- bio-structure-annotationSkill
- bio-viromicsSkill
- bio-workflow-methods-docwriterSkill
- crossref-lookupSkill
- csag-extractionSkill
- exploratory-data-analysisSkill
- manuscript-review-councilSkill
- notebooksSkill
- pdf-to-mdSkill
- plotly-dashboard-skillSkill
- polars-dovmedSkill
- proposal-reviewSkill
- scientific-impact-assessmentSkill
- scientific-writingSkill
- tracking-taxonomy-updatesSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Read the card for that service in references/services.md for the path, parameters, and the right --record-path.
- Very specific: line 14
Run the wrapper, scripts/lookup in this skill's directory (installed at ~/.agents/skills/public-db-lookup/scripts/lookup).
- Very specific: line 15
Keep --max-items small (default 5).
- Very specific: line 16
When the full payload matters, add --save-raw PATH and work from the file.
- Very specific: line 25
When the payload is large, use --save-raw and report the path instead of pasting the content.
- Very specific: line 81
Solution: Ask the user to export NCBI_EMAIL and NCBI_TOOL.
- Distinctive: line 85
No POST requests, ID-mapping jobs, or other asynchronous job APIs
- Distinctive: line 86
No bulk downloads of sequence or structure files
- Very specific: line 87
No literature search; use /polars-dovmed
- Distinctive: line 88
No JGI-internal data access (GOLD, IMG, JAMO).
≈ “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
Public Database Lookup
One bounded GET against a public life-science REST API. The bundled script picks the base URL, adds a User-Agent, retries on 429 and 5xx, and prints a compact JSON envelope instead of the full payload.
Instructions
- Pick the service that owns the record:
uniprot,ncbi-entrez,ncbi-datasets,mgnify,interpro,alphafold,string, orena. - Read the card for that service in references/services.md for the path, parameters, and the right
--record-path. - Run the wrapper,
scripts/lookupin this skill's directory (installed at~/.agents/skills/public-db-lookup/scripts/lookup). - Keep
--max-itemssmall (default 5). Raise it only when the user needs more rows. - When the full payload matters, add
--save-raw PATHand work from the file; the envelope still carries the compacted view. - For the two NCBI services, the script reads
NCBI_API_KEY,NCBI_EMAILandNCBI_TOOLfrom the environment, adds them as request parameters, and redacts the key from its output. Use only values the user exported; never setNCBI_EMAILto an address from the conversation or system context. - Requests are paced across invocations, so calling the CLI in a loop stays inside each service's documented rate. The timestamps live under
$XDG_STATE_HOME/omics-skills/public-db-lookup; override with--state-dir. Never pass a credential in--pathor--param: the script refuses it, because it would be echoed back in the emitted URL and land in shell history. - Route PubMed and PMC literature searches to
/polars-dovmed; this skill does not cover them.
Execution behavior
- Summarize the JSON envelope in Markdown by default.
- Return raw JSON only when the user asks for machine-readable output.
- When the payload is large, use
--save-rawand report the path instead of pasting the content. - Re-run the lookup rather than trust tool output from earlier in a long conversation.
Quick Reference
| Flag | Meaning |
--service NAME | One of the eight services (required) |
--path PATH | Endpoint path relative to the service base URL, or a full URL under that base (required) |
--param KEY=VALUE | Query parameter; repeat as needed |
--record-path a.b.c | Dotted path to the record list; inferred from common keys when omitted |
--max-items N | Records, list items, and dict keys kept per level (default 5) |
--max-depth N | Nesting depth kept before containers collapse (default 3) |
--format auto|json|text | Parse as JSON, or keep the first 800 characters of text (default auto) |
--save-raw PATH | Write the full response body to PATH |
--timeout SEC | Request timeout (default 30) |
Input Requirements
uvand network access; the PEP 723 script installs its pinned HTTP dependency- A service name and an endpoint path from the service card
- Optional query parameters, one
--parameach - Optional
NCBI_API_KEY,NCBI_EMAIL,NCBI_TOOLin the environment for NCBI services
Output
One JSON object on stdout.
- Success:
ok,source,url(api_key value removed),status_code,warnings,raw_output_path(the path given to--save-raw, else null), plus one of:- list results:
record_path,record_count_returned,record_count_available,truncated,records - other JSON:
summary,top_keys - text:
text_head,text_head_truncated
- list results:
- Failure:
ok: false,source, anderrorwithcode(invalid_input,network_error,http_error,invalid_response) andmessage - Exit code 0 on success, 2 for
invalid_input, 1 for the other errors - Compaction: strings cut at 240 characters, lists at
--max-itemswith a trailing count marker, dicts at--max-itemskeys with a_truncated_keyscount, deeper containers replaced by an ellipsis
Quality Gates
--max-itemsis the smallest count that answers the question--record-pathmatches the service card, or the inferred path in the envelope is the intended list- NCBI credentials come from the environment, never from the command line
warningsandtruncatedfrom the envelope reach the user- Every accession or identifier in the reply came from the response, not from memory
Troubleshooting
Issue: http_error with HTTP 429 after retries.
Solution: The service is rate limiting you. Wait, lower the request rate, and for NCBI set NCBI_API_KEY to raise the allowed rate.
Issue: records is empty or the envelope falls back to summary with a warning.
Solution: The record list is not under an inferred key. Read top_keys and pass the right --record-path from the service card.
Issue: NCBI rejects or throttles requests that carry no contact details.
Solution: Ask the user to export NCBI_EMAIL and NCBI_TOOL; NCBI asks for both on every E-utilities request.
Non-Goals
- No POST requests, ID-mapping jobs, or other asynchronous job APIs
- No bulk downloads of sequence or structure files
- No literature search; use
/polars-dovmed - No JGI-internal data access (GOLD, IMG, JAMO); this skill covers public endpoints only
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.

