Self-improving skill system that auto-extracts patterns from sessions into reusable skills with confidence scoring, skill versioning, import/export, and continuous improvement loops. Use. Use when working with skill evolution engine.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
skill-evolution-engine
description
Self-improving skill system that auto-extracts patterns from sessions into reusable skills with confidence scoring, skill versioning, import/export, and continuous improvement loops. Use. Use when working with skill evolution engine.
{"name":"Lamarck","title":"Skill Evolution Architect","expertise":["Pattern Extraction","Confidence Scoring","Skill Versioning","Gap Analysis","Continuous Improvement Loops"],"philosophy":"Skills are not written -- they are grown. Every session is a seed; only the fittest patterns survive to become reusable skills."}
version
1.0.0
Overview
The Skill Evolution Engine turns raw session activity into refined, reusable skills through a continuous improvement loop: observe, extract, score, evolve, and deploy. Instead of manually writing skills from scratch, the engine identifies repeated successful patterns in agent sessions, promotes them to instincts (atomic learned behaviors), clusters related instincts into coherent skills, and version-tracks them through their lifecycle. This creates a system that gets measurably better with every session.
Anti-Rationalization Table
Rationalization
Reality
"I'll figure it out as I go"
A structured approach saves time and reduces errors. Follow the workflow in this skill rather than improvising.
"I already know this topic"
Familiarity breeds shortcuts. Use the checklist to verify you haven't missed critical steps.
"This doesn't apply to my situation"
The patterns here generalize across contexts. Adapt, don't skip — the underlying principles hold.
"One more tool will fix it"
Adding complexity rarely solves process gaps. Master the core workflow first.
When to Use
Trigger phrases:
"Lamarck"
"Self-improving skill system that auto-extracts patterns from sessions into reusa"
Extracting reusable patterns from successful agent sessions
Promoting high-confidence instincts into full skills, commands, or agents
Running a skill stocktake to audit quality, coverage, and freshness
Identifying gaps where no skill exists for a common task pattern
Versioning skills through major/minor/patch lifecycle
Importing or exporting skill libraries across projects
Configuring continuous learning hooks for automatic pattern capture
When NOT to Use
Task is outside your authorization scope
You need to implement controls (use implementing-* skills)
Task is about analysis, not action (use analyzing-* skills)
Task is about defense, not offense (use defensive skills)
Process
Gather requirements and constraints from the user
Validate prerequisites (tools, permissions, data)
Execute the core operation with error handling
Verify output meets quality standards
Report results and log for future reference
1. Observation Layer: Capture Session Patterns
Hook-Based Observation Capture
Automatic capture via PreToolUse/PostToolUse hooks records:
Tool calls made (which tools, in what order)
User corrections (where the agent was wrong and got corrected)
Error resolutions (how errors were fixed)
Repeated workflows (patterns seen 3+ times)
Task outcomes (success/failure with context)
Observation Storage
projects/<project-hash>/observations.jsonl # Per-project observations
instincts/personal/ # Global instincts
Each observation is a JSONL record:
{"timestamp":"2026-05-28T10:30:00Z","session_id":"abc123","project":"my-react-app","pattern":"user-corrected-to-functional-style","context":"Writing new React component, used class syntax, user said 'use hooks'","tools":["Edit","Read"],"outcome":"correction"}
2. Pattern Detection: From Observations to Instincts
A background observer agent (use a fast/cheap model) analyzes observations and creates atomic instincts:
Instinct Structure
---id:prefer-react-hookstrigger:"when writing React components"confidence:0.7domain:"code-style"source:"session-observation"scope:projectproject_id:"a1b2c3d4e5f6"project_name:"my-react-app"created:"2026-05-28"last_observed:"2026-05-28"observation_count:5---
# Prefer React Hooks## ActionUsefunctionalcomponentswithhooksoverclasscomponents.## Evidence-Observed5usercorrectionsfromclasstofunctionalstyle-Zerocorrectionsintheotherdirection-Consistentacross3sessions## When This Does NOT Apply-Legacycodebaseexplicitlyusingclasses-Errorboundarycomponents(requireclasssyntax)
Confidence Scoring
Confidence
Meaning
Behavior
0.3 - 0.4
Tentative
Suggestion only, shown as "consider..."
0.5 - 0.6
Moderate
Applied with explicit note, easy to override
0.7 - 0.8
Strong
Auto-applied with logging, user can revert
0.9 - 1.0
Near certain
Candidate for promotion to skill
Confidence Update Rules
User follows instinct suggestion: +0.1 (cap at 1.0)
User overrides instinct: -0.15 (floor at 0.1)
Same pattern observed in new project: +0.05 (cross-project validation)
# Import with conflict resolution
/skill-evolution import skills-export.yaml --strategy merge
# Import strategies:# merge - Keep both, user resolves conflicts# overwrite - Replace existing skills# skip - Skip if skill already exists# upgrade - Only import if version is higher
6. Skill Stocktake and Gap Analysis
Stocktake Process
/skill-evolution stocktake
Produces a report covering:
Quality Audit
| Skill | Version | Confidence | Last Used | Quality |
|-------|---------|------------|-----------|---------|
| react-patterns | 1.2.0 | 0.85 | 2 days ago | Good |
| python-linting | 0.3.0 | 0.4 | 30 days ago | Needs review |
| docker-deploy | 1.0.0 | 0.9 | 1 day ago | Excellent |
Coverage Analysis
Map observed task categories to existing skills
Identify categories with no matching skill (gaps)
Identify categories with low-confidence skills (weak coverage)
Identify skills that are never triggered (dead skills)
Gap Report
## Skill Gaps (no skill exists)- "database migration rollback" - observed 8 times, no skill
- "API rate limiting implementation" - observed 5 times, no skill
## Weak Coverage (confidence < 0.6)- "error-handling-patterns" - confidence 0.4, often overridden
- "caching-strategy" - confidence 0.5, few observations
## Dead Skills (unused in 30+ days)- "legacy-build-system" - last used 45 days ago, consider archiving
7. Continuous Improvement Loop
The full cycle that keeps the system evolving:
EXECUTE (run tasks using current skills)
|
v
MONITOR (hooks capture observations)
|
v
LEARN (background observer creates/updates instincts)
|
v
EVOLVE (cluster instincts into skills, version, validate)
|
v
DEPLOY (promote validated skills to production)
|
v
MEASURE (track skill performance, pass@k metrics)
|
v
[back to EXECUTE]