Skip to content

Constraint-based metabolic modeling with COBRApy for FBA, pFBA, FVA, gene knockouts, media design, and flux sampling.

CCM score
73 of 100
skills.sh installs
2.2K
GitHub stars
58.9K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers loading and validating metabolic networks, then optimizing steady-state fluxes under stated constraints and bounds
  • Includes FBA, pFBA, geometric FBA, FVA with optional loopless variants, single-gene deletion, minimal medium, and OptGP flux sampling
  • Enforces reproducibility by recording model source, cobra and solver versions, objective, medium, bounds, and seeds with each analysis
  • Designed for systems biology and metabolic engineering work that targets cobra 0.32.1 with Python 3.9 or newer

Install

$ npx -y skills add k-dense-ai/scientific-agent-skills --skill cobrapy -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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.

Details

Repository
github.com/k-dense-ai/scientific-agent-skills
Categories
Research & Academic, Data Science & Analytics
First seen
Jun 3, 2026

Questions

What does the cobrapy skill do?

The cobrapy skill performs constraint-based metabolic modeling with COBRApy, including FBA, pFBA, FVA, gene knockouts, flux sampling, growth media, and SBML model validation. It is aimed at systems biology and metabolic engineering analysis. It predicts steady-state fluxes and does not infer kinetic rates or measured growth.

How do I install the cobrapy skill?

Run npx -y skills add k-dense-ai/scientific-agent-skills --skill cobrapy -y in a project to install the cobrapy skill. Once installed, the agent can load bundled models such as textbook, iJO1366 and salmonella and run analyses with them. The skill targets cobra 0.32.1 and requires Python 3.9 or newer.

What does the cobrapy skill need to run?

The cobrapy skill requires Python 3.9 or newer and the cobra package, with examples tested on Python 3.12 and cobra 0.32.1. GLPK installs through swiglpk, and commercial solvers need separate installation and licensing. Remote model downloads need network access, while the bundled textbook examples run offline.

Which category does cobrapy sit in on Claude Marketplaces?

Cobrapy is listed in the Research & Academic category on Claude Marketplaces. Its own skill covers constraint-based metabolic modeling for systems biology work. It is a specialist tool for metabolic network analysis and gene knockout screens.

More from k-dense-ai/scientific-agent-skills

All 132

Similar to Cobrapy

More Research & Academic