Skip to content
Back to skills

Pygad

ASecurity

"Route PyGAD genetic-algorithm optimization, benchmarks,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
datapythongobashapibackend

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill pygad --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pygad?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pygad
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-pygad/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-pygad)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pygad
description: "Route PyGAD genetic-algorithm optimization, benchmarks,
  visualization/reporting, and neural-model weight workflows."
metadata:
  disco-role: operating
disable-model-invocation: true
license: BSD 3-Clause
---

# PyGAD repo skill

Use this repo skill when a task involves PyGAD, the Python genetic-algorithm package from `GeneticAlgorithmPython`: creating or tuning `pygad.GA` runs, solving single- or multi-objective optimization problems, using bundled benchmark problems, plotting/reporting completed runs, or optimizing neural-network weights through PyGAD helpers.

## First checks

Install the core package when PyGAD is not already available:

```bash
python -m pip install pygad
```

Then verify the import in the same environment that will run the optimization:

```python
import pygad
print(pygad.__version__)
```

Core PyGAD usage needs `numpy` and `cloudpickle`. Optional plotting/reporting and deep-learning integrations need extra dependencies; see [references/installation.md](references/installation.md) before installing heavy extras.

## Route by task

| If the user asks for... | Read this sub-skill |
| --- | --- |
| Build or debug a `pygad.GA` fitness function, population, genes, operators, callbacks, stop criteria, save/load, single-objective optimization, or NSGA-II/NSGA-III custom multi-objective run | [sub-skills/genetic-algorithm/SKILL.md](sub-skills/genetic-algorithm/SKILL.md) |
| Use built-in benchmark classes (`Sphere`, `ZDT`, `DTLZ`, `Knapsack`, `TSP`) or quality indicators (`hypervolume`, IGD, GD, spacing) | [sub-skills/benchmarks/SKILL.md](sub-skills/benchmarks/SKILL.md) |
| Summarize, plot, export PNGs, handle headless `matplotlib`, configure logging, or generate a PDF report from a completed GA run | [sub-skills/results-and-visuals/SKILL.md](sub-skills/results-and-visuals/SKILL.md) |
| Optimize dense NN/CNN/Keras/PyTorch model weights with PyGAD (`pygad.nn`, `gann`, `cnn`, `gacnn`, `kerasga`, `torchga`) | [sub-skills/neural-networks/SKILL.md](sub-skills/neural-networks/SKILL.md) |

## Root references and scripts

- [references/capability-map.md](references/capability-map.md): high-level package map, module boundaries, and cross-sub-skill dependencies.
- [references/installation.md](references/installation.md): core install, optional extras, import checks, and backend/dependency choices.
- [references/troubleshooting.md](references/troubleshooting.md): cross-cutting install/import, optional dependency, runtime, and API triage.
- [references/repo-provenance.md](references/repo-provenance.md): source commit, version, and evidence baseline for refresh decisions.
- [scripts/pygad_quick_check.py](scripts/pygad_quick_check.py): safe import/API smoke that runs a tiny GA and reports optional dependency availability.
- [scripts/run_skill_smokes.py](scripts/run_skill_smokes.py): optional local verification helper that runs the bundled deterministic smoke scripts in this skill tree.

## Operating priorities

1. **Keep PyGAD's maximization convention explicit.** Convert losses/minimization objectives to higher-is-better fitness before constructing `pygad.GA`.
2. **Validate shapes early.** Most failures are inconsistent `initial_population`, `num_genes`, `gene_space`, custom operators, batch fitness returns, or model-weight vector restoration.
3. **Start with tiny deterministic runs.** Use `random_seed`, small populations, and short generation counts before scaling to expensive objective functions.
4. **Install only needed extras.** Plot/report dependencies and deep-learning frameworks are optional. Do not install TensorFlow/PyTorch unless the user's workflow requires them.
5. **Use bundled references/scripts instead of the original checkout.** This skill is self-contained; runtime guidance should not depend on reopening repository examples or docs.

## Handoff notes

- If the user is asking to perform a new downstream optimization experiment, load the relevant sub-skill in Researcher mode and execute the experiment there.
- If source APIs or docs changed after the provenance commit, refresh this repo skill before relying on old defaults.
- If a task depends on external services such as Vilvik cloud export, confirm credentials, service intent, and dependency installation separately; the safe default is local PyGAD execution only.

Files in this skill

  • SKILL.md4.2 KB
  • references/capability-map.md4.7 KB
  • references/installation.md3.3 KB
  • references/repo-provenance.md2.8 KB
  • references/repo-routing-metadata.json343 B
  • references/troubleshooting.md3.6 KB
  • scripts/pygad_quick_check.py2.2 KB
  • scripts/run_skill_smokes.py2.9 KB
  • sub-skills/benchmarks/SKILL.md3.4 KB
  • sub-skills/benchmarks/references/api-reference.md8.4 KB
  • sub-skills/benchmarks/references/troubleshooting.md5.9 KB
  • sub-skills/benchmarks/references/workflows.md7.6 KB
  • sub-skills/benchmarks/scripts/benchmark_smoke.py11.3 KB
  • sub-skills/genetic-algorithm/SKILL.md3.5 KB
  • sub-skills/genetic-algorithm/references/api-reference.md13.7 KB
  • sub-skills/genetic-algorithm/references/troubleshooting.md10 KB
  • sub-skills/genetic-algorithm/references/workflows.md9.8 KB
  • sub-skills/genetic-algorithm/scripts/core_ga_smoke.py3.1 KB
  • sub-skills/genetic-algorithm/scripts/multi_objective_template.py5.2 KB
  • sub-skills/neural-networks/SKILL.md4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.