pymoo — Claude Code skill: multi-objective optimization in Python
A skill that drives pymoo from your agent: algorithm choice, problem setup, constraints and Pareto front analysis. Useful when objectives conflict.
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a claude-codeWhat pymoo does
The skill walks an agent through optimization with pymoo: single or multiple objectives, constraints, mixed variables. It covers algorithm choice — GA and DE for one objective, NSGA-II and SPEA2 for two or three, NSGA-III and RVEA once you pass four. Benchmark problems ZDT, DTLZ and WFG are included, along with custom crossover and mutation operators and result visualization.
Everything runs through one call, minimize(problem, algorithm, termination). Solutions land in result.X and result.F, constraint violations in result.CV. When no feasible solution exists, result.X and result.F can be None. The skill flags a common trap: after normalization or repair, run the chosen candidates through the original physical constraints again, or an infeasible point passes as a working one.
You need Python 3.10+ and pymoo 0.6.2 with NumPy, SciPy, matplotlib and autograd. Parallel runs use joblib, checkpoints use dill, and the algorithm wrapper uses optuna. Network access is only for installation. One restriction to know: pymoo's MOEA/D does not handle constraints directly, so pick another algorithm for constrained problems.
What it helps with
- pick an algorithm that matches the number of objectives
- define a problem with inequality and equality constraints
- get a Pareto front and read the trade-offs
- run an algorithm on a ZDT or DTLZ benchmark
- write custom crossover and mutation operators
Example prompts for the agent
- Set up a two-objective problem with conflicting goals and solve it with NSGA-II
- Add inequality constraints to the problem and check whether any feasible solutions exist
- Run NSGA-III on a four-objective problem and plot the resulting front
How to install pymoo
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a claude-code2Manually: put the files in place
~/.claude/skills/pymoo/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pymoo/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a codex2Manually: put the files in place
.agents/skills/pymoo/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a cursor2Manually: put the files in place
.cursor/skills/pymoo/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install K-Dense-AI/scientific-agent-skills pymoo2Manually: put the files in place
.github/skills/pymoo/SKILL.md1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a gemini-cli2Platform CLI
gemini skills install https://github.com/K-Dense-AI/scientific-agent-skills --path skills/pymooManually: put the files in place
.devin/skills/pymoo/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about pymoo
How do I install pymoo in Claude Code?
Run npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a claude-code, then check ~/.claude/skills/pymoo/SKILL.md.
What does the pymoo skill do?
It helps your agent set up and solve optimization problems with pymoo: choosing an algorithm for the number of objectives, handling constraints, and reading results as a Pareto front.
What do I need to run it?
Python 3.10+ and pymoo 0.6.2 with NumPy, SciPy, matplotlib and autograd. Network access is only needed for installation.