Guide · Agent skill
How to use the FBA Metabolic Simulator agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The fba-simulator skill teaches an AI agent to run constraint-based metabolic simulations, such as Flux Balance Analysis (FBA), on a COBRApy model you already have. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what it needs and cannot do. By the end you will be able to get the agent to run simulations and save the results as CSV and JSON files.
Quick start
- 1Download and unzip. Download the fba-simulator ZIP from this page and unzip it so the folder contains SKILL.md.
- 2Place or upload the skill. Copy the folder to ~/.claude/skills/ or a project's .claude/skills/, or upload the ZIP under Settings → Capabilities → Skills.
- 3Prepare a validated model. Make sure you have a validated COBRApy model file, such as my_model.json, and that Python, cobra and pandas are available.
- 4Ask in plain language. Request a specific analysis, for example FBA, pFBA, FVA, knockouts or a carbon source comparison, and name your model file.
- 5Check the output files. Review the CSV and JSON files the agent saves and confirm that statuses are optimal before trusting the numbers.
What the fba-simulator skill makes the agent do
The skill covers standard FBA, parsimonious FBA (pFBA), Flux Variability Analysis (FVA), loopless FBA, gene and reaction knockouts, and carbon source swapping. FBA finds the flux distribution (the rates of chemical reactions) that maximizes an objective, usually biomass, under stoichiometric and thermodynamic constraints. The skill is meant to be used after a model has been built and validated by other tools.
- Predict growth rate and flux distribution from a model file
- Find the most economical flux solution with pFBA
- Measure flexibility of each reaction with FVA
- Identify essential genes and reactions through single knockouts
- Compare growth on different carbon sources
- Save results as CSV and a JSON summary
How to install the fba-simulator skill
Download the skill ZIP from this page and unzip it. The skill folder contains a SKILL.md file. Put the unzipped folder in your personal skills directory, ~/.claude/skills/, or in a project's .claude/skills/ directory if you want it limited to one project.
You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
- Personal install: place the folder in ~/.claude/skills/
- Project install: place the folder in the project's .claude/skills/
- App install: upload the ZIP under Settings → Capabilities → Skills
What you need before you start
The skill starts from an existing model file. It does not build one. The example in the skill loads a file named my_model.json, so your model must be saved in COBRApy's JSON format and already validated. The skill refers to a separate model-building skill (gsmm-builder), which is not included here.
- Python
- The COBRApy library (cobra) and pandas
- A validated COBRApy model file, for example my_model.json
How to trigger the skill with natural requests
You do not need to name the skill. Mention the topic in your request and the agent can pick it up. The skill's trigger keywords include metabolic, FBA, pFBA, FVA, Flux Balance Analysis, COBRApy, knockout, carbon source, medium swap, flux distribution and growth rate. Name your model file so the agent knows what to load.
- "Load my_model.json and run FBA. Report the growth rate and glucose uptake."
- "Run pFBA on my_model.json and save the fluxes to a CSV."
- "Run FVA at 90% of maximum growth and list the rigid reactions."
- "Find the essential genes in my_model.json and export the results."
- "Compare growth on glucose, fructose, acetate, glycerol and succinate."
Run a basic FBA simulation
The first step loads the model and the second runs FBA. The skill reads the growth rate from the objective value and saves the full flux vector to fba_fluxes.csv.
import cobra
import cobra.io
model = cobra.io.load_json_model("my_model.json")
solution = model.optimize()
print(f"Growth rate : {solution.objective_value:.4f} h^-1")
solution.fluxes.to_csv("fba_fluxes.csv", header=["flux_mmol_gDW_h"])Outputs the skill saves
Each analysis writes its own file, so you can open the results in a spreadsheet or load them into another script. A summary file collects the scalar results from the runs.
- fba_fluxes.csv: standard FBA flux vector
- pfba_fluxes.csv: pFBA flux vector with minimum total flux
- fva_result.csv: minimum and maximum flux per reaction
- loopless_fluxes.csv: loopless flux vector
- gene_deletions.csv and reaction_deletions.csv: growth for each single knockout
- carbon_source_comparison.csv: growth across carbon sources
- simulation_summary.json: scalar summary of the runs
Safety, network and limits
This skill runs scripts, so read what the agent plans to execute before you approve it. It does not use the network. The outputs are simulation predictions. They need expert biological validation and are not suitable for clinical or medical decisions.
- Runs scripts: yes
- Uses network: no
- Simulations are predictions, not clinical results
Tips and common problems
If a solution reports status infeasible, the medium may be too restrictive or the objective reaction bounds may be wrong. The skill suggests running gsmm-validator first. For FVA, the skill recommends fraction_of_optimum of 0.9 and 4 parallel processes, and it notes that more than 8 is best avoided for small models. The skill also recommends loopless FBA for publication-grade results.
- Infeasible status: check the medium and objective bounds, then run gsmm-validator
- Use loopless FBA when results will be published
- Keep processes at 4 or your CPU count for FVA
What people use it for
- Predicting growth rate and glucose uptake for a validated E. coli model
- Finding essential genes for a metabolic engineering screen
- Comparing growth on five carbon sources for a culture planning study
- Running FVA to see which reactions are rigidly constrained
- Building a repeatable pipeline that exports standard COBRApy results
Frequently asked questions
How do I install the fba-simulator agent skill?
Download the skill ZIP from this page and unzip it. Place the folder in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
What do I need to run the fba-simulator skill?
You need Python, the COBRApy library (cobra), pandas, and a validated COBRApy model file. The skill starts from an existing model and does not build one. The example loads a file called my_model.json.
Is the fba-simulator skill free to use?
The skill is listed under the MIT licence. Check the licence file in the repository for the full terms. The skill itself does not state any price.
Does the fba-simulator skill need an internet connection?
The skill is listed as not using the network. It does run scripts, so review what the agent executes before you approve it.
Can the skill build a metabolic model from my genome?
No. The skill begins with a validated model file. It refers to a separate model-building skill called gsmm-builder, which is not included with this download.
Why does my FBA solution show status infeasible?
The skill's guidance says the medium may be too restrictive or the objective reaction bounds may be wrong. Run gsmm-validator on the model first, then rerun the simulation.
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 this skill if you already have a validated COBRApy model and want an agent to run standard FBA, pFBA, FVA, knockouts and carbon source comparisons with saved outputs. Pick something else if you need to build a model from scratch or need clinical or medical decisions, since the outputs are simulation predictions that require expert validation.
Download the skill