Foldseek structural search

From MarceloClaro/OpenCode_Ecosystem · View interactive version

Foldseek structural search is an AI agent skill from the GitHub repository MarceloClaro/OpenCode_Ecosystem. Performs 3D structural searches of proteins against various databases (PDB, AlphaFold, CATH, MGnify, etc.) using the Foldseek API. Use ONLY when the user provides a physical 3D coordinate file (.cif, .mmcif, or .pdb) and wants to find structurally similar proteins. Do NOT use if the user only provid

How to use this skill

Skill file

Prerequisites

  1. uv: Read the uv skill and follow its Setup instructions to ensure

uv is installed and on PATH.

  1. User Notification: If LICENSE_NOTIFICATION.txt does not already exist in

this skill directory then (1) prominently notify the user to check the terms

at https://search.foldseek.com/search and

https://github.com/steineggerlab/foldseek, then (2) create the file

recording the notification text and timestamp.

Goal

Submit a user-provided 3D protein structure file (.cif, .mmcif, or .pdb)

to the Foldseek web server API to find structurally similar proteins. Report the

top structural hits, interpret key alignment metrics, summarize the inferred

protein functions, save the Markdown-formatted table to a .md file, and save

the full detailed results to a local JSON file.

Core Rules

or accession ID. It strictly requires a .pdb, .cif, or .mmcif file

path.

allowlist check.

your immediate summary. The JSON is saved purely for subsequent, specialized

tool use.

yourself; always pass the file to the script.

output.

Instructions

  1. Strict Input Validation: Verify that the user has explicitly provided a

valid path to a .cif, .mmcif, or .pdb file in their workspace.

accession ID (e.g., a UniProt ID) but NO downloaded structure file,

halt immediately. Do not run the script.

and suggest downloading the structure first (e.g., using the AlphaFold

fetch tool).

  1. Database Validation: Check if the user requested specific databases to

search.

mgnify_esm30, cath50, gmgcl_id, bfmd, afdb-proteome.

Do not run the script. Inform the user that the database is unsupported

and provide them with the allowed list.

  1. Generate File Names: Generate descriptive output file names for both the

JSON data and the Markdown table based on the input file (e.g.,

proteinA_foldseek_results.json and proteinA_foldseek_results.md).

  1. Execute the python script based on the user's request, redirecting the

standard output into your generated .md file:

<path-to-file> -o <generated-filename.json> > <generated-filename.md>`

<path-to-file> -o <generated-filename.json> --databases <db1,db2,db3> >

<generated-filename.md>`

  1. The script will query the databases, save the full JSON payload, and write a

Markdown-formatted table to your specified .md file.

  1. Read the Results: Open and read the newly generated .md file carefully

to view the Markdown table.

  1. Interpret the Metrics: Summarize the top 3 to 5 structural matches that

have meaningfull annotations for the user. When reporting, assess the match

quality using these specific fields:

confidence that the fold is a true structural homologue.

majority of the query protein's overall shape, rather than just a small

local motif.

context.

  1. Perform Functional Analysis: Analyze the text descriptions embedded

within the Target ID column for the reported matches.

structural homologues.

different functions, domains, or protein families found across the whole

list of homologues (e.g., "Most hits are portal proteins, but there is

also a distinct cluster of viral capsid matches...").

  1. Explicitly inform the user of both newly created files (.json and .md)

and their locations so they can be seamlessly used in subsequent analysis

steps.

* If the API returns an error or the file is missing, inform the user clearly

and ask them to verify the file path.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.