Agent skill

Genome-Scale Metabolic Model Builder

by aiming-lab in aiming-lab/AutoResearchClaw

Builds or loads a genome-scale metabolic model in COBRApy, sets its growth medium and objective, and exports it as a validated JSON file for flux analysis.

MITAuto-check passedResearch & Science

Install Genome-Scale Metabolic Model Builder

skills CLI
$ npx skills add aiming-lab/AutoResearchClaw --skill gsmm-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aiming-lab/AutoResearchClaw gsmm-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aiming-lab/AutoResearchClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/external/agents/Biology-Agent/skills/gsmm-builder .claude/skills/gsmm-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gsmm-builder
GitHub stars
15k
Token cost
~1.4k tokens
SKILL.md length
270 words
Files
3 (incl. references)
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Builds or loads a genome-scale metabolic model in COBRApy, sets its growth medium and objective, and exports it as a validated JSON file for flux analysis.

  • Works in 4 steps: Decide: Load Existing or Build from… → Set the Objective Function → Define the Growth Medium → …
  • Loading a curated organism model from the BIGG database for flux analysis
  • SKILL.md covers Overview, Workflow and Key Conventions
  • Runs Python scripts from its folder; calls curl; reaches bigg.ucsd.edu

What it does

Serves as the entry point for a metabolic flux analysis pipeline, either loading a curated model from the BIGG database by its id, such as the E. coli model iJO1366 or the human model Recon3D, or constructing a minimal toy model from scratch with its own metabolites and reactions. Either path ends with setting a biomass or growth reaction as the optimization objective, since constraints on reaction bounds, medium composition and that objective are what turn the raw stoichiometric matrix into a solvable linear program.

The growth medium is defined as a dictionary of exchange reaction bounds, for example a negative lower bound on glucose uptake for an aerobic M9 minimal medium, following fixed conventions throughout: metabolite ids combine a BIGG id with a compartment suffix, exchange reactions are prefixed `EX_`, a negative lower bound means import and a positive upper bound means export, and an aerobic medium allows oxygen uptake while an anaerobic one sets it to zero.

The finished model is exported with COBRApy's own JSON serializer, producing the validated file every downstream flux balance analysis step consumes, and models can also be pulled directly from BIGG's REST API when a local copy isn't already available.

When your agent uses it

  • Loading a curated organism model from the BIGG database for flux analysis
  • Building a minimal toy metabolic model from scratch
  • Setting an aerobic or anaerobic growth medium for a metabolic model
  • Exporting a COBRApy model as a validated JSON file

Example prompts

  • “Load the iJO1366 E. coli model and set an aerobic M9 minimal medium.”
  • “Build a minimal toy glycolysis model from scratch in COBRApy.”
  • “Export this model to JSON and set its biomass reaction as the objective.”

Requirements

  • COBRApy

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Decide: Load Existing or Build from Scratch
  2. Set the Objective Function
  3. Define the Growth Medium
  4. Export Model

What it can do on your machine

Read from SKILL.md and the folder at commit be4ba47. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • bigg.ucsd.edu

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Genome-Scale Metabolic Model Builder loads about 1.4k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 55 tokens; SKILL.md has 270 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aiming-lab/AutoResearchClaw at commit be4ba47, republished under its MIT licence (© aiming-lab). 270 words, ~1,410 tokens.

Download SKILL.mdSave it as .claude/skills/gsmm-builder/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
gsmm-builder
description
Build or load a genome-scale metabolic model (GSMM) using COBRApy. Covers loading from BIGG, constructing minimal models from scratch, setting medium constraints, and exporting validated .json model files.
metadata.category
domain
metadata.trigger-keywords
metabolic,metabolism,GSMM,COBRApy,COBRA,BIGG,genome-scale model,stoichiometric model,model loading,medium constraints
metadata.applicable-stages
9,10,11,12,13
metadata.priority
2

Overview

The gsmm-builder skill constructs or loads genome-scale metabolic models (GSMMs) in the COBRApy framework. It is the entry point for every metabolic flux analysis pipeline. Output is a validated COBRApy Model object serialized to a JSON file ready for downstream FBA and flux analysis.

GSMMs encode every known metabolic reaction in an organism as a stoichiometric matrix. Constraints (reaction bounds, medium composition, objective function) turn the model into a solvable linear program.


Workflow

Step 1 — Decide: Load Existing or Build from Scratch

Option A: Load a curated BIGG model

python
import cobra
import cobra.io

# Load E. coli iJO1366 from a local SBML file
model = cobra.io.read_sbml_model("iJO1366.xml")

# Or load from a pre-downloaded JSON file
model = cobra.io.load_json_model("iJO1366.json")

print(f"Loaded {model.id}: {len(model.reactions)} reactions, "
      f"{len(model.metabolites)} metabolites, {len(model.genes)} genes")

Key BIGG model IDs:

  • iJO1366 — E. coli K-12 MG1655 (2583 reactions)
  • Recon3D — Homo sapiens (13543 reactions)
  • iMM904 — S. cerevisiae (1577 reactions)
  • iNJ661 — M. tuberculosis (1049 reactions)

Option B: Build a minimal model from scratch

python
from cobra import Model, Metabolite, Reaction

model = Model("toy_glycolysis")

# Define metabolites with compartments and formula
glc_e = Metabolite("glc__D_e", formula="C6H12O6", name="D-Glucose",
                   compartment="e")
glc_c = Metabolite("glc__D_c", formula="C6H12O6", name="D-Glucose",
                   compartment="c")
atp_c = Metabolite("atp_c",  formula="C10H12N5O13P3", name="ATP",
                   compartment="c")
biomass = Metabolite("biomass", formula="", name="Biomass", compartment="c")

# Build reactions
ex_glc = Reaction("EX_glc__D_e")
ex_glc.lower_bound = -10.0  # uptake (negative = import)
ex_glc.upper_bound = 0.0
ex_glc.add_metabolites({glc_e: 1.0})

transport = Reaction("GLCt")
transport.lower_bound = -1000.0
transport.upper_bound = 1000.0
transport.add_metabolites({glc_e: -1.0, glc_c: 1.0})

# Stoichiometry: 1 glucose + ADP -> 2 ATP (simplified glycolysis)
glycolysis = Reaction("GLYCOLYSIS")
glycolysis.lower_bound = 0.0
glycolysis.upper_bound = 1000.0
glycolysis.add_metabolites({glc_c: -1.0, atp_c: 2.0})

biomass_rxn = Reaction("BIOMASS")
biomass_rxn.lower_bound = 0.0
biomass_rxn.upper_bound = 1000.0
biomass_rxn.add_metabolites({atp_c: -10.0, biomass: 1.0})

model.add_reactions([ex_glc, transport, glycolysis, biomass_rxn])
Step 2 — Set the Objective Function
python
# Set biomass as the optimization target
model.objective = "BIOMASS_Ec_iJO1366_core_53p95M"  # reaction ID string

# Verify objective is set
print(model.objective.to_json())
Step 3 — Define the Growth Medium
python
# M9 minimal medium with glucose (aerobic)
M9_MEDIUM = {
    "EX_glc__D_e": -10.0,   # glucose uptake, mmol/gDW/h
    "EX_o2_e":    -20.0,    # oxygen (aerobic)
    "EX_nh4_e":  -1000.0,   # ammonium (unlimited)
    "EX_pi_e":   -1000.0,   # phosphate (unlimited)
    "EX_so4_e":  -1000.0,   # sulfate (unlimited)
    "EX_h2o_e":  -1000.0,   # water (unlimited)
    "EX_h_e":    -1000.0,   # protons (unlimited)
}

# Apply medium: close all exchange reactions first, then open selected
medium = model.medium  # returns dict of current open exchange lb magnitudes
for rxn_id, lb in M9_MEDIUM.items():
    if rxn_id in model.reactions:
        model.reactions.get_by_id(rxn_id).lower_bound = lb

# Anaerobic: set O2 uptake to zero
# model.reactions.get_by_id("EX_o2_e").lower_bound = 0.0
Step 4 — Export Model
python
import cobra.io

cobra.io.save_json_model(model, "output/my_model.json")
cobra.io.write_sbml_model(model, "output/my_model.xml")
print("Model saved.")

Key Conventions

ConventionDetail
Metabolite ID format<bigg_id>_<compartment> e.g. glc__D_c, atp_m
Compartment codesc cytosol, e extracellular, m mitochondria, n nucleus
Exchange reaction prefixEX_ e.g. EX_glc__D_e
Transport reaction prefixt or species-specific e.g. GLCt, PGI
Uptake bound signNegative lower bound = import (e.g. lb = -10)
Secretion bound signPositive upper bound = export (e.g. ub = 1000)
Biomass objectiveReaction with ID containing BIOMASS or Growth
Aerobic mediumEX_o2_e lb = -20 (mmol/gDW/h)
Anaerobic mediumEX_o2_e lb = 0
Default irreversible rxnlb = 0, ub = 1000
Default reversible rxnlb = -1000, ub = 1000
BIGG Database Downloads
bash
# Download model directly from BIGG REST API
curl -O "http://bigg.ucsd.edu/static/models/iJO1366.json"
curl -O "http://bigg.ucsd.edu/static/models/Recon3D.json"
Common Failure Modes
  • Infeasible model: missing exchange reaction or closed medium — run model.optimize() and check solution.status == "infeasible".
  • Negative growth: objective reaction direction inverted — ensure biomass_rxn.lower_bound = 0.
  • Dead-end metabolites: metabolite produced but never consumed — run gsmm-validator before FBA.

© aiming-lab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in external/agents/Biology-Agent/skills/gsmm-builder of aiming-lab/AutoResearchClaw.

  • SKILL.md
  • references/cobra_reference.md
  • templates/minimal_model.py

Open the folder on GitHubat commit be4ba47

Compare with similar skills

Genome-Scale Metabolic Model Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Genome-Scale Metabolic Model Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Genome-Scale Metabolic Model Builder this skillaiming-lab/AutoResearchClaw15k—~1.4kAutomated safety check: PassMIT
Dbsnp Databasegoogle-deepmind/science-skills3.2k3 repos~3.4kAutomated safety check: NotesApache-2.0
13C Metabolic Flux AnalysisK-Dense-AI/scientific-agent-skills48k1 repos~3.2kAutomated safety check: PassMIT
Alphagenome Single Variant Analysisgoogle-deepmind/science-skills3.2k2 repos~3kAutomated safety check: NotesApache-2.0
Singlecell Qcxuzhougeng/wisp-science1k—~1.6kAutomated safety check: PassAGPL-3.0
Paper Expert Generatorguhaohao0991/PaperClaw250—~2kAutomated safety check: PassNone

Similar skills

  • Dbsnp Database

    google-deepmind/science-skills

    A skill your agent uses when you want to look up, map, and search for short genetic variants (SNPs, indels) in NCBI's dbSNP database.

    3.2k GitHub starsUsed in 3 repos~3.4k tokens
    Research & ScienceAuto-check: notes
  • 13C Metabolic Flux Analysis

    K-Dense-AI/scientific-agent-skills

    Estimates reaction fluxes inside cells from steady-state carbon-13 labeling data with a bundled mfapy-based solver, and reports which fluxes the data pin down.

    48k GitHub starsUsed in 1 repo~3.2k tokens
    Research & ScienceAuto-check passed
  • Alphagenome Single Variant Analysis

    google-deepmind/science-skills

    Analyzes genetic variant effects on gene expression (RNA-seq), chromatin accessibility (DNASE), histone marks (ChIP), and transcription factors using the AlphaGenome API.

    3.2k GitHub starsUsed in 2 repos~3k tokens
    Research & ScienceAuto-check: notes
  • Singlecell Qc

    xuzhougeng/wisp-science

    A skill your agent uses when designing, reviewing, or implementing single-cell RNA-seq QC in Python or R with a human-in-the-loop, data-driven approach.

    1k GitHub stars~1.6k tokensUpdated today
    Research & ScienceAuto-check passed
  • Paper Expert Generator

    guhaohao0991/PaperClaw

    Generate a specialized domain-expert research agent modeled on PaperClaw architecture.

    250 GitHub stars~2k tokensUpdated 7 mo ago
    Research & ScienceAuto-check passed
  • Borzoi

    JimLiu/science-skills

    Predict genome-wide functional tracks (RNA-seq, CAGE, DNase, ChIP) from DNA sequence with Borzoi.

    227 GitHub starsUsed in 4 repos~973 tokens
    Research & ScienceAuto-check passed

More from aiming-lab/AutoResearchClaw

All 34 skills in this repo
  • A-Evolve Agent Improvement

    aiming-lab/AutoResearchClaw

    Diagnoses where an agent failed across runs and turns the findings into new skills, system prompt patches and knowledge entries, using the A-Evolve loop.

    15k GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Metabolic Study Planner

    aiming-lab/AutoResearchClaw

    Turns a broad metabolic modelling topic into a concrete, paper-shaped plan with organism, model, perturbations, metrics and figures before any FBA code is written.

    15k GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • MFA Pipeline Orchestrator

    aiming-lab/AutoResearchClaw

    Runs a metabolic flux analysis from model loading to phenotype prediction and figures by handing work to four sub-agents in sequence.

    15k GitHub stars~923 tokensUpdated 1 mo ago
    Auto-check passed
  • Qiskit 2.x Quantum ML Reference

    aiming-lab/AutoResearchClaw

    Reference patterns for writing qiskit 2.x code for variational quantum machine learning: feature maps, VQC training, VQE for chemistry, MPS circuits and noise models.

    15k GitHub stars~4.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Biopython Bioinformatics

    aiming-lab/AutoResearchClaw

    Quick reference for Biopython work: sequence operations, SeqIO file parsing, BLAST searches, Entrez queries, phylogenetic trees and PDB structure analysis.

    15k GitHub stars~810 tokensUpdated 1 mo ago
    Auto-check passed
  • RDKit Cheminformatics Practices

    aiming-lab/AutoResearchClaw

    Reference guide for working with molecules in RDKit: reading SMILES and SDF files, computing descriptors and fingerprints, and searching substructures.

    15k GitHub stars~708 tokensUpdated 1 mo ago
    Auto-check passed

Questions about Genome-Scale Metabolic Model Builder

What does Genome-Scale Metabolic Model Builder do?

Builds or loads a genome-scale metabolic model in COBRApy, sets its growth medium and objective, and exports it as a validated JSON file for flux analysis. Serves as the entry point for a metabolic flux analysis pipeline, either loading a curated model from the BIGG database by its id, such as the E. coli model iJO1366 or the human model Recon3D, or constructing a minimal toy model from scratch with its own metabolites and reactions.

When should I use Genome-Scale Metabolic Model Builder?

Genome-Scale Metabolic Model Builder fits situations like: loading a curated organism model from the BIGG database for flux analysis; building a minimal toy metabolic model from scratch; setting an aerobic or anaerobic growth medium for a metabolic model; exporting a COBRApy model as a validated JSON file.

How do I install Genome-Scale Metabolic Model Builder in Claude Code?

Run `npx skills add aiming-lab/AutoResearchClaw --skill gsmm-builder -a claude-code`. Or copy the skill folder (external/agents/Biology-Agent/skills/gsmm-builder in aiming-lab/AutoResearchClaw) into .claude/skills/gsmm-builder in your project. Claude Code loads it when a task matches its description.

How do I install Genome-Scale Metabolic Model Builder in Codex?

Run `npx skills add aiming-lab/AutoResearchClaw --skill gsmm-builder -a codex`. Or copy the skill folder (external/agents/Biology-Agent/skills/gsmm-builder in aiming-lab/AutoResearchClaw) into .agents/skills/gsmm-builder in your project. Codex loads it when a task matches its description.

Can I use Genome-Scale Metabolic Model Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aiming-lab/AutoResearchClaw --skill gsmm-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gsmm-builder, .gemini/skills/gsmm-builder, .github/skills/gsmm-builder and .opencode/skills/gsmm-builder in your project.

What does Genome-Scale Metabolic Model Builder need to run?

Going by SKILL.md and its folder, Genome-Scale Metabolic Model Builder needs Python for the scripts in its folder and the command-line tools its instructions call (curl). Our summary lists: COBRApy.

Does Genome-Scale Metabolic Model Builder access the network?

SKILL.md names 1 domain. In commands or code: bigg.ucsd.edu; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Genome-Scale Metabolic Model Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Genome-Scale Metabolic Model Builder use?

Genome-Scale Metabolic Model Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Genome-Scale Metabolic Model Builder use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Genome-Scale Metabolic Model Builder?

Skills that share tags, products or a category with Genome-Scale Metabolic Model Builder: Dbsnp Database (google-deepmind/science-skills, 3.2k stars), 13C Metabolic Flux Analysis (K-Dense-AI/scientific-agent-skills, 48k stars), Alphagenome Single Variant Analysis (google-deepmind/science-skills, 3.2k stars) and Singlecell Qc (xuzhougeng/wisp-science, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Genome-Scale Metabolic Model Builder?

aiming-lab (a GitHub organization) maintains it in aiming-lab/AutoResearchClaw, which has 14,595 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on August 19, 2026.

Source: aiming-lab/AutoResearchClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.