Skip to main content
skill CX Codex

foldseek-structural-search — Claude Code skill: find similar proteins

Sends a protein 3D structure file to the Foldseek API and returns structurally similar proteins. Built for cases where you have coordinates, not just a sequence.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add google-deepmind/science-skills --skill foldseek-structural-search -a claude-code
npx skills add google-deepmind/science-skills --skill foldseek_structural_search -a claude-code
Open on GitHub

What foldseek-structural-search does

The skill takes a .cif, .mmcif or .pdb file from your workspace and submits it to the Foldseek web server through scripts/search.py. You get two outputs: a .md table of the best hits and a .json file holding the full API response. The agent reads the table and walks through the metrics — probability, query coverage, E-value, sequence identity.

Database choice is capped by an allowlist: afdb50, afdb-swissprot, pdb100, BFVD, mgnify_esm30, cath50, gmgcl_id, bfmd, afdb-proteome. Ask for anything else and the run stops. Sequence, gene name or UniProt ID input is not supported at all; a coordinate file is mandatory. No structure on disk yet? Download it first.

uv has to be on PATH before you start. The skill also looks for .licenses/foldseek_structural_search_LICENSE.txt at the workspace root — when that file is absent it asks you to review the terms on the Foldseek and steineggerlab sites, then writes the file with a timestamp. Leave the JSON alone; it exists for later tooling, not for reading.

What it helps with

  • find structural homologues from a downloaded .pdb file
  • check an AlphaFold model against known folds
  • tell whether a hit covers the whole shape or only a local motif
  • build a Markdown table of top hits for a report
  • see which protein families show up among the matches

Example prompts for the agent

  • Find structurally similar proteins for proteinA.pdb and save the table
  • Run model.cif against pdb100 and cath50, show me the top 5 hits
  • Walk through Prob and Q-Cov for the best hits and tell me what these proteins are

How to install foldseek-structural-search

1Skills CLI (Vercel)

npx skills add google-deepmind/science-skills --skill foldseek-structural-search -a claude-code
npx skills add google-deepmind/science-skills --skill foldseek_structural_search -a claude-code

2Manually: put the files in place

~/.claude/skills/foldseek_structural_search/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/foldseek_structural_search/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about foldseek-structural-search

How do I install foldseek-structural-search in Claude Code?

Run npx skills add google-deepmind/science-skills --skill foldseek-structural-search -a claude-code. The skill file lands at ~/.claude/skills/foldseek_structural_search/SKILL.md.

What does foldseek-structural-search do?

It submits a protein 3D structure file to the Foldseek API, finds structurally similar proteins, and saves a hit table as .md plus the full response as .json.

Can it search by sequence or UniProt ID?

No. A .pdb, .cif or .mmcif coordinate file is required. Given a sequence or gene name instead, it halts and suggests downloading the structure first.

Source text

SKILL.md · Apache-2.0
---
name: foldseek-structural-search
description: >
    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
    provides a protein sequence, gene name, or UniProt ID.
---

## Prerequisites

1.  **`uv`**: Read the `uv` skill and follow its Setup instructions to ensure
    `uv` is installed and on PATH.
2.  **User Notification**: If .licenses/foldseek_structural_search_LICENSE.txt
    does not already exist in the workspace root 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

-   **File Requirement**: This tool absolutely cannot search by sequence, name,
    or accession ID. It strictly requires a `.pdb`, `.cif`, or `.mmcif` file
    path.
-   **Strict Validation**: Never bypass the input validation or the database
    allowlist check.
-   **Do Not Parse the JSON**: Rely entirely on the generated `.md` file for
    your immediate summary. The JSON is saved purely for subsequent, specialized
    tool use.
-   **No Raw Parsing**: Do not attempt to parse or read the raw 3D coordinates
    yourself; always pass the file to the script.
-   **Notification**: If this skill is used, ensure this is mentioned in the
    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.
    *   If the user provided a protein name, an amino acid sequence, or an
        accession ID (e.g., a UniProt ID) but NO downloaded structure file,
        **halt immediately**. Do not run the script.
    *   Inform the user that Foldseek requires a physical 3D coordinate file,
        and suggest downloading the structure first (e.g., using the AlphaFold
        fetch tool).
2.  **Database Validation:** Check if the user requested specific databases to
    search.
    *   **Allowed List:** `afdb50`, `afdb-swissprot`, `pdb100`, `BFVD`,
        `mgnify_esm30`, `cath50`, `gmgcl_id`, `bfmd`, `afdb-proteome`.
    *   If the user requests a database NOT on this list, **halt immediately**.
        Do not run the script. Inform the user that the database is unsupported
        and provide them with the allowed list.
3.  **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`).
4.  Execute the python script based on the user's request, redirecting the
    standard output into your generated `.md` file:
    *   **Default (No databases specified):** `uv run scripts/search.py
        <path-to-file> -o <generated-filename.json> > <generated-filename.md>`
    *   **Custom (Valid databases specified):** `uv run scripts/search.py
        <path-to-file> -o <generated-filename.json> --databases <db1,db2,db3> >
        <generated-filename.md>`
5.  The script will query the databases, save the full JSON payload, and write a
    Markdown-formatted table to your specified `.md` file.
6.  **Read the Results:** Open and read the newly generated `.md` file carefully
    to view the Markdown table.
7.  **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:
    *   **Prob (Probability):** Values approaching 1.0 (100%) indicate extreme
        confidence that the fold is a true structural homologue.
    *   **Q-Cov (Query Coverage):** High percentages mean the match covers the
        majority of the query protein's overall shape, rather than just a small
        local motif.
    *   **E-value & Seq Identity:** Use these to provide additional evolutionary
        context.
8.  **Perform Functional Analysis:** Analyze the text descriptions embedded
    within the `Target ID` column for the reported matches.
    *   Explicitly report the specific protein names/functions of the top
        structural homologues.
    *   Provide a synthesized overview summarizing the entire *variety* of
        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...").
9.  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.

© google-deepmind · Apache-2.0 · google-deepmind/science-skills

Similar skills

Everything for Science and research →

From the same set39

gnomad-database This skill queries gnomAD for variant frequencies, gene constraint metrics, and regional variant searches. Use it for genetics research workflows. CX Codex +1 2,100installs quickgo-database Queries the QuickGO and ECO REST API to link genes to biological processes, molecular functions and cellular components. Useful when working through gene annotations. CX Codex +1 2,100installs jaspar-database Queries the JASPAR database for transcription factor binding profiles. Useful when fetching PFM or PWM matrices and converting gene names into stable matrix IDs. CX Codex +1 2,100installs gtex-database Retrieves RNA expression and eQTL data from GTEx across 54 non-diseased human tissue sites. Use it to query genes, variants, or tissue-specific expression. CX Codex +1 2,100installs interpro-database Queries protein domains, families, and functional sites through the InterPro API. Integrates 14 member databases and automates genome annotations with GO terms. CX Codex +1 2,100installs string-database This skill queries STRING for protein interactions, functional enrichment, and homology. Use it when protein evidence or pathway analysis is needed. CX Codex +1 2,100installs embl-ebi-ols This skill queries the EMBL-EBI Ontology Lookup Service for terms, definitions and hierarchies. Useful when an agent works with diseases, phenotypes or gene functions. CX Codex +1 2,100installs reactome-database Connects Reactome services for gene list enrichment, identifier mapping, and pathway exports. Useful for running biological data queries inside coding agents. CX Codex +1 2,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor