Self-Evolving Skill System for AI Agents — skills that create, improve, and merge themselves.
SkillGenesis lets AI agents autonomously discover, refine, and compose executable skills through three parallel subsystems:
- 🧬 Self-Play (Ctx2Skill) — Five agents (Challenger, Reasoner, Judge, Proposer, Generator) play adversarial rounds to expose skill weaknesses and drive improvement
- 🔬 Active Experimentation (HExA) — The agent designs falsifiable hypotheses, runs controlled experiments in sandboxes, and crystallizes successful approaches into reusable skills
- 🛡️ Quality Gate (GRASP) — Three-phase admission: regression suite → net-improvement probes → side-effect audit. Skill edits that break existing behavior are rejected automatically.
Skills are pure executable TypeScript code — not prompts, not suggestions — stored with embedding vectors for semantic retrieval, versioned, and composable.
User Task ──→ Executor ──→ Skill Library ←── Quality Gate
↑ ↑
Self-Play Loop Experimentation
(5 agents) (HExA loop)
↑ ↑
Cross-Time Replay (anti-degradation)
# 1. Install
git clone https://github.com/YOUR_USERNAME/skillgenesis.git
cd skillgenesis
npm install
# 2. Configure (get a key at https://platform.deepseek.com)
cp .env.example .env
# Edit .env → set DEEPSEEK_API_KEY=sk-your-key
# 3. Run
npm run dev # review mode, coding domain
npm run dev -- --auto # auto mode
npm run dev -- --bioinfo # bioinformatics domain| Command | Description |
|---|---|
/task <desc> |
Execute a task using the skill library |
/mode auto|review |
Switch between auto-approve and review mode |
/domain coding|bioinfo |
Switch between domains |
/skills [filter] |
List skills in the library |
/stats |
Show system stats |
/evolve |
Trigger a self-play evolution cycle |
/experiment |
Trigger an active experimentation cycle |
/save |
Persist the skill library to disk |
Every skill is a typed object with:
interface Skill {
name: string; // "GenerateUnitTests"
description: string; // NL for embedding retrieval
code: string; // Executable TypeScript function
parameters: SkillParameter[]; // Typed parameter contract
preconditions: Condition[]; // Must be true before execution
postconditions: Condition[]; // Guaranteed after execution
sideEffects: SideEffect[]; // Declared side effects
verification: string; // Self-check code
regressionTests: Test[]; // Guard against breaking changes
version: number;
parentIds: string[]; // Evolutionary lineage
originMethod: 'manual' | 'self-play' | 'experiment' | 'fix' | 'merge';
}AnalyzeCodeStructure, GenerateUnitTests, DebugError, RefactorCode, ReviewCode, ParseDependencies, ExplainCode, FixLintErrors
ParseSequence, ComplementSequence, SearchMotif, AnnotateVariant, NormalizeExpression, PathwayEnrichment, FetchGenomicData, AlignmentSummary
- Self-Play finds weaknesses → Challenger creates adversarial tasks → Reasoner attempts with current skills → Judge scores → Proposer diagnoses failures → Generator writes improved code → Quality Gate admits or rejects
- Active Experimentation discovers new skills → Gap analysis identifies capability blind spots → Hypothesis formulated → Controlled experiment run → Statistical analysis → Successful approaches crystallized as skills
- Cross-Time Replay prevents degradation → Representative historical cases replayed periodically → Regressed cases trigger rollback
MIT