How Your Agents Can Write and Optimize Their Own Skills

How Your Agents Can Write and Optimize Their Own Skills

Ben Dickson · AlphaSignal · Deep Dive Document · June 21, 2026
📖 Newsletter Deep Dive ✍️ Ben Dickson (AlphaSignal) 🏷 Skill Optimization · SkillOpt · GEPA · EvoSkill · Loop Engineering

Overview

The quality of an AI agent hinges not on the underlying LLM's capabilities, but on the skills you give it — those standalone .md files that define instructions, tool-use guidelines, formatting, and failure-recovery logic. Yet optimizing these text files remains a slow, fragile manual process. This deep dive breaks down a new wave of text-space optimizers — SkillOpt, GEPA, and EvoSkill — that treat skill documents like trainable neural network parameters, allowing agents to iteratively debug, validate, and update their own skills without touching model weights.

1 The Real Bottleneck — It's Not the LLM

The real bottleneck for deploying reliable agentic systems is no longer the core capabilities of the underlying language model. Today's LLMs have immense power. Instead, the quality of the agent hinges largely on the skills that you give them.

In modern agent harnesses, a skill is a standalone .md file that acts as an agent's operating procedure for a set of tasks. It outlines:

  • Instructions — step-by-step procedures
  • Tool-use guidelines — when and how to call tools
  • Formatting requirements — output structure
  • Failure-recovery logic — what to do when things go wrong

Optimizing these text files remains a slow and manual process. Developers must manually edit instructions, test them on a task suite, analyze failures, and rewrite the text. This manual loop does not scale.

💡 Key insight: Unlike the underlying model, the skill document can't be trained like a machine learning model. It lacks differentiable parameters, meaning you cannot calculate an exact gradient to guide updates.

2 The Fundamental Challenge of Skill Optimization

Tweaking textual instructions in skill files can cause downstream problems. When you edit a markdown file to fix a brittle behavior in long-horizon Task A, you might cause a regression in Task B. Without systematic tracking, it is nearly impossible to pinpoint the causal effect of individual textual changes.

The industry is responding by shifting from static manual prompting to system-driven automation. Engineers are now building optimization loops that treat the skill document as a trainable external state.

⚠️ The regression trap: Fixing Task A often breaks Task B. Without systematic evaluation across your entire task suite, you're playing whack-a-mole with your skill files.

3 SkillOpt — A Structured Text-Space Optimizer

Developed by Microsoft Research, SkillOpt treats text documents exactly like neural network parameters. It establishes an optimization pipeline that updates skills without altering underlying model weights.

The Training Pipeline

SkillOpt operates via a four-step structured loop:

  1. Rollout — execute a batch of tasks and record execution trajectories
  2. Evaluation — trajectories receive success/failure scores from a verifier
  3. Reflection — a separate LLM optimizer analyzes minibatches of trajectories to identify specific text components driving failures
  4. Bounded edits — the optimizer proposes specific add, delete, or replace modifications, constrained by a textual learning-rate budget to prevent volatile changes
🔄
Rollout
Execute tasks
📊
Evaluate
Score results
🔍
Reflect
Find failures
✏️
Edit
Bounded updates

Validation & Results

Proposed edits are tested rigorously on a held-out validation set not seen during training. The system stores unsuccessful changes in a rejected-edit buffer to ensure stable performance gains.

MetricResult
Average improvement (direct chat, GPT-5.5)+23.5 points
Average improvement (Codex loop, GPT-5.5)+24.8 points
Performance across evaluated settingsHighest or tied in 52 model/benchmark/harness settings
Median skill file length~920 tokens (highly compact)
Cross-model generalization: A skill optimized by SkillOpt on a specific model and harness generalizes to other models and harnesses — though optimizing for your specific setup always yields best results.

4 GEPA — Genetic-Pareto Evolutionary Optimization

GEPA (Genetic-Pareto) takes a fundamentally different approach using evolutionary algorithms. Instead of bounded edits on a single file, GEPA evolves populations of skill candidates.

How It Works

When an agent carries out a task, GEPA uses an LLM to:

  1. Reflect on the reasoning trace and diagnose failures
  2. Propose mutations — different variations of the original artifact
  3. Pareto-based selection — maintain a frontier of top candidates that perform well across different tasks (not just one)
  4. Sample and explore — use the diverse pool to discover strategies that generalize across inputs

The key innovation is Pareto selection: instead of optimizing for a single metric, GEPA maintains a set of candidates where no single candidate dominates all others on every dimension. This produces more robust, generalizable solutions.

💡 DSPy compatibility: GEPA is very versatile and is compatible with DSPy, the popular framework for optimizing LLM prompts — making it pluggable into existing optimization pipelines.

5 EvoSkill — Multi-Agent Skill Discovery & Synthesis

EvoSkill combines ideas from both SkillOpt and GEPA for multi-agent coding workflows. It uses SkillOpt's optimization loop (trace analysis → error patterns → fixes) with GEPA's evolutionary strategy (multiple candidates on separate Git branches, Pareto frontier selection).

Practical Example

Consider a coding agent that keeps failing to handle nested pagination links when parsing an internal company API:

  1. EvoSkill detects the recurring failure pattern in execution traces
  2. It proposes a skill mutation that adds pagination-handling instructions
  3. The mutation is tested on a separate Git branch
  4. If pagination accuracy surpasses the baseline on a held-out dataset, this version replaces the lowest-performing variant on the active Pareto frontier
Git-native: EvoSkill tracks skill variants on separate Git branches, making it trivially auditable and rollback-safe — every experiment is a branch.

6 Comparison & Trade-offs

FrameworkApproachKey StrengthBest For
SkillOptBounded text edits with learning-rate budgetCompact, high-performance files (~920 tokens)Single-skill optimization at scale
GEPAEvolutionary Pareto-based mutationsDiverse candidates, multi-objective optimizationPrompts & skills needing broad generalization
EvoSkillSkillOpt loop + GEPA evolution on Git branchesMulti-agent, Git-native, auditableTeam coding workflows with multiple agents

Practical Considerations

  • Compute cost — optimization requires an LLM to read and analyze voluminous token histories. Training a skill can be resource-intensive.
  • No inference cost — the output is a standard text file. It incurs zero additional cost at inference. No changes to the inference stack needed.
  • Structural prerequisite — these systems require a verifiable feedback signal and a clean, representative held-out evaluation dataset. They cannot optimize subjective, open-ended tasks.
💡 Trade-off summary: You spend more compute upfront during optimization, but save time, manual effort, and gain higher-quality skills that cost nothing extra at inference time.

7 Loop Engineering & Self-Optimizing Agents

These specialized toolchains reflect a much broader architectural evolution. The development landscape is shifting from simple, linear prompting to "loop engineering".

The main idea: create a repeatable cycle with a well-defined and verifiable goal, and let an LLM or AI agent repeat the task until it achieves optimal performance. This architecture creates an end-to-end self-improving loop:

  • Instead of writing prompts, developers assemble control systems with precise evaluation metrics, memory storage, and exit conditions
  • Production systems can track live agent trajectories, flag recurring edge-case failures, and launch background optimization routines to update their own files safely
  • The era of tweaking individual phrases in a system prompt or skill file is drawing to a close
💡 The future role: As AI agents become better at handling the small details, engineers will have the higher-level role of designing systems and overseeing execution — not hand-editing prompts.

🎯 Key Takeaways

🔑 Key Takeaways

  • Skills, not models, are the bottleneck — the quality of an agent depends more on its skill files than on the underlying LLM's capabilities
  • Manual skill editing doesn't scale — fixing Task A breaks Task B, and without systematic evaluation, you're playing whack-a-mole
  • SkillOpt treats skills like neural network weights — Microsoft Research's framework uses bounded edits with a textual learning-rate budget, achieving +23.5 point improvements
  • GEPA uses evolutionary Pareto selection — maintains diverse candidate pools to find skills that generalize across tasks, compatible with DSPy
  • EvoSkill combines both approaches — optimization loops + evolutionary strategies on Git branches for multi-agent coding workflows
  • Optimized skills generalize across models — a skill tuned on one model/harness transfers to others, though purpose-built optimization still wins
  • Upfront compute cost, zero inference cost — optimization requires compute, but the output is a standard text file with no additional inference overhead
  • Requires verifiable feedback — these systems need automated evaluation (test suites, verifiers) — they cannot optimize subjective or open-ended tasks
  • Part of the loop engineering shift — skill optimization fits into the broader trend of replacing manual prompting with automated control systems
  • Engineers become system designers — the future role is designing optimization loops and evaluation frameworks, not hand-editing markdown

🔗 Resources & Links

  • SkillOpt Paper — Microsoft Research's text-space optimizer for agent skills
  • GEPA Paper — Genetic-Pareto optimization framework for LLM instructions
  • EvoSkill Paper — Evolutionary skill discovery for multi-agent coding workflows
  • DSPy — Stanford's framework for declarative LM programs, compatible with GEPA
  • AlphaSignal — original newsletter source by Ben Dickson