@artale/pi-gepa

Skill scanner and quality scorer for Pi. Scans, scores, and identifies weak skills. Pairs with pi-evolve for mutation.

Package details

extension

Install @artale/pi-gepa from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@artale/pi-gepa
Package
@artale/pi-gepa
Version
1.2.0
Published
Mar 14, 2026
Downloads
40/mo · 6/wk
Author
artale
License
MIT
Types
extension
Size
9 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "src/extension.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-gepa

Genetic Evolution for Prompts and Agents. Evolve Pi skills and prompts through mutation, crossover, and selection.

Install

pi install npm:@artale/pi-gepa

What it does

GEPA applies evolutionary algorithms to prompt/skill optimization:

  1. Mutate — create variants of a skill with targeted changes
  2. Crossover — combine strengths of two skills
  3. Select — evaluate variants against a fitness function
  4. Evolve — repeat until convergence

Results

Tested on real Pi skills:

  • canvas-design: −69% token reduction while maintaining quality
  • pptx: −60% token reduction
  • xlsx: −63% token reduction

Commands

/gepa evolve <skill>         — start evolution of a skill
/gepa status                 — show evolution state
/gepa history                — past evolution results

How it works

Uses the LLM itself as the mutation operator. Each generation:

  1. Reads the current skill SKILL.md
  2. Generates N mutated variants (shorter, restructured, different examples)
  3. Evaluates each variant on a benchmark task
  4. Selects the best performer
  5. Repeats for M generations

The fitness function measures: output quality + token efficiency + instruction clarity.

License

MIT