1---2name: uniprot-skill3description: Submit compact UniProt REST API requests for UniProtKB, UniRef, UniParc, and FASTA stream endpoints. Use when a user wants concise UniProt summaries; save raw JSON or FASTA only on request.4---56## Operating rules7- Use `scripts/rest_request.py` for all UniProt API calls.8- Use `base_url=https://rest.uniprot.org`.9- The script accepts `max_items`; for search endpoints, start with API `size=10` and `max_items=10`.10- Single accession or cluster lookups usually do not need `max_items`.11- Re-run requests in long conversations instead of relying on older tool output.12- Treat displayed `...` in tool previews as UI truncation, not part of the real request.13- If the user asks for full JSON or FASTA, set `save_raw=true` and report the saved file path instead of pasting the payload into chat.1415## Execution behavior16- Return concise markdown summaries from the script JSON by default.17- Return the script JSON verbatim only if the user explicitly asks for machine-readable output.18- Prefer these paths: `uniprotkb/search`, `uniprotkb/<accession>`, `uniref/<cluster>`, `uniparc/search`, and `uniprotkb/stream`.19- For `stream`, use `response_format=text` so the script returns only a short `text_head` unless raw output is requested.2021## Input22- Read one JSON object from stdin.23- Required fields: `base_url`, `path`24- Optional fields: `method`, `params`, `headers`, `json_body`, `form_body`, `record_path`, `response_format`, `max_items`, `max_depth`, `timeout_sec`, `save_raw`, `raw_output_path`25- Common UniProt patterns:26 - `{"base_url":"https://rest.uniprot.org","path":"uniprotkb/search","params":{"query":"gene:TP53 AND organism_id:9606","fields":"accession,gene_names","size":10,"format":"json"},"record_path":"results","max_items":10}`27 - `{"base_url":"https://rest.uniprot.org","path":"uniprotkb/P04637","params":{"format":"json"}}`28 - `{"base_url":"https://rest.uniprot.org","path":"uniprotkb/stream","params":{"query":"organism_id:562","format":"fasta","size":2},"response_format":"text"}`2930## Output31- Success returns `ok`, `source`, `path`, `method`, `status_code`, `warnings`, and either compact `records`, a compact `summary`, or `text_head`.32- Use `raw_output_path` when `save_raw=true`.33- Failure returns `ok=false` with `error.code` and `error.message`.3435## Execution36```bash37echo '{"base_url":"https://rest.uniprot.org","path":"uniprotkb/search","params":{"query":"gene:TP53 AND organism_id:9606","fields":"accession,gene_names","size":10,"format":"json"},"record_path":"results","max_items":10}' | python scripts/rest_request.py38```3940## References41- No additional runtime references are required; keep the import package limited to this file and `scripts/rest_request.py`.