optimize-skills

Rewrites installed skill files using mined examples from local usage traces.

3|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/stellar-zk/stellar-zk --skill optimize-skills-stellar-zk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: optimize-skills
Source: https://github.com/stellar-zk/stellar-zk/tree/main/.claude/skills/optimize-skills
Command: npx skills add https://github.com/stellar-zk/stellar-zk --skill optimize-skills-stellar-zk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Installed AI skills stay static even as you learn how you actually use them. This Skill closes the loop by reading your local usage traces and compiling that experience back into sharper skill descriptions, instructions, and few-shot examples. ## Core Features & Use Cases - Trace-Based Scoring: Groups trace records from ~/.stellar-build/traces into spans and labels each span win, neutral, or loss using LLM-as-judge evaluation. - Skill Compilation: Tightens trigger descriptions and instructions, then mines 1-3 winning spans into a regenerable LEARNED block of few-shot examples at the end of each SKILL.md. - Safe and Reversible: Backs up every skill to ~/.stellar-build/backups before editing, writes a user profile to profile.md, logs each run to optimizations.jsonl, and supports undo via stellar-loop restore. - Use Case: After a few weeks of using skills like find-stellar-idea, run the optimizer to refine their triggers and embed examples drawn from your own successful sessions. ## Quick Start Ask the assistant to optimize my skills from usage traces so it scores recent spans and rewrites the qualifying installed skills with learned examples.

Frequently Asked Questions about optimize-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize my installed AI skills from usage history?▼

Run the optimize-skills flow, which reads JSONL traces from ~/.stellar-build/traces, groups them into spans, scores each span as win, neutral, or loss, and rewrites qualifying skills with tightened instructions and mined examples.

How many traces are needed before a skill can be optimized?▼

A skill needs at least five spans, where a span is one continuous usage session rather than a single turn. Skills with fewer spans are skipped because there is too little signal to compile from.

Can I undo changes made to a skill after optimization?▼

Yes. Every edited skill is backed up to ~/.stellar-build/backups/<skill>/SKILL.md.<timestamp> before writing, and running stellar-loop restore <skill> reverts the last optimization.

Does the optimizer send my usage traces anywhere?▼

No. Everything is local: it reads only from ~/.stellar-build and the installed skill directories, and mined examples are generalized so no secrets, paths, or raw user data are written into skills.

Why was my skill skipped during optimization?▼

Skills are skipped when they have fewer than five spans, when the signal is thin or ambiguous, or when they are the loop's own skills (optimize-skills, bench-skills, learning-loop), which are excluded to avoid feedback loops.