esm2

esm2 is a skill for Claude Code, Codex from naity/FM4Life. It costs 86 tokens per session (3,044 once invoked), scanned A, original, MIT.

A family of protein language models that reads amino-acid sequences to produce numerical representations and predictions about protein changes, contacts, and structure.

In plain words
What is it for?
Use it to create protein embeddings, score mutation effects, predict residue contacts, or run ESMFold structure prediction.
Why use it?
It lets researchers analyze protein sequences and mutations with a model trained on large sequence databases, without needing task-specific labelled data for some analyses.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create protein embeddings, score mutation effects, predict residue contacts…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/naity/fm4life/esm2
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add naity/FM4Life --skill esm2
Clone the repo
git clone --depth 1 https://github.com/naity/FM4Life

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for esm2

README.md
[![agentmods](https://agentmods.dev/badge/skills/naity/fm4life/esm2.svg)](https://agentmods.dev/skills/naity/fm4life/esm2)
Your own site
<a href="https://agentmods.dev/skills/naity/fm4life/esm2"><img src="https://agentmods.dev/badge/skills/naity/fm4life/esm2.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,044 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00086 $0.03044
Opus 5 $0.00043 $0.01522
Sonnet 5 $0.00017 $0.00609
Haiku 4.5 $0.00009 $0.00304

Measured 6d ago against content hash 2693a74b2375, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

esm2 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/embed.py, scripts/scan_variants.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/esm2/SKILL.md · 277 lines

How it starts

The opening of the file, as written. The whole thing — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ESM2: Evolutionary Scale Modeling

Overview

ESM2 is a family of encoder-only protein language models from Meta FAIR, trained on 250M+ UniRef50 sequences. Unlike ESM3 (which is generative), ESM2 is discriminative — it cannot generate sequences but excels at:

  • Protein embeddings — dense representations for downstream ML tasks
  • Zero-shot variant effect scoring — predict mutational fitness without labels
  • Contact prediction — residue-residue contact maps from attention heads
  • Structure prediction — via ESMFold (uses ESM2 as backbone)

ESM2 is available on HuggingFace with no special SDK or API token required. The same HF API also covers ESM-1b and ESM-1v (variant-specialized) — use AutoTokenizer / AutoModel for any of them interchangeably.

Installation

pip install transformers torch

For faster inference with GPU:

pip install transformers torch accelerate

To use the fair-esm package directly (alternative, gives access to ESM-1v and ESM-IF1):

pip install fair-esm

Model Selection

HuggingFace model ID Params Layers Hidden dim Use case
facebook/esm2_t6_8M_UR50D 8M 6 320 CPU, fast prototyping
facebook/esm2_t12_35M_UR50D 35M 12 480 CPU-friendly, good quality
facebook/esm2_t30_150M_UR50D 150M 30 640 Balanced
facebook/esm2_t33_650M_UR50D 650M 33 1280 Best default — GPU recommended
facebook/esm2_t36_3B_UR50D 3B 36 2560 High accuracy, needs GPU
facebook/esm2_t48_15B_UR50D 15B 48 5120 Max accuracy, multi-GPU

Start with esm2_t33_650M_UR50D unless compute is constrained.

Core Capabilities

1. Protein Embeddings

Extract per-residue or per-sequence embeddings for downstream tasks (classification, clustering, regression).

from transformers import EsmTokenizer, EsmModel
import torch

model_name = "facebook/esm2_t33_650M_UR50D"
tokenizer = EsmTokenizer.from_pretrained(model_name)
model = EsmModel.from_pretrained(model_name).eval()

sequence = "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVVHSLAKWKRQTLGQHDFSAGEGLYTHMKALRPDEDRLSPLHSVYVDQWDWERVMGDGERQFSTLKSTVEAIWAGIKATEAAVSEEFGLAPFLPDQIHFVHSQELLSRYPDLDAKGRERAIAKDLGAVFLVGIGGKLSDGHRHDVRAPDYDDWSTPSELGHAGLNGDILVWNPVLEDAFELSSMGIRVDADTLKHQLALTGDED"

inputs = tokenizer(sequence, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

# Per-residue embeddings: shape (seq_len, hidden_dim)
# Slice [1:-1] to remove [CLS] and [EOS] special tokens
per_residue = outputs.last_hidden_state[0, 1:-1]

# Per-sequence embedding: mean pool over residues
per_sequence = per_residue.mean(dim=0)  # shape (hidden_dim,)

print(f"Per-residue: {per_residue.shape}")   # (L, 1280)
print(f"Per-sequence: {per_sequence.shape}") # (1280,)

Read the full file on GitHub · 277 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 277 lines · 86 tokens per session scan A 2693a74b2375

Subscribe to this mod's changes

esm2 is a skill published in the GitHub repository naity/FM4Life (2 stars, last pushed 5mo ago), licensed MIT. It adds 86 tokens to every session and 3,044 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cibersort-immune-infiltration-analysis

Use when estimating relative immune cell infiltration from a bulk expression matrix with a CIBERSORT-style nu-SVR deconvolution workflow based on an LM22 signature matrix, comparing one case group against one control group, and generating structured tables plus immune-fraction plots. NOT for single-cell RNA-seq…

aipoch/medical-research-skills · 92 tokens

cerna-analysis

Use when building a ceRNA regulatory network from a key gene list by combining bundled miRNA-mRNA and miRNA-lncRNA database files, with flat-file CSV exports and PDF visualization in a single output directory. NOT for: differential expression, single-cell analysis, enrichment analysis, or workflows without a key gene…

aipoch/medical-research-skills · 68 tokens

gene-protein-expression-matrix-normalization

Use when normalizing bulk gene or protein expression matrices with log2 transform, z-score standardization, or min-max scaling before downstream visualization or exploratory analysis. NOT for count-model normalization such as TPM/DESeq2 size factors, batch correction, or single-cell preprocessing.

aipoch/medical-research-skills · 63 tokens

by-campaign-optimizer

Multi-round design campaigns generate scored designs at every iteration. This skill turns that scoring history into actionable parameter changes for the next round — training a lightweight Random Forest on the designs you already have, ranking which features actually discriminate good from bad, and proposing…

001TMF/blatant-why · 5 tokens

protenix

Protenix v1 is an AF3-class structure prediction model (368M parameters) for proteins, complexes, and protein-ligand systems. This skill wraps the protenix CLI with a documented input spec, an input-validating Python entry point, and a multi-seed ensemble aggregator so that callers can drive predictions through…

001TMF/blatant-why · 3 tokens

fragment-based-count-matrix-generation

Use when you have a backed AnnData object containing processed fragment data (stored in .obsm['fragmentpaired'] or .

HolobiomicsLab/asb-skill-collections · 33 tokens