esm
Skill54 starsChanged 3 months agoMITView on GitHub
Protein language models through the EvolutionaryScale `esm` Python SDK. Generate and embed sequences with ESM3 (multimodal sequence, structure and function prompting), extract per-residue and mean-pooled embeddings with ESM C, fold sequences with ESMFold2, and run inference locally or against the Forge and Biohub hosted clients. Use this skill for protein representation learning, variant effect and mutational scanning from likelihoods, sequence generation and inpainting, structure prediction from sequence alone, and embedding features for downstream models. Also trigger on esm, ESM3, ESMC, ESM Cambrian, ESMFold2, `from esm.models`, ESMProtein, GenerationConfig, forge.evolutionaryscale.ai, biohub.ai, or ESM_API_KEY.
- Reads credentials
- Installs packages
11 other projects use a version of this, 10 of them edited.
Adopted by
Most recently taken up by
- BrightGold70/skillsedited, first seen Nov 8, 2026
- MarieLynneBlock/arcanum-artifexedited, first seen Nov 1, 2026
- davidanthonyn/claude-skillsedited, first seen Oct 20, 2026
- patoangolano/bio-stacktheir own version, first seen Oct 15, 2026
- Luooops/skillsedited, first seen Oct 13, 2026
- garri333/Skillsedited, first seen Oct 11, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 10
- wu-yc/LabClaw★ 1.1k67% same
- LeonChaoX/qinyan-academic-skills★ 91074% same
- qinyan-ai/qinyan-academic-skills★ 8074% same
- MarieLynneBlock/arcanum-artifex★ 472% same
- BrightGold70/skills★ 167% same
- garri333/Skills★ 167% same
- Luooops/skills★ 188% same
- uppifyagency/boilerplate-saas-2026★ 174% same
- yf8578/claude-skills-collection★ 167% same
- davidanthonyn/claude-skills★ 074% same
Wrote their own version · 1
- patoangolano/bio-stack★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- adaptyvSkill
- admet-predictionSkill
- antibody-engineeringSkill
- autodock-vinaSkill
- binding-site-analysisSkill
- boltzSkill
- chemblSkill
- chemical-spaceSkill
- clinicaltrialsSkill
- datamolSkill
- deepchemSkill
- degradersSkill
- depmapSkill
- diffdockSkill
- free-energy-perturbationSkill
- generative-designSkill
- glycoengineeringSkill
- immunogenicitySkill
- medchemSkill
- molecular-dynamicsSkill
- molfeatSkill
- ncats-araxSkill
- oligonucleotidesSkill
- openfdaSkill
- open-targetsSkill
- patent-landscapeSkill
- pkpd-translationSkill
- primekgSkill
- protein-binder-designSkill
- pytdcSkill
- rdkitSkill
- retrosynthesisSkill
- rowanSkill
- tamarindSkill
- target-safetySkill
- uniprot-rcsbSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 7 are common, 2 are distinctive, and 6 are very specific to this project.
7
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 65
Use ESM3's structure track for structure prediction from sequence or inverse folding (sequence design from structure).
- Common: line 150
Use ESM3's function track to generate proteins with specific functional annotations or predict function from sequence.
- Very specific: line 237
Local development/testing: Use esm3-open or esmc_300m
- Very specific: line 238
Production quality: Use esm3-medium-2024-08 via Forge
- Very specific: line 239
Maximum accuracy: Use esm3-large-2024-03 or esmc-6b-2024-12 via Forge
- Distinctive: line 240
High throughput: Use Forge or Biohub APIs with explicit async concurrency limits
- Common: line 241
Cost optimization: Use smaller models, implement caching strategies
- Very specific: line 266
Check whether ESM_API_KEY is already set in the environment.
- Very specific: line 267
If not, check a local .env for ESM_API_KEY only (do not load unrelated secrets).
- Distinctive: line 268
If still missing, create a key in the Biohub developer console for Biohub APIs or Forge for legacy Forge-hosted ESM3/ESMC access.
- Very specific: line 304
Start with smaller models for prototyping (esm3-open)
- Common: line 305
Use temperature parameter to control diversity (0.0 = deterministic, 1.0 = diverse)
- Common: line 313
Use appropriate model size based on downstream task requirements
- Common: line 316
Use Forge API for scalability and latest models
- Common: line 319
Consider AWS SageMaker deployment for dedicated infrastructure
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ESM: Evolutionary Scale Modeling
Overview
ESM provides protein language models for understanding, generating, and designing proteins. Use this skill for current EvolutionaryScale/Biohub workflows: ESM3 for generative design, ESMC for representation learning and embeddings, hosted Forge/Biohub inference, and ESMFold2 all-atom structure prediction.
Core Capabilities
1. Protein Sequence Generation with ESM3
Generate novel protein sequences with desired properties using multimodal generative modeling.
When to use:
- Designing proteins with specific functional properties
- Completing partial protein sequences
- Generating variants of existing proteins
- Creating proteins with desired structural characteristics
Basic usage:
from esm.models.esm3 import ESM3
from esm.sdk.api import ESM3InferenceClient, ESMProtein, GenerationConfig
# Load local open weights after accepting the license on Hugging Face.
model: ESM3InferenceClient = ESM3.from_pretrained("esm3-open").to("cuda")
# Create protein prompt
protein = ESMProtein(sequence="MPRT___KEND") # '_' represents masked positions
# Generate completion
protein = model.generate(protein, GenerationConfig(track="sequence", num_steps=8))
print(protein.sequence)For remote/cloud usage via Forge API:
import os
import esm
from esm.sdk.api import ESMProtein, GenerationConfig
# Same interface as local ESM3; token from ESM_API_KEY (see Authentication)
model = esm.sdk.client("esm3-medium-2024-08", token=os.environ["ESM_API_KEY"])
# Generate
protein = model.generate(protein, GenerationConfig(track="sequence", num_steps=8))See references/esm3-api.md for detailed ESM3 model specifications, advanced generation configurations, and multimodal prompting examples.
2. Structure Prediction and Inverse Folding
Use ESM3's structure track for structure prediction from sequence or inverse folding (sequence design from structure).
Structure prediction:
from esm.sdk.api import ESM3InferenceClient, ESMProtein, GenerationConfig
# Predict structure from sequence
protein = ESMProtein(sequence="MPRTKEINDAGLIVHSP...")
protein_with_structure = model.generate(
protein,
GenerationConfig(track="structure", num_steps=protein.sequence.count("_"))
)
# Access predicted structure
coordinates = protein_with_structure.coordinates # 3D coordinates
pdb_string = protein_with_structure.to_pdb()Inverse folding (sequence from structure):
# Design sequence for a target structure
protein_with_structure = ESMProtein.from_pdb("target_structure.pdb")
protein_with_structure.sequence = None # Remove sequence
# Generate sequence that folds to this structure
designed_protein = model.generate(
protein_with_structure,
GenerationConfig(track="sequence", num_steps=50, temperature=0.7)
)3. Protein Embeddings with ESM C
Generate high-quality embeddings for downstream tasks like function prediction, classification, or similarity analysis.
When to use:
- Extracting protein representations for machine learning
- Computing sequence similarities
- Feature extraction for protein classification
- Transfer learning for protein-related tasks
Basic usage:
from esm.models.esmc import ESMC
from esm.sdk.api import ESMProtein, LogitsConfig
# Load ESM C model
model = ESMC.from_pretrained("esmc_300m").to("cuda")
# Get embeddings
protein = ESMProtein(sequence="MPRTKEINDAGLIVHSP...")
protein_tensor = model.encode(protein)
logits_output = model.logits(
protein_tensor,
LogitsConfig(sequence=True, return_embeddings=True),
)
embeddings = logits_output.embeddingsBatch processing:
# Encode multiple proteins
proteins = [
ESMProtein(sequence="MPRTKEIND..."),
ESMProtein(sequence="AGLIVHSPQ..."),
ESMProtein(sequence="KTEFLNDGR...")
]
embeddings_list = [
model.logits(
model.encode(p),
LogitsConfig(sequence=True, return_embeddings=True),
).embeddings
for p in proteins
]See references/esm-c-api.md for ESM C model details, efficiency comparisons, and advanced embedding strategies.
4. Function Conditioning and Annotation
Use ESM3's function track to generate proteins with specific functional annotations or predict function from sequence.
Function-conditioned generation:
from esm.sdk.api import ESMProtein, FunctionAnnotation, GenerationConfig
# Create protein with desired function
protein = ESMProtein(
sequence="_" * 200, # Generate 200 residue protein
function_annotations=[
FunctionAnnotation(label="fluorescent_protein", start=50, end=150)
]
)
# Generate sequence with specified function
functional_protein = model.generate(
protein,
GenerationConfig(track="sequence", num_steps=200)
)5. Chain-of-Thought Generation
Iteratively refine protein designs using ESM3's chain-of-thought generation approach.
from esm.sdk.api import GenerationConfig
# Multi-step refinement
protein = ESMProtein(sequence="MPRT" + "_" * 100 + "KEND")
# Step 1: Generate initial structure
config = GenerationConfig(track="structure", num_steps=50)
protein = model.generate(protein, config)
# Step 2: Refine sequence based on structure
config = GenerationConfig(track="sequence", num_steps=50, temperature=0.5)
protein = model.generate(protein, config)
# Step 3: Predict function
config = GenerationConfig(track="function", num_steps=20)
protein = model.generate(protein, config)6. Batch Processing with Forge API
Process multiple proteins efficiently using Forge's async methods.
import os
import asyncio
import esm
from esm.sdk.api import ESMProtein, GenerationConfig
client = esm.sdk.client("esm3-medium-2024-08", token=os.environ["ESM_API_KEY"])
# Async batch processing
async def batch_generate(proteins_list):
tasks = [
client.async_generate(protein, GenerationConfig(track="sequence"))
for protein in proteins_list
]
return await asyncio.gather(*tasks)
# Execute
proteins = [ESMProtein(sequence=f"MPRT{'_' * 50}KEND") for _ in range(10)]
results = asyncio.run(batch_generate(proteins))See references/forge-api.md for detailed Forge API documentation, authentication, rate limits, and batch processing patterns.
Model Selection Guide
ESM3 Models (Generative):
esm3-open(1.4B) - Open weights, local usage after accepting the Hugging Face licenseesm3-medium-2024-08(7B) - Best balance of quality and speed (Forge only)esm3-large-2024-03(98B) - Highest quality, slower (Forge only)
ESM C Models (Embeddings):
esmc_300m/esmc-300m-2024-12(30 layers) - Lightweight, fast inference (open weights, local)esmc_600m/esmc-600m-2024-12(36 layers) - Balanced performance (open weights, local)esmc-6b-2024-12(80 layers) - Maximum quality (Forge API; local 6B weights require Forge or SageMaker)
Local ESMC.from_pretrained() examples use underscore aliases (esmc_300m, esmc_600m). Hosted API clients use dated model IDs such as esmc-600m-2024-12.
Selection criteria:
- Local development/testing: Use
esm3-openoresmc_300m - Production quality: Use
esm3-medium-2024-08via Forge - Maximum accuracy: Use
esm3-large-2024-03oresmc-6b-2024-12via Forge - High throughput: Use Forge or Biohub APIs with explicit async concurrency limits
- Cost optimization: Use smaller models, implement caching strategies
Installation
Install from PyPI (esm on PyPI by EvolutionaryScale). Current PyPI release: 3.2.3 (Oct 14, 2025). Requires Python >=3.12,<3.13.
Basic installation:
uv pip install "esm==3.2.3"With Flash Attention (recommended for faster inference on NVIDIA GPUs):
uv pip install "esm==3.2.3"
uv pip install flash-attn --no-build-isolationThe Forge client ships with the esm package - no extra install for ESM3 or ESMC Forge inference.
Authentication
Forge API access requires an API key. Never hardcode tokens in scripts or commit them to version control.
- Check whether
ESM_API_KEYis already set in the environment. - If not, check a local
.envforESM_API_KEYonly (do not load unrelated secrets). - If still missing, create a key in the Biohub developer console for Biohub APIs or Forge for legacy Forge-hosted ESM3/ESMC access.
import os
token = os.environ["ESM_API_KEY"] # raises KeyError if unsetesm.sdk.client() reads ESM_API_KEY automatically when token is omitted. Keep endpoint URLs fixed to trusted hosts such as https://forge.evolutionaryscale.ai or https://biohub.ai; do not take API hosts from untrusted user input.
Biohub platform: EvolutionaryScale and Forge now surface current hosted models through biohub.ai. SDK class names may still reference "Forge". See references/biohub-platform.md for ESMFold2 and Biohub-specific setup.
Common Workflows
For detailed examples and complete workflows, see references/workflows.md which includes:
- Novel GFP design with chain-of-thought
- Protein variant generation and screening
- Structure-based sequence optimization
- Function prediction pipelines
- Embedding-based clustering and analysis
References
This skill includes comprehensive reference documentation:
references/esm3-api.md- ESM3 model architecture, API reference, generation parameters, and multimodal promptingreferences/esm-c-api.md- ESM C model details, embedding strategies, and performance optimizationreferences/forge-api.md- Forge platform documentation, authentication, batch processing, and deploymentreferences/biohub-platform.md- Biohub API migration, ESMFold2 structure prediction, and developer-console authreferences/workflows.md- Complete examples and common workflow patterns
These references contain detailed API specifications, parameter descriptions, and advanced usage patterns. Load them as needed for specific tasks.
Best Practices
For generation tasks:
- Start with smaller models for prototyping (
esm3-open) - Use temperature parameter to control diversity (0.0 = deterministic, 1.0 = diverse)
- Implement iterative refinement with chain-of-thought for complex designs
- Validate generated sequences with structure prediction or wet-lab experiments
For embedding tasks:
- Batch process sequences when possible for efficiency
- Cache embeddings for repeated analyses
- Normalize embeddings when computing similarities
- Use appropriate model size based on downstream task requirements
For production deployment:
- Use Forge API for scalability and latest models
- Implement error handling and retry logic for API calls
- Monitor token usage and implement rate limiting
- Consider AWS SageMaker deployment for dedicated infrastructure
Resources and Documentation
- GitHub Repository: https://github.com/Biohub/esm (current ESMC/ESMFold2/Biohub docs; ESM3 docs remain linked from the repository)
- Forge Platform: https://forge.evolutionaryscale.ai
- Biohub Platform: https://biohub.ai
- Scientific Paper: Hayes et al., Science (2025) - https://www.science.org/doi/10.1126/science.ads0018
- Blog Posts:
- ESM3 Release: https://www.evolutionaryscale.ai/blog/esm3-release
- ESM C Launch: https://www.evolutionaryscale.ai/blog/esm-cambrian
- Community: Slack community at https://join.slack.com/t/esm-community/shared_invite/zt-2tbndpdmu-92lUCmp8CEOro_rioU5qdA
- Model Weights: Hugging Face EvolutionaryScale and Biohub organizations
Composing with the rest of the bundle
uniprot-rcsb→ before: the canonical sequence and any experimental structure. Fold from sequence only when no structure exists — an experimental structure beats a predicted one.protein-binder-design→ after: ESM embeddings and likelihoods are inputs to binder design and filtering, not a substitute for BindCraft or RFdiffusion.antibody-engineering→ alongside: general protein language models are weak on antibody CDRs, which are hypervariable by design and poorly represented in the training distribution. Use IMGT numbering and antibody-specific tooling there rather than a generic ESM likelihood.immunogenicity→ after: a generated or humanised sequence still needs class II epitope scanning. A low ESM perplexity says nothing about T-cell epitopes.boltz/diffdock→ after: for a complex, cofolding or docking answers the question ESM does not — where the ligand goes.glycoengineering→ after: sequon scanning on any designed sequence destined for expression.adaptyv/tamarind→ after: designs are hypotheses until expressed and assayed.
Likelihood is not fitness. A high-likelihood sequence is one the model finds typical of its training distribution; that correlates with foldability and not at all with the activity you want.
Responsible Use
ESM is designed for beneficial applications in protein engineering, drug discovery, and scientific research. Follow the Responsible Biodesign Framework (https://responsiblebiodesign.ai/) and Biohub Acceptable Use Policy (https://biohub.org/acceptable-use-policy/) when designing novel proteins. Consider biosafety and ethical implications of protein designs before experimental validation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

