Agent Skill
2/7/2026

evolution-engine

Meta-skill that enables skills to evolve and improve themselves through performance monitoring, variant generation, and data-driven optimization. Use this skill when you need to create new self-evolving skills, analyze skill performance, generate improved variants, deploy changes safely, or rollback to previous versions. This skill manages the complete evolution lifecycle: monitor → analyze → generate → test → deploy → verify.

D
doublenian
0GitHub Stars
2Views
npx skills add doublenian/self-evolution

SKILL.md

Nameevolution-engine
DescriptionMeta-skill that enables skills to evolve and improve themselves through performance monitoring, variant generation, and data-driven optimization. Use this skill when you need to create new self-evolving skills, analyze skill performance, generate improved variants, deploy changes safely, or rollback to previous versions. This skill manages the complete evolution lifecycle: monitor → analyze → generate → test → deploy → verify.

name: evolution-engine description: Meta-skill that enables skills to evolve and improve themselves through performance monitoring, variant generation, and data-driven optimization. Use this skill when you need to create new self-evolving skills, analyze skill performance, generate improved variants, deploy changes safely, or rollback to previous versions. This skill manages the complete evolution lifecycle: monitor → analyze → generate → test → deploy → verify. license: MIT

Evolution Engine - Self-Evolving Skill System

Meta-skill that enables skills to evolve and improve themselves through performance monitoring, variant generation, and data-driven optimization.

Overview

This skill creates a self-improving system where skills can monitor their own performance metrics, generate improved variants of themselves, A/B test changes safely, automatically deploy improvements, and rollback if performance degrades.

When to Use This Skill

Use this skill when you want to:

  • Create a new self-evolving skill - Initialize a skill with evolution tracking capabilities
  • Analyze skill performance - Review metrics, patterns, and improvement opportunities
  • Generate evolved variants - Create candidate versions with improvements
  • Deploy improvements - Safely roll out better-performing versions
  • Rollback changes - Revert to previous versions if needed

Evolution Levels

  1. Prompt Evolution - Safest: Only modifies skill prompts/instructions
  2. Parameter Tuning - Adjusts timeout, temperature, and other config values
  3. Code Mutation - Generates equivalent but more optimal code
  4. Architecture Evolution - Restructures skill (requires human approval)

Instructions

1. Creating a Self-Evolving Skill

To create a new skill with evolution capabilities:

node lib/evolution-engine.js init <skill-name>

Or programmatically:

const EvolutionEngine = require('./lib/evolution-engine');
const engine = new EvolutionEngine();
await engine.initSkill('my-skill');

This creates:

  • skills/<skill-name>/SKILL.md - Current version
  • skills/<skill-name>/meta.json - Performance metadata
  • skills/<skill-name>/variants/ - Version history

2. Recording Performance

After each skill execution, record the outcome:

await engine.recordExecution('my-skill', {
  success: true,              // Was the output accepted?
  execution_time: 1500,       // Duration in milliseconds
  input: {...},               // Input data
  output: {...},              // Output data
  feedback: 'Great work!'     // User feedback
});

3. Analyzing Performance

Analyze collected data to identify patterns:

node lib/evolution-engine.js analyze <skill-name>

This returns:

  • Current performance metrics
  • Discovered patterns (success/failure)
  • Improvement opportunities
  • Readiness for evolution

4. Generating Variants

Generate improved versions based on analysis:

node lib/evolution-engine.js generate <skill-name>

Or programmatically:

const variants = await engine.generateVariants('my-skill', {
  count: 3,
  level: 'prompt'  // or 'parameter', 'code', 'architecture'
});

5. Deploying Improvements

Deploy a variant after validation:

await engine.deploy('my-skill', variants[0], {
  improvement: 0.15,    // 15% improvement measured
  metrics: {
    success_rate: 0.85,
    avg_execution_time: 1200
  }
});

6. Rolling Back

Revert to a previous version if needed:

await engine.rollback('my-skill', '1.0.0');

Configuration

Evolution behavior is controlled via configuration:

const engine = new EvolutionEngine({
  minSamplesBeforeEvolution: 20,    // Min executions before evolving
  minImprovementThreshold: 0.1,     // 10% improvement required
  maxVariants: 3,                   // Max variants to generate
  autoRollback: true,               // Auto-rollback on degradation
  requireApproval: false,           // Require human approval
  skillsDir: './skills'             // Skills directory
});

Skill Metadata Format

Each evolving skill maintains a meta.json:

{
  "name": "skill-name",
  "version": "2.1.0",
  "created_at": "2025-01-11T10:00:00Z",
  "metrics": {
    "success_rate": 0.95,
    "avg_execution_time": 1500,
    "user_feedback": 4.7,
    "total_executions": 500
  },
  "evolution_history": [
    {
      "version": "2.1.0",
      "from": "2.0.0",
      "change_type": "prompt",
      "improvement": "+0.08 success_rate",
      "timestamp": "2025-01-11T10:00:00Z"
    }
  ]
}

Safety Mechanisms

  • Shadow Testing: All changes tested before deployment
  • A/B Testing: Traffic splitting for validation
  • Auto-Rollback: Performance degradation triggers reversion
  • Complete History: Full audit trail maintained
  • Human Approval: Required for high-risk changes

Evolution Process

1. Monitor Phase → Collect performance data over N executions
2. Analyze Phase  → Identify patterns and improvement opportunities
3. Generate Phase → Create M candidate variants
4. Test Phase     → Run shadow tests on all variants
5. Evaluate Phase → Score each variant
6. Select Phase   → Choose best performing variant
7. Deploy Phase   → Roll out with safety checks
8. Verify Phase   → Monitor and rollback if needed

Examples

See smart-commit/ for a complete example of a self-evolving skill.

References

  • scripts/evolution-engine.js - Core evolution engine implementation
  • smart-commit/SKILL.md - Example self-evolving skill
Skills Info
Original Name:evolution-engineAuthor:doublenian