If you're doing metabolic modeling or systems biology work, this is the standard Python library for constraint-based analysis. It handles genome-scale models in SBML format, runs flux balance analysis (FBA), flux variability analysis (FVA), and gene knockout screens. The skill covers loading bundled models like E. coli core or pulling from BiGG, running optimizations with different solvers (GLPK comes bundled, CPLEX and Gurobi are optional), and doing flux sampling for uncertainty analysis. Gapfilling support helps fix infeasible models. It uses optlang under the hood for the LP solver interface, so switching between GLPK and commercial solvers is straightforward. Solid for metabolic engineering and predicting cellular phenotypes.

skills.sh installs
2K
GitHub stars
56.6K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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.

Sponsors

Details

Repository
github.com/k-dense-ai/scientific-agent-skills
Categories
AI & Agent Building, Go, Generative Media
First seen
Jun 3, 2026

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

All 137
1k-dense-ai avatardepmapk-dense-ai/scientific-agent-skillsQuery the Cancer Dependency Map (DepMap) for cancer cell line gene dependency scores (CRISPR Chronos), drug sensitivity data, and gene effect profiles. Use for 2Kskills.sh installs
2k-dense-ai avatardiffdockk-dense-ai/scientific-agent-skillsDiffDock and DiffDock-L molecular docking. Use for protein-small-molecule pose prediction from PDB or sequence plus SMILES/SDF/MOL2, batch docking, virtual scre2Kskills.sh installs
3k-dense-ai avatarpysamk-dense-ai/scientific-agent-skillsPython/HTSlib workflows for genomic files. Use when reading, querying, filtering, or writing SAM/BAM/CRAM, VCF/BCF, FASTA/FASTQ, or tabix data with pysam, inclu2Kskills.sh installs
4k-dense-ai avatarcirqk-dense-ai/scientific-agent-skillsGoogle quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experimen2Kskills.sh installs
5k-dense-ai avatarpathmlk-dense-ai/scientific-agent-skillsUse PathML for local, research-only computational pathology workflows: load and tile slides, build preprocessing and QC pipelines, manage h5path data, quantify 2Kskills.sh installs
6k-dense-ai avataretetoolkitk-dense-ai/scientific-agent-skillsAnalyze, manipulate, compare, annotate, and visualize phylogenetic or other hierarchical trees with ETE 4. Use for Newick/Nexus tree I/O, topology edits and pat2Kskills.sh installs