COBRApy Metabolic Modeling
Equips Claude Code to run FBA, FVA, knockout screens, and flux sampling on genome-scale metabolic models with COBRApy.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
Teaches Claude to drive COBRApy, the constraint-based reconstruction and analysis library, with accurate up-to-date syntax.
- Model I/O: SBML, JSON, YAML;
load_modelfor textbook, iJO1366, iML1515 and more - Simulation: FBA, pFBA, geometric FBA, FVA (including loopless)
- Design analysis: single/double gene and reaction deletions, production envelopes
- Media design: editing
model.medium, computingminimal_medium - Flux sampling (OptGP/ACHR) with sample validation, gapfilling, building models from scratch
- Solver notes (GLPK default, hybrid/HIGHS, optional CPLEX/Gurobi) plus troubleshooting tips
It emphasizes the context-manager pattern (with model:) so temporary edits revert automatically.
Who it's for
- Systems biology and metabolic engineering researchers or grad students
- Bioengineers screening strain designs and production pathways
- Anyone bitten by API changes across cobra 0.29–0.31
- Teams needing a reproducible FBA pipeline fast
Example uses
- Essential gene screen: "Run single_gene_deletion on the textbook model and export genes with growth < 0.01 to CSV."
- Anaerobic growth prediction: "In iML1515 set O2 uptake to 0 with 10 mmol/gDW/h glucose, then report growth rate and secretion fluxes."
- Acetate production limits: "Compute the EX_ac_e production envelope over glucose and oxygen and plot it with matplotlib."
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/cobrapy folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/cobrapy/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/cobrapy ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and confirm Python 3.9+ is available:
python3 --version - Install COBRApy:
uv pip install "cobra==0.31.1"(orpip install "cobra==0.31.1"if you don't use uv) - Clone the skill repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy the skill into Claude Code's skills folder:
mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/cobrapy ~/.claude/skills/ - Restart Claude Code and verify
cobrapyappears in your skill list. - Try a prompt like "Load the textbook model and compute growth rate with FBA" to trigger the skill.
- Genome-scale models such as iML1515 are fetched over the network, so the first run may take a while.
View source on GitHub ↗License: MIT