{"id":"e1dc29fa-faf3-461e-a4c9-1304407e3dc2","shortId":"f365G3","kind":"skill","title":"uniprot","tagline":"Access UniProt for protein sequence and annotation retrieval. Use this skill when: (1) Looking up protein sequences by accession, (2) Finding functional annotations, (3) Getting domain boundaries, (4) Finding homologs and variants, (5) Cross-referencing to PDB structures.  For st","description":"# UniProt Database Access\n\n**Note**: This skill uses the UniProt REST API directly. No Modal deployment needed - all operations run locally via HTTP requests.\n\n## Fetching Sequences\n\n### By Accession\n```bash\n# FASTA format\ncurl \"https://rest.uniprot.org/uniprotkb/P00533.fasta\"\n\n# JSON format with annotations\ncurl \"https://rest.uniprot.org/uniprotkb/P00533.json\"\n```\n\n### Using Python\n```python\nimport requests\n\ndef get_uniprot_sequence(accession):\n    \"\"\"Fetch sequence from UniProt.\"\"\"\n    url = f\"https://rest.uniprot.org/uniprotkb/{accession}.fasta\"\n    response = requests.get(url)\n    if response.ok:\n        lines = response.text.strip().split('\\n')\n        header = lines[0]\n        sequence = ''.join(lines[1:])\n        return header, sequence\n    return None, None\n```\n\n## Getting Annotations\n\n### Full Entry\n```python\ndef get_uniprot_entry(accession):\n    \"\"\"Fetch full UniProt entry as JSON.\"\"\"\n    url = f\"https://rest.uniprot.org/uniprotkb/{accession}.json\"\n    response = requests.get(url)\n    return response.json() if response.ok else None\n\nentry = get_uniprot_entry(\"P00533\")\nprint(f\"Protein: {entry['proteinDescription']['recommendedName']['fullName']['value']}\")\n```\n\n### Domain Boundaries\n```python\ndef get_domains(accession):\n    \"\"\"Extract domain annotations.\"\"\"\n    entry = get_uniprot_entry(accession)\n    domains = []\n\n    for feature in entry.get('features', []):\n        if feature['type'] == 'Domain':\n            domains.append({\n                'name': feature.get('description', ''),\n                'start': feature['location']['start']['value'],\n                'end': feature['location']['end']['value']\n            })\n\n    return domains\n\n# Example: EGFR domains\ndomains = get_domains(\"P00533\")\n# [{'name': 'Kinase', 'start': 712, 'end': 979}, ...]\n```\n\n## Searching UniProt\n\n### By Gene Name\n```python\ndef search_uniprot(query, organism=None, limit=10):\n    \"\"\"Search UniProt by query.\"\"\"\n    url = \"https://rest.uniprot.org/uniprotkb/search\"\n    params = {\n        \"query\": query,\n        \"format\": \"json\",\n        \"size\": limit\n    }\n    if organism:\n        params[\"query\"] += f\" AND organism_id:{organism}\"\n\n    response = requests.get(url, params=params)\n    return response.json()['results']\n\n# Search for human EGFR\nresults = search_uniprot(\"EGFR\", organism=9606)\n```\n\n### By Sequence Similarity (BLAST)\n```python\n# Use UniProt BLAST\n# https://www.uniprot.org/blast\n```\n\n## Cross-References\n\n### Get PDB Structures\n```python\ndef get_pdb_references(accession):\n    \"\"\"Get PDB structures for UniProt entry.\"\"\"\n    entry = get_uniprot_entry(accession)\n    pdbs = []\n\n    for xref in entry.get('uniProtKBCrossReferences', []):\n        if xref['database'] == 'PDB':\n            pdbs.append({\n                'pdb_id': xref['id'],\n                'method': xref.get('properties', [{}])[0].get('value', ''),\n                'chains': xref.get('properties', [{}])[1].get('value', '')\n            })\n\n    return pdbs\n\n# Example: PDB structures for EGFR\npdbs = get_pdb_references(\"P00533\")\n```\n\n## Common Use Cases\n\n### Target Selection\n```python\n# 1. Find protein by name\nresults = search_uniprot(\"insulin receptor\", organism=9606)\n\n# 2. Get accession\naccession = results[0]['primaryAccession']  # e.g., P06213\n\n# 3. Get domains\ndomains = get_domains(accession)\n\n# 4. Find PDB structure\npdbs = get_pdb_references(accession)\n\n# 5. Download best structure for design\n```\n\n### Sequence Alignment Info\n```python\ndef get_sequence_variants(accession):\n    \"\"\"Get natural variants from UniProt.\"\"\"\n    entry = get_uniprot_entry(accession)\n    variants = []\n\n    for feature in entry.get('features', []):\n        if feature['type'] == 'Natural variant':\n            variants.append({\n                'position': feature['location']['start']['value'],\n                'original': feature.get('alternativeSequence', {}).get('originalSequence', ''),\n                'variant': feature.get('alternativeSequence', {}).get('alternativeSequences', [''])[0],\n                'description': feature.get('description', '')\n            })\n\n    return variants\n```\n\n## API Reference\n\n| Endpoint | Description |\n|----------|-------------|\n| `/uniprotkb/{id}.fasta` | FASTA sequence |\n| `/uniprotkb/{id}.json` | Full entry JSON |\n| `/uniprotkb/search` | Search entries |\n| `/uniprotkb/stream` | Batch download |\n\n## Troubleshooting\n\n**Entry not found**: Check accession format (e.g., P00533)\n**Rate limits**: Add delay between requests\n**Large downloads**: Use stream endpoint with pagination\n\n---\n\n**Next**: Use sequence with `esm` for embeddings or `colabfold` for structure.","tags":["uniprot","protein","design","skills","adaptyvbio","agent-skills","claude-code","protein-design","protein-engineering"],"capabilities":["skill","source-adaptyvbio","skill-uniprot","topic-agent-skills","topic-claude-code","topic-protein-design","topic-protein-engineering"],"categories":["protein-design-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/adaptyvbio/protein-design-skills/uniprot","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add adaptyvbio/protein-design-skills","source_repo":"https://github.com/adaptyvbio/protein-design-skills","install_from":"skills.sh"}},"qualityScore":"0.513","qualityRationale":"deterministic score 0.51 from registry signals: · indexed on github topic:agent-skills · 126 github stars · SKILL.md body (4,591 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T12:54:49.315Z","embedding":null,"createdAt":"2026-04-18T22:10:16.037Z","updatedAt":"2026-05-02T12:54:49.315Z","lastSeenAt":"2026-05-02T12:54:49.315Z","tsv":"'/blast':293 '/uniprotkb':461,466 '/uniprotkb/':103,148 '/uniprotkb/p00533.fasta':76 '/uniprotkb/p00533.json':84 '/uniprotkb/search':248,472 '/uniprotkb/stream':475 '0':117,335,379,451 '1':14,121,341,362 '10':240 '2':21,374 '3':25,383 '4':29,390 '5':34,399 '712':224 '9606':282,373 '979':226 'access':2,20,45,69,94,104,137,149,179,187,305,316,376,377,389,398,413,423,483 'add':489 'align':406 'alternativesequ':443,448,450 'annot':8,24,80,129,182 'api':53,457 'bash':70 'batch':476 'best':401 'blast':286,290 'boundari':28,174 'case':358 'chain':338 'check':482 'colabfold':508 'common':356 'cross':36,295 'cross-refer':294 'cross-referenc':35 'curl':73,81 'databas':44,325 'def':90,133,176,233,301,409 'delay':490 'deploy':57 'descript':201,452,454,460 'design':404 'direct':54 'domain':27,173,178,181,188,197,213,216,217,219,385,386,388 'domains.append':198 'download':400,477,494 'e.g':381,485 'egfr':215,276,280,350 'els':158 'embed':506 'end':207,210,225 'endpoint':459,497 'entri':131,136,141,160,163,168,183,186,311,312,315,419,422,470,474,479 'entry.get':192,321,428 'esm':504 'exampl':214,346 'extract':180 'f':100,145,166,260 'fasta':71,105,463,464 'featur':190,193,195,203,208,426,429,431,437 'feature.get':200,442,447,453 'fetch':66,95,138 'find':22,30,363,391 'format':72,78,252,484 'found':481 'full':130,139,469 'fullnam':171 'function':23 'gene':230 'get':26,91,128,134,161,177,184,218,297,302,306,313,336,342,352,375,384,387,395,410,414,420,444,449 'header':115,123 'homolog':31 'http':64 'human':275 'id':263,329,331,462,467 'import':88 'info':407 'insulin':370 'join':119 'json':77,143,150,253,468,471 'kinas':222 'larg':493 'limit':239,255,488 'line':111,116,120 'local':62 'locat':204,209,438 'look':15 'method':332 'modal':56 'n':114 'name':199,221,231,366 'natur':415,433 'need':58 'next':500 'none':126,127,159,238 'note':46 'oper':60 'organ':237,257,262,264,281,372 'origin':441 'originalsequ':445 'p00533':164,220,355,486 'p06213':382 'pagin':499 'param':249,258,268,269 'pdb':39,298,303,307,326,328,347,353,392,396 'pdbs':317,345,351,394 'pdbs.append':327 'posit':436 'primaryaccess':380 'print':165 'properti':334,340 'protein':5,17,167,364 'proteindescript':169 'python':86,87,132,175,232,287,300,361,408 'queri':236,244,250,251,259 'rate':487 'receptor':371 'recommendednam':170 'refer':296,304,354,397,458 'referenc':37 'request':65,89,492 'requests.get':107,152,266 'respons':106,151,265 'response.json':155,271 'response.ok':110,157 'response.text.strip':112 'rest':52 'rest.uniprot.org':75,83,102,147,247 'rest.uniprot.org/uniprotkb/':101,146 'rest.uniprot.org/uniprotkb/p00533.fasta':74 'rest.uniprot.org/uniprotkb/p00533.json':82 'rest.uniprot.org/uniprotkb/search':246 'result':272,277,367,378 'retriev':9 'return':122,125,154,212,270,344,455 'run':61 'search':227,234,241,273,278,368,473 'select':360 'sequenc':6,18,67,93,96,118,124,284,405,411,465,502 'similar':285 'size':254 'skill':12,48 'skill-uniprot' 'source-adaptyvbio' 'split':113 'st':42 'start':202,205,223,439 'stream':496 'structur':40,299,308,348,393,402,510 'target':359 'topic-agent-skills' 'topic-claude-code' 'topic-protein-design' 'topic-protein-engineering' 'troubleshoot':478 'type':196,432 'uniprot':1,3,43,51,92,98,135,140,162,185,228,235,242,279,289,310,314,369,418,421 'uniprotkbcrossrefer':322 'url':99,108,144,153,245,267 'use':10,49,85,288,357,495,501 'valu':172,206,211,337,343,440 'variant':33,412,416,424,434,446,456 'variants.append':435 'via':63 'www.uniprot.org':292 'www.uniprot.org/blast':291 'xref':319,324,330 'xref.get':333,339","prices":[{"id":"b46f030f-e9cf-40b9-9469-6af0c6d6010c","listingId":"e1dc29fa-faf3-461e-a4c9-1304407e3dc2","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"adaptyvbio","category":"protein-design-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:10:16.037Z"}],"sources":[{"listingId":"e1dc29fa-faf3-461e-a4c9-1304407e3dc2","source":"github","sourceId":"adaptyvbio/protein-design-skills/uniprot","sourceUrl":"https://github.com/adaptyvbio/protein-design-skills/tree/main/skills/uniprot","isPrimary":false,"firstSeenAt":"2026-04-18T22:10:16.037Z","lastSeenAt":"2026-05-02T12:54:49.315Z"}],"details":{"listingId":"e1dc29fa-faf3-461e-a4c9-1304407e3dc2","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"adaptyvbio","slug":"uniprot","github":{"repo":"adaptyvbio/protein-design-skills","stars":126,"topics":["agent-skills","claude-code","protein-design","protein-engineering"],"license":"mit","html_url":"https://github.com/adaptyvbio/protein-design-skills","pushed_at":"2026-01-19T13:06:29Z","description":"Claude Code skills for protein design","skill_md_sha":"1e6206caff185422689c25a4053823b72aedfad6","skill_md_path":"skills/uniprot/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/adaptyvbio/protein-design-skills/tree/main/skills/uniprot"},"layout":"multi","source":"github","category":"protein-design-skills","frontmatter":{"name":"uniprot","license":"MIT","description":"Access UniProt for protein sequence and annotation retrieval. Use this skill when: (1) Looking up protein sequences by accession, (2) Finding functional annotations, (3) Getting domain boundaries, (4) Finding homologs and variants, (5) Cross-referencing to PDB structures.  For structure retrieval, use pdb. For sequence design, use proteinmpnn."},"skills_sh_url":"https://skills.sh/adaptyvbio/protein-design-skills/uniprot"},"updatedAt":"2026-05-02T12:54:49.315Z"}}