SkillOpt README

The project's README from github.com/microsoft/SkillOpt. As one markdown file: README.md.

SkillOpt: Executive Strategy for Self-Evolving Agent Skills

Train agent skills like you train neural networks — with epochs, (mini-)batchsize, learning rates, and validation gates — but without touching model weights.

Project Page Paper Project Video PyPI Python 3.10+ License: MIT

microsoft%2FSkillOpt | Trendshift microsoft%2FSkillOpt | Trendshift

📖 For installation, data preparation, training/eval commands, configuration, and framework internals, start with the versioned SkillOpt documentation. A concise rendered overview is available in the Documentation & Reproduction Guide, and longer-form engineering analysis appears on the Technical Blog. We also maintain a Changelog for released and unreleased changes.


News 🔥🔥🔥


Overview

Modern agent skills are usually hand-crafted, generated one-shot by a strong LLM, or evolved through loosely controlled self-revision — none of which behaves like a deep-learning optimizer for the skill itself, and none of which reliably improves over its starting point under feedback.

SkillOpt treats the skill document as the trainable state of a frozen agent, and trains it with the discipline that makes weight-space optimization reproducible. A separate optimizer model turns scored rollouts into bounded add / delete / replace edits on a single skill document; in the default paper-style path, a candidate edit is accepted only when it strictly improves a held-out validation score. A textual learning-rate budget, a rejected-edit buffer, and an epoch-wise slow / meta update make skill training stable while adding zero inference-time model calls at deployment.

The deployed artifact is a compact best_skill.md (typically 300–2,000 tokens) that runs against the unchanged target model. Across six benchmarks, seven target models, and three execution harnesses (direct chat, Codex CLI, Claude Code CLI), SkillOpt is best or tied-best on all 52 evaluated (model, benchmark, harness) cells and on GPT-5.5 lifts the average no-skill accuracy by +23.5 points in direct chat, +24.8 inside the Codex agentic loop, and +19.1 inside Claude Code. Optimized skill artifacts transfer across model scales, between Codex and Claude Code harnesses, and to nearby benchmarks without further optimization.

For the full method, ablations, and per-cell results see the paper; for a visual walkthrough of the loop see the project page; for deeper API / backend / benchmark docs see docs/.

🎬 Demo Video

https://github.com/user-attachments/assets/eb12d3bc-371c-467f-904d-91b61f339ed7

▶ Watch the full demo on YouTube


Extensibility & WebUI

Adding a new backend

A backend = a chat / exec target (e.g. openai_chat, claude_chat, qwen_chat, minimax_chat, copilot_chat, openai_compatible, codex_exec, claude_code_exec, cursor_exec, copilot_exec). If a provider implements the OpenAI Chat Completions protocol, try the built-in openai_compatible backend before adding code. See docs/guide/new-backend.md for the full contract. Chat backends add a skillopt/model/<name>_backend.py module; target-only exec backends use the shared harness in codex_harness.py. Both register through common.py, backend_config.py, and skillopt/model/__init__.py.

Adding a new benchmark

A benchmark = a skillopt/envs/<name>/ package with an adapter, a data loader, a scored rollout helper, a YAML config, and optionally an initial seed skill. See docs/guide/new-benchmark.md for the full contract; the simplest reference is skillopt/envs/searchqa/.

WebUI

Launch the monitoring dashboard (optional):

pip install -e ".[webui]"
python -m skillopt_webui.app
Flag Default Description
--port 7860 Server port
--host 0.0.0.0 Bind address
--share off Create a public Gradio share link

The default host listens on every network interface. Use --host 127.0.0.1 for local-only access.


Citation

@article{yang2026skillopt,
  title={Skillopt: Executive strategy for self-evolving agent skills},
  author={Yang, Yifan and Gong, Ziyang and Huang, Weiquan and Yang, Qihao and Zhou, Ziwei and Huang, Zisu and Li, Yan and Gao, Xuemei and Dai, Qi and Liu, Bei and others},
  journal={arXiv preprint arXiv:2605.23904},
  year={2026}
}

SkillOpt (microsoft/SkillOpt)

Searching Database…

18.5K ·GitHub
这是什么?一个文本空间优化器,能在不改动模型权重的情况下,为冻结的大语言模型智能体训练可复用的自然语言技能。训练好的技能以一个精简的 markdown 文件交付(通常 300–2,000 个 token),部署时不会增加任何额外的推理时模型调用。
它是我导入的库,还是我在命令行里运行的工具?两者都是:它是 PyPI 上的一个 Python 包,带有 skillopt 命令行工具(还有一个配套的 skillopt-sleep 命令行工具),另外还有一个可选的 Gradio WebUI 控制台。你可以编写 Python 模块来扩展新的后端或基准测试。
我怎么把它跑起来?先用 pip install skillopt 安装,配置一个后端,然后运行训练循环(rollout → reflect → aggregate → select → update → evaluate)。还可以选择在 7860 端口启动 WebUI 控制台来监控训练过程。
它可以针对哪些大模型服务商进行优化?内置的聊天后端支持 OpenAI、Azure、Claude、Qwen 和 MiniMax,任何兼容 OpenAI Chat Completions 协议的服务商都可以通过 openaicompatible 后端使用。此外还有面向 Codex CLI、Claude Code、Cursor 和 Copilot 的 exec 后端。
pip install 装下来的东西包含发布说明里的全部功能吗?不包含。主命令行工具保守地保留了默认配置,并没有把实验控制的所有参数都暴露成命令行选项;而且面向编程智能体的集成外壳(Claude Code、Codex、Copilot、Devin、OpenClaw)放在代码仓库里,并没有包含在 PyPI 的安装包中。
它能在我的 Windows 电脑上运行吗,还是只支持 Linux?它是一个跨平台的 Python 包,明确支持 Windows——v0.2.0 版本就专门加强了 Windows 上的稳定性,同时兼顾 Linux 和 macOS。
训练循环到底是怎么工作的?每一轮中,智能体会执行任务,然后由一个单独的优化器模型把带评分的执行轨迹转化为对技能文档的有边界的增、删或替换编辑。在默认流程下,只有当某次编辑能严格提升留出验证集的分数时才会被接受;同时还有一个文本学习率预算和一个被拒绝编辑的缓冲区来保持训练稳定。
SkillOpt-Sleep 是什么?一个夜间离线自进化引擎,以 skillopt-sleep 命令行工具的形式提供。它会回顾 Claude Code、Codex 和 Copilot 这类本地编程智能体的历史会话,重放反复出现的任务,并把经过验证的技能在留出验证门槛之后固化下来。
它到底能把智能体提升多少?在六个基准、七个目标模型和三种测试框架上,它在全部 52 个评估组合中都取得了最佳或并列最佳的成绩。在 GPT-5.5 上,它把无技能时的平均准确率在直接聊天中提升了 23.5 个百分点,在 Codex 智能体循环中提升了 24.8 个百分点,在 Claude Code 中提升了 19.1 个百分点,而且训练出的技能可以跨模型规模和测试框架迁移。
我能接入自己的后端或基准测试吗?可以。后端就是通过几个 Python 模块注册的聊天或执行目标(参见 docs/guide/new-backend.md),如果服务商兼容 OpenAI Chat Completions 协议,内置的 openaicompatible 后端可能已经可以直接使用。基准测试则是一个 skillopt/envs 包,包含适配器、数据加载器和 YAML 配置——searchqa 是最简单的参考示例。
Creator
microsoft
Size
24.2 MB
Stars
18.5K
Age
5mo
Commits · 90 Days