/skill-optimizer:optimize-skill-performancefrom skill-optimizer
Runs task evals, analyzes results, diagnoses failures, applies targeted fixes, and re-runs to verify improvements. Use when debugging evaluation scores or fixing failing criteria.
Ships in skill-optimizer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an agent that runs task evals and automates the improvement cycle for Tessl plugins. The user has a plugin with eval results and wants to improve their scores. You handle the analysis, diagnosis, fixes, and re-run cycle.
Companion skill: If the user has no scenarios yet, point them to the setup-skill-performance skill which handles scenario generation.
Time expectations: Each re-run takes ~10–15 minutes per scenario per agent (each scenario runs baseline + with-context). Budget accordingly — if you have 3 scenarios, expect ~30–45 minutes per iteration.
Every tessl eval run invocation MUST include --label <run-label> so the run is identifiable in tessl eval list. The label is a short, human-readable description of what the run is about — not a structured ID.
Compose <run-label> from whatever helps you recognise the run later when scanning the list. Typical ingredients:
activation, baseline, initial evals, verificationdescription rewrite, plan-solution fixes, clean scenario(haiku-4-5), (sonnet-4-6)v0.5.0, v4Examples:
repro-clean-scenariotask-prep v0.3.0 baselinetask-prep v0.5.0 plan-solution fixesv4-final-verificationskill-insights activation (haiku-4-5)skill-insights initial evals (haiku-4-5)Keep it concise — what the run was about should be obvious without opening it.
Before diving into analysis, determine what state the user is in.
Rather than routing to a single path (activation OR scored), reason about which combination fits the user's goal:
tessl eval run commands).To determine the plugin's skill count:
ls skills/*/SKILL.md 2>/dev/null | wc -l
To check for existing eval results:
tessl eval view --last --json 2>&1
If results exist, check whether the run skipped forced context activation:
tessl eval view --last --json | jq '.data.attributes.skipForcedContextActivation'
false or field absent → proceed to Phase 1 (score-based analysis). If multi-skill, suggest also running activation to check routing.true → proceed to Phase 0.4 (activation analysis). Recommend a scored eval run next for scenarios where routing is clean.Look for an evals/ directory:
ls evals/*/task.md 2>/dev/null
If scenarios exist on disk but no eval results → before running, quickly check whether the scenarios are missing fixtures or setup scripts the plugin clearly needs. Apply the signals from setup-skill-performance/references/phase3-fixtures-and-setup.md §"Detection rules" to each scenario's task.md + criteria.json + the plugin's SKILL.md.
If any scenario fires a signal but has no fixtures (or no setup / setup.sh when warranted), warn the user:
"Scenario
<slug>looks like it needs a [fixture / setup script] butscenario.jsondoesn't declare one. Running the eval as-is will start in an empty workdir and likely fail. Want to jump back tosetup-skill-performancePhase 3 to generate it, or run anyway?"
If they choose to generate, hand off to that procedure. If they choose to run anyway, proceed.
Then tell the user:
"I found scenarios on disk but no eval results yet. Want me to run evals now?"
If yes, run:
tessl eval run <path/to/plugin> --label <run-label>Then poll for completion (see Phase 4.4) and proceed to Phase 1.
Tell the user no scenarios were found and offer to invoke setup-skill-performance (which generates scenarios, downloads them, and runs baseline + with-context evals).
The last eval used --skip-forced-context-activation --skip-scoring. This shows which skills fired per scenario — there are no baseline or with-context scores, so bucket classification does not apply.
Skill coverage summary: Report which skills in the plugin never fired across any scenario (see phase5-view-results.md §5.1b "Skill coverage summary").
Zero-activation analysis: For each scenario showing – (no skill activated), check if a score-based eval exists for the same scenario and use the delta to determine if it's a routing gap or an out-of-scope task (see phase5-view-results.md §5.1b "Zero-activation analysis").
Auto-suggest description rewrites: For any routing gap identified, read the skill's description and the scenario's task phrasing, then propose a minimal description edit (see phase5-view-results.md §5.1b "Auto-suggested description rewrites"). Apply approved rewrites before proceeding.
To continue with score-based optimization, run a full eval:
tessl eval run <path/to/plugin> --agent=claude:claude-sonnet-4-6 --label <run-label>
Then return to Phase 0.1 once complete.
This phase applies to scored runs only. If the last eval used
--skip-forced-context-activation --skip-scoring, go back to Phase 0.4.
tessl eval view --last --json
The eval view gives you the detailed per-criterion scores.
Parse the JSON output. For each scenario, extract:
Bucket A — Working well (no action needed)
Bucket B — Plugin gap (needs a fix)
Bucket C — Redundant (consider removing)
Bucket D — Regression (needs investigation)
Show the user a summary table:
Eval Analysis for: <plugin-name>
Scenario: <name> (baseline: XX% -> with-plugin: YY%)
Bucket B — Plugin Gaps (fix these):
- "Exponential backoff" — 0/9 (baseline also 0/9)
Diagnosis: Plugin never mentions backoff timing pattern
File to fix: skills/onboard/SKILL.md
Suggested fix: Add "retry with exponential backoff: 1s, 2s, 4s" to Step 1
Bucket D — Regressions (investigate):
- "Auth URL capture" — 4/8 (baseline was 6/8)
Diagnosis: Recent edit may have muddied the auth instructions
Files to check: skills/onboard/SKILL.md, rules/onboarding-guide.md
Bucket C — Redundant:
- "Step-by-step structure" — baseline 10/10, plugin 10/10
Note: Agents already do this naturally. Consider removing this criterion.
Bucket A — Working well (5 criteria): [collapsed]
Ask the user: "Want me to fix the Bucket B and D items? I'll show you each change before committing."
For each Bucket B and Bucket D criterion:
Open the scenario's criteria.json to understand exactly what the rubric checks for.
Read:
skills/*/SKILL.md — skill instructionsrules/*.md — rules loaded into agent contextdocs/*.md — reference documentationFor each failing criterion, determine:
Scan across ALL plugin files for statements that contradict each other. Common patterns:
Flag any contradictions to the user even if they aren't related to failing criteria — they can cause future regressions.
For each fix, follow this sequence:
Show the user:
Make the change to the file. Keep edits minimal and targeted — don't rewrite sections that are already working.
Rules for good fixes:
criteria.json checks for the phrase "safe and reversible", use those exact words in your plugin.tessl plugin lint <plugin-path>
Check that the plugin is still valid and token costs haven't ballooned. If front-loaded tokens increased significantly, consider moving content to docs (on-demand) instead of rules (always loaded).
For criteria where baseline is already high, ask the user:
"The criterion '' scores % even without your plugin. Options:
- Remove it from criteria.json (agents already know this)
- Make the task harder so it actually tests your plugin's value
- Keep it as a sanity check
What do you prefer?"
If the user chooses to remove, edit the scenario's criteria.json and redistribute the weight to remaining criteria.
For regressions, the fix often isn't adding content — it's clarifying or removing content that confused the agent. Check for:
Show the user the contradiction or ambiguity, then propose a clarification.
Before committing, show the user a summary:
Changes made:
1. skills/onboard/SKILL.md — Added exponential backoff timing (1s, 2s, 4s) to Step 1
2. rules/onboarding-guide.md — Clarified that repo eval is always optional
3. evals/error-recovery/criteria.json — Removed redundant "network retry" criterion
Expected impact:
- "Exponential backoff" should go from 0/9 -> 9/9
- "Repo eval is optional" should go from 0/8 -> 8/8
- Regression on "Auth URL capture" should resolve (removed contradictory instruction)
Commit and re-run evals?
git add <files-you-changed>
git commit -m "Improve plugin: <brief description of fixes>"
Only stage the files you actually changed. Don't stage unrelated files.
tessl eval run <path/to/plugin> --label <run-label>
If the eval doesn't pick up your changes, make sure you've committed them first.
tessl eval list --mine --limit 1
Wait until status shows completed. If status shows failed, run tessl eval retry <id>.
Otherwise, get results:
tessl eval view --last
Show the user:
Before -> After:
CLI setup automation: 87% -> 96% (+9)
Skill scaffolding: 88% -> 88% (no change)
Output file generation: 100% -> 100% (no change)
Error recovery: 91% -> 99% (+8)
User interaction: 100% -> 100% (no change)
Average: 93% -> 97% (+4)
Remaining gaps:
- "Exponential backoff" still at 0/9 — may need a different approach
If gaps remain, ask: "Want me to take another pass at the remaining gaps?"
If the user asks, or if you notice issues during Phase 2, review the scenarios themselves:
Read each task.md and flag:
Read each criteria.json and flag:
If the skill involves external service calls — APIs, databases, MCPs, third-party tools — check whether any scenarios exercise those paths. If not, suggest adding at least one scenario that tests the integration.
Remind the user that tessl eval run --env-file <path> injects secrets into the sandbox, so external calls can be exercised in evals without hardcoding credentials.
Propose specific edits to task.md or criteria.json files. Show diffs and explain why.
Stop iterating when:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub pleaseai/claude-code-plugins --plugin skill-optimizer5 skills in this plugin
/compare-skill-model-performanceRun task evals across multiple Claude models, compare results side-by-side, and optimise. Use when you want to benchmark a skill across models, compare haiku vs sonnet vs opus performance, run multi-model comparison or benchmark reports, identify model-specific gaps versus universal plugin gaps, evaluate whether a skill works for all model tiers, or validate a skill before publishing it to the registry./optimize-skill-instructionsReview and improve your skill with actionable recommendations. Reviews the whole bundle, validates syntax and references, explains rubric, shows before/after scores, and edits the SKILL.md and its reference docs. Use when reviewing skill quality, improving a SKILL.md or its reference files, checking scoring dimensions and quick wins, auditing progressive disclosure and orphaned bundle files, generating improvement recommendations, running a post-edit quality audit, creating approval-gated change proposals, or automating the skill review workflow. For the full optimization cycle (review + evals + improve), use `optimize-skill-performance-and-instructions`.
Other plugins' skills for the same job