Guide · Agent skill
How to use the gsmm-builder agent skill: genome-scale metabolic models
Updated · written with AI from the project's own documentation and checked against our catalogue data
The gsmm-builder skill teaches an AI agent to create or load a genome-scale metabolic model (GSMM), a structured map of the chemical reactions in an organism, using the COBRApy Python library. This guide explains what the skill does, how to install it, how to ask for things in plain language, and what to check before trusting the output. After reading it, you should be able to set up the skill and get the agent to produce a model file ready for flux analysis.
Quick start
- 1Install the skill. Unzip the downloaded ZIP into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills.
- 2Install COBRApy. Make sure Python and the cobra library are available in the environment the agent uses.
- 3Ask for a model in plain language. Name the organism or model, such as iJO1366, and the output format, such as JSON or SBML.
- 4Check the objective. Confirm the biomass reaction is set as the objective and that its lower bound is 0.
- 5Set the medium. Describe the carbon source and whether growth is aerobic or anaerobic so exchange bounds are set correctly.
- 6Review and run the code. Read the generated script, then run model.optimize() and check the solution status.
- 7Export the model. Save the model with save_json_model or write_sbml_model into your output folder.
What is an agent skill, and what does gsmm-builder make the agent do?
An agent skill is a folder of instructions and supporting files that an AI agent loads when a task matches the skill's description. The gsmm-builder skill covers one domain: metabolic models built with COBRApy.
Once installed, the agent can load a published model such as E. coli iJO1366 from the BIGG database, build a small toy model from scratch, set growth medium limits, set a biomass objective, and save the result as JSON or SBML for later flux balance analysis (FBA). The skill also includes reference notes on naming conventions and common failure modes.
- Load a curated BIGG model from a local SBML or JSON file
- Build a minimal model with metabolites, exchange, transport and biomass reactions
- Set medium constraints such as glucose uptake and oxygen availability
- Set a biomass objective function and check the model optimises
- Export the model as .json or .xml
How do you install the gsmm-builder skill?
Download the skill ZIP from this page and unzip it. You can install it for yourself across all projects or for a single project.
For a personal install, unzip into ~/.claude/skills/. For a project install, unzip into the project's .claude/skills/ folder. If you use the Claude apps instead, upload the ZIP under Settings → Capabilities → Skills.
The skill folder contains SKILL.md, references/cobra_reference.md and templates/minimal_model.py.
- Personal: ~/.claude/skills/
- Project: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
What do you need before you start?
The skill needs Python and the COBRApy library (imported as cobra). It also needs either internet access to download BIGG models, or a model file you have already saved locally. The skill runs scripts and uses the network, so read the safety section before use.
- Python installed
- COBRApy library (cobra) installed
- Internet access to download BIGG models, or a locally saved model file
How do you ask the agent to use the skill?
You do not need to name the skill. Describe the metabolic task in plain language and mention the organism, model or goal. The skill's trigger keywords include metabolic, metabolism, GSMM, COBRApy, COBRA, BIGG, genome-scale model, stoichiometric model, model loading and medium constraints.
Good requests name the outcome you want. For example, ask the agent to load iJO1366 and save it as JSON, or to build a toy glycolysis model and set biomass as the objective. Stating the medium (aerobic or anaerobic, which carbon source) helps the agent set the right bounds.
- "Load the BIGG model iJO1366 and save it as JSON in output/."
- "Build a toy glycolysis model in COBRApy and set biomass as the objective."
- "Set up an aerobic M9 glucose medium for my E. coli model and export it to SBML."
- "My COBRApy model returns infeasible. Check the medium and exchange reactions."
How does the workflow run, step by step?
The skill follows four steps. First it decides whether to load an existing model or build one. Next it sets the objective function, which is usually the biomass reaction. Then it defines the growth medium by setting exchange reaction bounds. Finally it exports the model.
Loading uses cobra.io.read_sbml_model for SBML files or cobra.io.load_json_model for JSON files. Exporting uses cobra.io.save_json_model and cobra.io.write_sbml_model. The skill's reference file lists these functions along with optimize, pfba and gene deletion helpers.
- Key BIGG IDs in the skill: iJO1366 (E. coli K-12 MG1655), Recon3D (Homo sapiens), iMM904 (S. cerevisiae), iNJ661 (M. tuberculosis)
- Conventions: metabolite IDs look like glc__D_c; compartments are c, e, m and n; exchange reactions start with EX_
- Uptake uses a negative lower bound; secretion uses a positive upper bound
cobra.io.save_json_model(model, "output/my_model.json")
cobra.io.write_sbml_model(model, "output/my_model.xml")What are the safety notes for scripts and network access?
This skill runs Python scripts and uses the network to download BIGG models. Review any generated code before running it, especially scripts that write files or fetch URLs. The skill's BIGG download examples use plain HTTP URLs from bigg.ucsd.edu, so check the source yourself before relying on them.
The models are simplified research tools. The skill provides no validation against experimental data, so do not use its output for clinical or diagnostic decisions.
- Read generated scripts before running them
- Confirm the files you download are the models you expect
- Do not use outputs for clinical or diagnostic decisions
What tips and failure modes should you know?
Most problems come from the medium or the objective. If the model is infeasible, check that the needed exchange reactions exist and are not closed. If growth is negative, check that the biomass reaction's lower bound is 0. If metabolites are produced but never consumed, the skill suggests running gsmm-validator before FBA.
- Infeasible model: missing exchange reaction or closed medium; run model.optimize() and check solution.status
- Negative growth: objective direction inverted; keep biomass lower bound at 0
- Dead-end metabolites: run gsmm-validator before FBA
- Anaerobic growth: set EX_o2_e lower bound to 0
What people use it for
- Scaffolding a COBRApy flux balance analysis exercise for a computational biology course
- Loading the E. coli iJO1366 model and saving it for later flux analysis
- Building a small toy metabolic model to test how bounds change growth
- Setting an aerobic or anaerobic medium before running FBA
- Starting a metabolic modelling pipeline that later passes models to downstream tools
Frequently asked questions
How do I install the gsmm-builder skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.
Is the gsmm-builder skill free?
The skill is listed under the MIT licence in its source repository. Check the licence file in the repository for the exact terms before reusing it.
What do I need to run gsmm-builder?
You need Python, the COBRApy library (cobra), and either internet access to download BIGG models or a model file saved locally. The skill runs scripts and uses the network.
Which models can the skill load?
The skill names iJO1366 (E. coli K-12 MG1655), Recon3D (human), iMM904 (yeast) and iNJ661 (M. tuberculosis) as key BIGG IDs, and can also load a model from a local SBML or JSON file.
Why does my COBRApy model come back infeasible?
The skill points to a missing exchange reaction or a closed medium as the usual cause. Run model.optimize() and check solution.status, then confirm the exchange reactions you need exist and are open.
How does gsmm-builder compare with other COBRApy workflows?
The skill focuses on the scaffolding steps: loading, building a toy model, setting medium and objective, and exporting. It does not claim validation against experimental data, so you should review its output yourself and use a dedicated validator where needed.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use gsmm-builder if you are learning flux balance analysis or want an agent to scaffold a COBRApy workflow, and you are comfortable reading and checking Python code. Pick something else if you need a finished, validated analysis or clinical-grade output, because the skill's models are simplified research tools without experimental validation.
Download the skill