Instructions
Analyze recent execution traces for a named skill and propose SKILL.md improvements.
Parameters
- •
skill_name(string, required): Name of the skill to analyze - •
window(integer, optional, default 50): How many recent traces to include in the analysis
Behavior
- •Query the
execution_tracestable for the most recentwindowrecords forskill_name - •Compute statistics:
- •Total invocations, success rate, average duration
- •Most common parameters, most common errors
- •Retrieve the current SKILL.md body for the skill
- •Send traces + stats + current instructions to LLM with prompt: "Given these execution traces and current instructions, propose improvements to make this skill more accurate and reliable. Return: (1) proposed SKILL.md body, (2) rationale"
- •Insert the proposal into
skill_refinementstable with status = 'pending' - •Confirm to user: "Proposal queued. Run
/reviewto see and apply it."
Self-improvement cycle
This skill is the entry point to the self-improvement loop:
self-analyze → skill_refinements (pending) → /review → accepted → SKILL.md updated
Example interactions
- •"Improve the web-fetch skill based on recent usage" →
skill_name: "web-fetch" - •"Analyze how memory-read has been performing" →
skill_name: "memory-read" - •"self-analyze shell-exec" →
skill_name: "shell-exec"