/svelte-grab:svelte-grab-auditfrom svelte-grab
Performs per-screen security and performance audits for Svelte/SvelteKit apps, checking network requests, credential leaks, memory, and page speed with verified findings.
Ships in svelte-grab. 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.
Read when SKILL.md points to them.
Goal: for each screen, answer "how many requests fire, what do they cost, does anything leak credentials, is anything hot or leaking memory", and back every finding with evidence.
Supporting files (same folder):
Needs the svelte-grab MCP server and the app open in dev with <SvelteDevKit enableMcp />.
The core loop and ref locators are in the svelte-grab skill.
src/routes/**/+page.svelte, plus +page(.server).ts, +layout*.ts,
+server.ts, hooks.server.ts). Pick the screens: the ones the user named, else home,
auth/login, the main authenticated screen and any screen with forms or payments.
Keep it to 3-6 screens unless asked for more.npx svelte-grab audit --json audit.json (add --min-severity medium to cut
noise, --deps to include dependency advisories, --html report.html for humans,
--ci to fail on findings). Its findings are candidates, not verdicts.ui_tabs: confirm a tab is connected. With several, pass tabId everywhere.--cdp=http://127.0.0.1:9222 (or
SVELTE_GRAB_CDP). Without it ui_perf_metrics errors and ui_leak_check answers
INCONCLUSIVE; say so in the report instead of guessing.Navigate to the screen (Playwright / chrome-devtools MCP, or ask the human), then:
ui_network({ reload: true }): the initial load. Totals, by type, first- vs third-party,
ORIGINS, DUPLICATES, SLOWEST 5, WATERFALL, FAILED, one line per request with initiator
file:line + component. Add includeBodies: true when you need SvelteKit
__data.json / remote-function payloads for the data-exposure check.ui_security_scan(): right after step 1, so the transit checks see the page load.
Findings come with severity, verdict, redacted evidence, source, fix.ui_profile({ durationMs: 3000 }) with no action: idle check, must be QUIET.
Then once with the main interaction, e.g.
ui_profile({ action: { ref, type: "click", repeat: 5 } }), for FPS and long frames.ui_verify({ ref }) on the key elements of the screen (main heading, primary button,
form): console errors, overflow, a11y, contrast.ui_perf_metrics({ action: { ref, type: "click" } }) on the main
interaction, and ui_leak_check({ actions: [open, close], iterations: 5 }) on every
modal, drawer, tab panel or toggle that mounts/unmounts components.ui_network({ since })
with the epoch ms taken right before the interaction.Fill the per-screen row of the report as you go (see REPORT-TEMPLATE.md).
Every static finding and every needs_validation runtime finding is a hypothesis. Try to
disprove it before reporting it:
ui_network, open the source
file:line, read the +page.server.ts load, check whether the value is real or a
placeholder, whether the third party is actually yours (same company, first-party API
on another subdomain), whether the header is set in production (hooks.server.ts,
adapter, CDN) even if missing in dev.confirmed: you reproduced it and can quote the evidence (tool output line, request,
file:line). Nothing is confirmed on pattern match alone.needs_validation: plausible but one fact is missing. Name that exact fact
("is /api/me behind auth in production?", "is PUBLIC_MAPS_KEY restricted by referrer
in the provider console?"), not "needs more review".localhost are info unless
you confirmed the production config.Use REPORT-TEMPLATE.md: per-screen table, then findings sorted by severity (high first),
each with severity, verdict, title, evidence, file:line, fix. Optionally emit the
findings as JSON matching finding-schema.json (same shape as ui_security_scan and
svelte-grab audit).
kind:abcd…(len N, sha xxxxxx); keep that form. Two occurrences with the same sha are
the same secret. If you read a raw value in a source file, redact it the same way.QUIET at idle. Use the user's budgets when
given and state which ones you used.+page.server.ts load,
select fields instead of returning the DB row, add rel="noopener noreferrer", ...).
Do not apply fixes unless asked; when asked, re-run the check that found it to prove
the fix (ui_wait_for_hmr then the same tool).What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
npx claudepluginhub heicg/svelte-grab --plugin svelte-grabOther plugins' skills for the same job