# pymoo

A skill that drives pymoo from your agent: algorithm choice, problem setup, constraints and Pareto front analysis. Useful when objectives conflict.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1900 installs · ★ 54652
- Author: K-Dense-AI
- License: LicenseRef-Apache-2.0-license · policy=link-only · description only; the file stays with the author
- Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/HEAD/skills/pymoo/SKILL.md
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/skills/k-dense-ai-pymoo

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pymoo/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pymoo/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pymoo/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pymoo/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install K-Dense-AI/scientific-agent-skills pymoo
```

2. **Manually: put the files in place**
- File: `.github/skills/pymoo/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/K-Dense-AI/scientific-agent-skills --path skills/pymoo
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pymoo/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill pymoo -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/K-Dense-AI/scientific-agent-skills/tree/HEAD/skills/pymoo/SKILL.md

## When to use it
- 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
- 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

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 349800 installs

From the same set: [k-dense-ai/scientific-agent-skills](https://affpapa.org/en/nevibecode/by/k-dense-ai/scientific-agent-skills.md) — 159 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
