# SkillOpt — Train Reusable Natural-Language Skills for LLM Agents > A Microsoft Research tool that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits and validation-gated updates. ## Install Save in your project root: # SkillOpt — Train Reusable Natural-Language Skills for LLM Agents ## Quick Use ```bash git clone https://github.com/microsoft/SkillOpt.git cd SkillOpt && pip install -e . python run_skillopt.py --task_suite my_tasks --output best_skill.md ``` ## Introduction SkillOpt is a Microsoft Research project that trains reusable natural-language skills for frozen LLM agents. Rather than fine-tuning weights, it iteratively refines a text-space skill document that an agent loads into its context to improve task performance. The result is a deployable `best_skill.md` artifact any compatible agent can consume. ## What SkillOpt Does - Optimizes natural-language skill documents through trajectory-driven editing - Evaluates agent trajectories on validation tasks and proposes targeted revisions - Produces a standalone `best_skill.md` file for any frozen LLM agent - Supports multiple task families for cross-task generalization - Gates every update on validation performance to prevent regressions ## Architecture Overview SkillOpt runs a three-phase loop: execute, analyze, revise. The agent runs tasks with the current skill, SkillOpt examines trajectories for failure patterns, and a proposer model drafts edits that are accepted only if validation scores improve. Written in Python, it requires only API access to the target LLM. ## Self-Hosting & Configuration - Install via pip from the cloned repository - Provide an LLM API key via environment variable - Define task suites as JSON with inputs and evaluation criteria - No GPU required — operates entirely through API calls ## Key Features - Learns from actual agent trajectories rather than static benchmarks - Validation-gated updates ensure measurable improvement on every revision - Produces portable markdown skill files usable across agent frameworks - Open-source under MIT with example task suites included ## Comparison with Similar Tools - **DSPy** — compiles prompts; SkillOpt optimizes skill documents via trajectory analysis - **TextGrad** — gradient-like text feedback; SkillOpt uses validation-gated discrete edits - **OPRO** — searches prompt variations; SkillOpt refines structured skills from trajectories ## FAQ **Q: Does it require fine-tuning the LLM?** A: No. The LLM stays frozen; only the text skill document is modified. **Q: What is the output format?** A: A markdown file (`best_skill.md`) with structured instructions and heuristics. **Q: How many iterations does optimization take?** A: Most tasks converge within 10 to 30 iterations depending on complexity. ## Sources - https://github.com/microsoft/SkillOpt --- Source: https://tokrepo.com/en/workflows/asset-b1c4e996 Author: AI Open Source