cobrapy — Claude Code skill: what it does, how to install
Guides COBRApy-based metabolic model analysis, from flux calculations and gene knockouts to media design and SBML checks.
npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a claude-codeWhat cobrapy does
This skill guides work with COBRApy metabolic models. It covers model loading and checks, flux balance analysis, parsimonious flux analysis, flux variability analysis, gene knockouts, media design, feasible-flux sampling, gap filling, and SBML validation.
It requires Python 3.9+ and the cobra package. Its examples target cobra 0.32.1; GLPK needs swiglpk, while commercial solvers require separate installation and licensing. Downloading remote models needs network access, but bundled textbook models can run offline.
FBA produces a constraint-based prediction, not proof of experimental growth or kinetic rates. Treat that as a reason to review formulas, charges, boundary reactions, and to record the model version, solver settings, medium, and bounds used for each analysis.
What it helps with
- calculate fluxes in a metabolic network
- compare FBA, pFBA, and FVA results
- screen gene knockouts for growth effects
- derive a minimal growth medium
- validate an SBML model before analysis
Example prompts for the agent
- "Load my SBML model and run FBA with the GLPK solver."
- "Run FVA for PFK, FBA, and PGI."
- "Screen gene knockouts and separate failed solves from low-growth results."
How to install cobrapy
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a claude-code2Manually: put the files in place
~/.claude/skills/cobrapy/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cobrapy/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a codex2Manually: put the files in place
.agents/skills/cobrapy/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a cursor2Manually: put the files in place
.cursor/skills/cobrapy/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install K-Dense-AI/scientific-agent-skills cobrapy2Manually: put the files in place
.github/skills/cobrapy/SKILL.md1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a gemini-cli2Platform CLI
gemini skills install https://github.com/K-Dense-AI/scientific-agent-skills --path skills/cobrapyManually: put the files in place
.devin/skills/cobrapy/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set120
The whole set →Similar
Questions about cobrapy
How do I install cobrapy in Claude Code?
Run npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a claude-code, then run npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a claude-code again. The skill file is at ~/.claude/skills/cobrapy/SKILL.md.
What does the cobrapy skill do?
It guides constraint-based metabolic modelling with COBRApy, including flux analysis, variability analysis, gene knockouts, media work, and SBML validation. It also covers gap-filling hypotheses and sampling feasible fluxes.
What does cobrapy require?
It requires Python 3.9+ and cobra. GLPK uses swiglpk, and remote model downloads need network access.