cobrapy
Skill by K-Dense-AI
Guides constraint-based metabolic modeling with the COBRApy library for flux analysis, gene knockout screens, and growth medium design. Built for systems biology and metabolic engineering researchers. Targets cobra 0.32.1.
Install cobrapy
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/cobrapy ~/.claude/skills/cobrapyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/cobrapy ~/.gemini/antigravity-cli/skills/cobrapyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
COBRApy is an agent skill for constraint-based metabolic modeling with the cobra Python library, targeting version 0.32.1. It guides an assistant through loading and validating bundled and SBML models, comparing FBA, pFBA, and FVA, running single gene knockouts, and designing growth media. It also covers flux sampling, production envelopes, and gap filling.
The skill states that FBA does not infer kinetic rates or establish experimental growth, thermodynamic feasibility, or flux identifiability. It asks users to record the model source, software versions, objective, medium, bounds, and any random seed with each analysis. It is aimed at systems biology and metabolic engineering researchers who work with steady-state flux models.
Written from the project's SKILL.md and checked against it.
What it can do
- Load and validate modelsLoads bundled models such as textbook and checks formulas, charges, and boundary annotations.
- FBA, pFBA and FVACompares flux balance, parsimonious, and flux variability analyses under stated constraints.
- Gene knockoutsRuns single gene deletion screens and classifies low-growth and unresolved mutants.
- Growth media designEdits medium settings and computes minimal media for a growth target.
- Flux samplingSamples the feasible flux space with OptGP and checks the samples for violations.
- Production envelopesComputes product flux extrema across a range of growth requirements.
- Gap fillingProposes reactions that may restore growth, as hypotheses to be checked.
- Model buildingShows how to add reactions, metabolites, and gene-reaction rules to a network.
- Export and round-trip checksAdvises saving to SBML, JSON, or YAML and comparing reloaded models.
What you need
- Python 3.9 or newer
- cobra 0.32.1 Python package
- GLPK via swiglpk (included as the default solver)
- Network access for remote model downloads
Try asking
- Load the textbook model and run FBA and pFBA on it
- Screen single gene knockouts and list those that drop growth below 1%
- Find a minimal medium that keeps 50% of baseline growth
Good to know
- Remote model loading does not cache results in cobra 0.32.1
- FBA predictions do not establish experimental growth or kinetic rates
- Sampling with 200 samples is described as a smoke test only
- Commercial solvers need separate installation and licensing
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/cobrapy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read Write Edit Bash
-
SKILL.md11 KB -
references/api_quick_reference.md16 KB -
references/workflows.md16 KB
Alternatives to cobrapy
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
cobrapy: common questions
Does COBRApy need internet access?
Remote model downloads need network access. The bundled textbook examples run offline, according to the source.
Can it model enzyme kinetics?
No. The source says FBA is a constraint-based prediction and does not infer kinetic rates.
Which cobra version does this skill target?
It targets cobra 0.32.1 and was checked with Python 3.12 in the examples.
How do I install cobrapy?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is cobrapy free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is cobrapy safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to cobrapy?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
