darwinian-evolver

Evolve prompts, regexes, SQL queries, and code blocks through automated mutation and evaluation.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/AnandaAnugrahHandyanto/savarez_agent --skill darwinian-evolver-anandaanugrahhandyanto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: darwinian-evolver
Source: https://github.com/AnandaAnugrahHandyanto/savarez_agent/tree/main/optional-skills/research/darwinian-evolver
Command: npx skills add https://github.com/AnandaAnugrahHandyanto/savarez_agent --skill darwinian-evolver-anandaanugrahhandyanto

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Evolve prompts, regexes, SQL queries, and small code blocks by running an AI-driven evolutionary loop that discovers higher-quality artifacts through iterative mutation and evaluation.

Core Features & Use Cases

  • End-to-end evolution: define an Organism, an Evaluator, and Mutators, then let the loop search for better variants.
  • Flexible artifact support: optimize prompts, patterns, queries, or code snippets across multiple tasks and providers.
  • Real-world use: rapidly improve prompts or code snippets for automation, data tasks, or experimentation.

Quick Start

Run the built-in parrot example to evolve a prompt using OpenRouter by starting the driver with your OPENROUTER_API_KEY and a chosen number of iterations.

Frequently Asked Questions about darwinian-evolver

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

FAQPage Schema
How do I automate prompt optimization using an AI evolution loop?

Automated prompt optimization uses a fitness-guided loop to mutate and evaluate prompt variants, discovering higher-quality outputs. This Skill defines an Organism, Evaluator, and Mutator framework to iteratively search for better prompts, regexes, or small code snippets.

Can I evolve SQL queries and regex patterns with automated mutation?

Yes, automated mutation can evolve SQL queries and regex patterns. The framework evaluates mutated variants against a defined fitness criteria, iterating toward better solutions for data tasks, patterns, or small code blocks.

What do I need to set up before running an AI-driven evolutionary loop?

Running an AI-driven evolutionary loop requires Python 3.11+ and an API key for a chosen LLM provider. You must define a custom Problem or use a driver like parrot_openrouter.py with your OPENROUTER_API_KEY.

How does the Evaluator and Mutator framework improve code snippets?

The Evaluator and Mutator framework improves code snippets by applying automated mutations and scoring them against a fitness function. It iterates through high-quality variants, relying on LLM providers to generate and assess improvements.

What is the best way to use Jinja2 templates for evolving prompts?

Using Jinja2 templates for evolving prompts involves defining the initial Organism structure and mutation parameters within the template. The evolutionary loop then dynamically generates and evaluates prompt variants to optimize the output.

When should I avoid using a fitness-guided loop for prompt engineering?

You should avoid using a fitness-guided loop for prompt engineering when dealing with simple, static prompts that do not require iterative improvement, or when lacking an LLM API key, as the framework relies on automated evaluation and mutation.