darwinian-evolver

Evolve prompts, regex patterns, SQL queries, and code snippets through iterative mutation.

Updated May 14, 2026
One-click install
npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill darwinian-evolver-sethypagna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: darwinian-evolver
Source: https://github.com/SethyPagna/Secretary-Jarvis/tree/main/src/capabilities/optional-skills/research/darwinian-evolver
Command: npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill darwinian-evolver-sethypagna

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jinja2, openai, darwinian_evolver, and includes scripts (resource) components.

What problem does it solve?

It replaces manual trial-and-error with an evolutionary search loop that improves prompts, regex patterns, SQL queries, and small code snippets against a measurable fitness signal.

Core Features & Use Cases

  • Evolutionary optimization: Iteratively mutates candidate artifacts and keeps the best-scoring variants.
  • Custom problem design: Supports an organism, evaluator, and mutator so you can adapt the loop to your own task.
  • Trainable vs holdout testing: Separates learning examples from validation examples to reduce overfitting.
  • Practical use cases: Refine prompt templates, tune extraction regexes, improve SQL logic, and search for better small code blocks when you already have a scorer.

Quick Start

Use the skill to evolve your current prompt, regex, SQL query, or code snippet by defining a fitness function and letting the darwinian-evolver loop propose improved candidates.

Frequently Asked Questions about darwinian-evolver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize prompt engineering templates automatically?

You can optimize prompt engineering templates by running an evolutionary search loop that iteratively mutates candidate prompts and retains the variants that score best against your defined fitness function.

Can I use an evolutionary search loop to tune SQL queries and regex patterns?

Yes, you can tune SQL queries and regex patterns by defining an organism and an evaluator with trainable and holdout failure cases, allowing the evolutionary loop to mutate and validate candidate artifacts.

Do I need a fitness function to improve code snippets with darwinian-evolver?

Yes, you need a fitness function to improve code snippets, as the evolutionary search loop requires a measurable fitness signal from an evaluator to score and select mutated code block candidates.

Does evolutionary code optimization work with OpenRouter and OpenAI?

Evolutionary code optimization works with OpenRouter and OpenAI by using an LLM-driven mutator that generates candidate mutations through the provided OpenRouter driver or the upstream darwinian_evolver workflow.

What is the best way to prevent overfitting when evolving regex patterns?

The best way to prevent overfitting when evolving regex patterns is to separate your evaluator's examples into trainable and holdout failure cases, ensuring mutations generalize beyond the learning set.