Skillopt QA — Testing skill for Claude Code
Minimal faithful re-implementation of Microsoft SkillOpt: a text-space optimizer that trains a deployable natural-language skill for a frozen LLM agent on HotpotQA.
How to install Skillopt QA
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open joshhu/skillopt-qa and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Skillopt QA does
Minimal faithful re-implementation of Microsoft SkillOpt: a text-space optimizer that trains a deployable natural-language skill for a frozen LLM agent on HotpotQA.
Alternatives in Testing
- OpenAgentsControl — AI agent framework for plan-first development workflows with approval-based execution 4.8k ★
- Agent Plugins Spec — Agent Plugins Specification v1.0.0 — A minimal standard for packaging agent extensions into distributable plug 1.2k ★
- Maestro Spec — Intent-driven spec precipitation — state a constraint in natural language (加一条规范:禁止用 any / 记录架构约束:服务间走 gRPC / 530 ★
README
skillopt-qa
[Microsoft SkillOpt](https://github.com/microsoft/SkillOpt) 的精簡、忠實重現版, 針對 **HotpotQA** 多跳推理問答任務。
SkillOpt 是一種「**文字空間優化器**」:它不去微調模型權重,而是為一個**凍結的 LLM agent** 訓練出一份可重複使用的自然語言「**技能**」(`best_skill.md`)。 整個技能學習流程仿照神經網路訓練——有 epoch、mini-batch,以及一道 **驗證閘門(validation gate)**:只有當保留集(held-out)準確率提升時,才接受該次 編輯。訓練結束後唯一保留的產物就是 `best_skill.md`,它可跨模型、跨執行環境部署。
論文:《SkillOpt: Executive Strategy for Self-Evolving Agent Skills》 ([arXiv:2605.23904](https://arxiv.org/abs/2605.23904))。 本 repo 是獨立、簡化的教學用實作,**並非**官方程式碼。
運作原理
種子技能 ──► [讓 agent 帶著技能跑一個 train batch] ──► 軌跡(答對/答錯)
│
▼
[optimizer LLM 提出一次「有界」編輯]
│
▼
[在驗證集上評估候選技能]
│
有進步? ──是──► 接受,成為新的最佳技能
│
└─否──► 拒絕,並回饋給 optimizer(別再提同樣的)
optimizer 實作了論文中的穩定機制:**足夠證據**(同時呈現成功與失敗案例)、 **有界文字更新**(小而精準的編輯,非整篇重寫)、**拒絕編輯記憶** (記住被拒絕過的版本)、以及**慢更新**(每步只做一次、且須通過驗證閘門的編輯)。
環境需求
- Python ≥ 3.10、`uv`
- 一個 OpenAI 相容的 chat endpoint。本 repo 不安裝任何 GPU 相關套件——把
model.base_url指向任何 endpoint 即可。
預設的 `configs/hotpotqa/default.yaml` 對接的是本機 **Qwen** vLLM 服務 (模型 id 為 `qwen3.6-27b`),透過 `http://localhost:8080/v1` 存取。請依你的環境 調整 `base_url`/`target_model`。Qwen3 是**推理(reasoning)模型**,因此 `max_tokens` 設得較寬鬆,以保留思考過程與最終答案所需的 token;agent 只讀取 最終的 `content`,不會讀思考內容。
安裝
cd skillopt-qa
uv venv
uv pip install -e ".[dev]"
cp .env.example .env # 設定 OPENAI_API_KEY(多數本機服務任意值即可)
確認你的服務以及它回報的模型 id:
curl http://localhost:8080/v1/models
把 `configs/hotpotqa/default.yaml` 裡的 `model.target_model` / `model.optimizer_model` 設成**完全一致**的 id。
1. 下載資料集
uv run skillopt-download --out data/hotpotqa --n-train 64 --n-val 64 --n-test 200
會從 HuggingFace 下載 HotpotQA,並寫出:
data/hotpotqa/
├── train/items.json
├── val/items.json
└── test/items.json
每筆資料格
Related Skills
Claude Code Test Runner
An automated E2E natural language test runner built on Claude Code.
Nativeapptemplate Agent
Turn a natural-language spec into a coherent three-platform SaaS — Rails 8.1 API + native SwiftUI iOS + native
Canary Write Test
Generate production-ready test code from a natural-language requirement (Playwright, Vitest, Pytest, k6).
P4p Demo
cc-p4p — Claude Code for Product Managers. PM-grade orchestration: research, spec, roadmap, communicate, metri
Turnpike
A minimal local gateway that proxies Claude/Anthropic and OpenAI-spec clients to any OpenAI- or Anthropic-comp
Cdpilot
Zero-dependency browser automation CLI. 70+ commands, 10 test assertions, smart commands (click/fill by text —
Related Agents
Cypher Author
Writes read-only Cypher for natural-language questions given the live graph schema and few-shot examples; also
Knowledge Architect
Cross-project retrieval over the Memory Palace. Inputs natural-language queries. Outputs text summaries with c
Ccd Speckit Specifier
Use this agent to translate approved user intent into a testable, implementation-independent feature specifica