vite-devtools-svelte-perf-fix
Installation
SKILL.md
Svelte performance fix
You are about to fix exactly one performance issue and verify it with measurement. Do not bundle multiple changes.
Inputs
The user will name an issue. Resolve it to a target by calling the matching detail tool — get_component_hotspots, get_reactive_graph_problems, get_load_waterfall, get_fps_drops, or get_render_profile — based on the issue kind / suggestedTool from /vite-devtools-svelte-perf-audit.
Workflow
- Confirm scope. Restate the target in one sentence and list the file(s) you intend to edit. Ask the user to confirm before any further work, and ask once whether the before and after sessions should stay in memory (
"memory", default) or be saved to disk ("disk"). - Capture baseline. Call
start_session({ label: "before-<issue>" , persist: false }). Ask the user to reproduce the slow flow in the browser. When they confirm, callend_session({ keep: <their choice> })and remember the returnedidasbaselineId. - Propose the change. Read the target file(s). Propose a specific diff (mention the line numbers). Ask the user to approve. Only edit after approval.
- Apply the change. Use Edit/Write tools. Keep the change minimal — the goal is to attribute the diff to one cause.
- Capture after. Call
start_session({ label: "after-<issue>", persist: false }). Ask the user to repeat the same flow. On confirmation, callend_session({ keep: <their choice> })and remember the returnedidasafterId. - Compare. Call
compare_sessions({ a: baselineId, b: afterId }). Report the threeverdictfields (render / load / fps) verbatim alongside the absolute numbers. Do not paraphrase "improved" if any verdict isregressedorunchanged. - Decide. If render verdict is
regressed, proposegit diffand offer to revert the edit. If all verdicts areunchanged, ask the user whether to keep the change anyway (it may have other benefits) or revert. - Dispose of sessions. Ask whether to keep both sessions or remove them with
delete_session.