Cobrapy skill for Claude
Performs constraint-based metabolic modeling with COBRApy, including FBA, pFBA, FVA, gene knockouts, flux sampling, growth media, production envelopes, gap filling, and SBML model validation for systems biology and metabolic engineering.
Cobrapy SKILL.md
A preview of the skill file from K-Dense-AI/scientific-agent-skills (GPL-2.0 license).
COBRApy - Constraint-Based Reconstruction and Analysis
When to use
Use for loading/building metabolic networks, optimizing their steady-state fluxes, knockout screens, medium design, feasible-space sampling, and gap-filling hypotheses. FBA is a constraint-based prediction; it does not infer kinetic rates or establish experimental growth, thermodynamic feasibility, or flux identifiability.
Setup and reproducibility
Targets cobra 0.32.1 (import cobra), checked against its released source and
current documentation.
uv pip install "cobra==0.32.1"
# Optional SciPy support for MATLAB I/O and array operations:
uv pip install "cobra[array]==0.32.1"
Plotting examples additionally require matplotlib, pandas, and seaborn. The
cobra[chrr] extra supplies hopsy for the new CHRR sampler; that optional backend
was documentation-reviewed, not executed in this refresh. In 0.32.1, sample()
defaults to method="auto" (CHRR when hopsy is installed, otherwise OptGP).
Choose the method explicitly to avoid environment-dependent changes.
How to install Cobrapy
Claude Code
Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):
npx degit K-Dense-AI/scientific-agent-skills/skills/cobrapy#main ~/.claude/skills/cobrapyCodex
npx degit K-Dense-AI/scientific-agent-skills/skills/cobrapy#main ~/.codex/skills/cobrapyClaude.ai and Claude Desktop
Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.
Frequently asked questions
+What does the Cobrapy skill do?
Performs constraint-based metabolic modeling with COBRApy, including FBA, pFBA, FVA, gene knockouts, flux sampling, growth media, production envelopes, gap filling, and SBML model validation for systems biology and metabolic engineering.
+How do I install Cobrapy in Claude Code?
Copy the skill folder into ~/.claude/skills/cobrapy, for example with "npx degit K-Dense-AI/scientific-agent-skills/skills/cobrapy#main ~/.claude/skills/cobrapy". Claude Code loads it automatically and uses it when a task matches.
+Does Cobrapy work with ChatGPT or Codex?
Yes. Cobrapy uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/cobrapy. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.
+Is Cobrapy free?
Cobrapy is published on GitHub by K-Dense-AI under the GPL-2.0 license license; check the license terms before using it.