/frontend:validatefrom frontend
Enforces a validation discipline for code changes: browser-first verification via Playwright, flaky-suite detection, cross-checking test counts, and running full validation pipelines (lint, unit tests, storybook, builds).
Ships in frontend. 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.
frontend:validate-file reproduces with pnpm test:story first and checks the browser once the story test passesfrontend:playwright skill for all rules on screenshots, critical examination, browser_evaluate measurements, and visual debugging. NEVER ask the user to check their browser: that is YOUR jobmsw tests are flaky on a single run. Before declaring green, run 3x in a row from a clean state: kill a test server left over from an earlier run of this suite (never another project's live run), delete node_modules/.vite and node_modules/.cache/storybook, then run. ALL three must pass as full runs, not --last-failed or --since-last-run. One green run is meaninglessTest Files N passed (N) ≠ verification. Always cross-check the test count against the expected total. A run that "passes 85/85" test files but only executes 147 of 192 tests has silently skipped 45 tests, about 23% of the suitepnpm validate when package.json has it. The SETUP.md template (repo root, not shipped with the plugin) runs test:unit and lint:summary concurrently, then test:storybook; lint:summary covers knip, svelte-check, oxlint, eslint and stylelint, and pnpm validate:build below adds the builds. Must exit 0, and its lint table must show no failure: the template lint-summary.ts exits 0 even when a lint task fails. A CSS-only change: see the exception under pnpm validate:build belowpnpm test:unit (vitest) after every change. pnpm test, where a project defines it, can also launch Playwright e2e tests (with the sv add playwright config, Playwright's webServer builds and previews the app first; in another config, its webServer setting decides whether a server must already run): use pnpm test:unit for quick feedbackpnpm dev, not pnpm buildfrontend:playwright skill)pnpm test:unit exercises msw handlers only where a test sends a request through msw: a browser test that mounts a component that fetches, with the worker started (e.g. in a setup file), or a node test with setupServer listening. Handlers and fixtures that only stories use, and Storybook rendering, need the storybook project and a browser check (svelte-5:msw, svelte-5:storybook-vitest)pnpm lint:file <file>: run this on every edited file. It runs eslint + knip, oxlint for JS and TS files, plus svelte-check (with --tsgo by default) when the list holds a .svelte file, or tsgo --noEmit when it holds a TypeScript file (.ts, .tsx, .mts, .cts) and no .svelte file (a list with neither gets no type check), with the type-check and knip output filtered to the listed files. Without tsgo installed, its tsgo step still reports ✓, and so does its svelte-check step unless SVELTE_CHECK_FLAGS drops --tsgo, so install every tool first (SETUP.md; other false-green cases: frontend:validate-file, type-check caveats).svelte, .svelte.ts, .svelte.js files: ALWAYS run the Svelte autofixer (mcp__plugin_svelte_svelte__svelte-autofixer) after editing to validate Svelte 5 correctness, except on a .svelte file not yet migrated (pure Svelte 4: export let, $:, <slot />, no runes; frontend:validate-file story loop, step 5). pnpm lint:file does not run it: the template's lint-file.ts has no autofixer stepCI=true GITHUB_ACTIONS=true to catch tools that auto-detect CI and change behavior (e.g. oxlint switches to --format=github). NEVER push a CI "fix" without local CI simulation firstpnpx [email protected] <file> after editing any .yml or .yaml workflow file in .github/workflows/. Exit code 0 or it's not valid. Check the path with test -f <file> first: for a path that matches no file, and for a directory, node-actionlint prints nothing and still exits 0pnpm validate:build as the final verification: runs validation and build tasks concurrently. See SETUP.md for how to configure this script. One command, everything checked. Exception: a CSS-only change needs no build: verify it visually via Playwright, plus lint, vitest and svelte-checkpnpm test:e2e (where the project defines it, as sv add playwright does; otherwise not covered here). If you modified vitest tests, run pnpm test:unit. If you modified stories, run pnpm test:storybook. The SETUP.md template's pnpm validate runs no Playwright e2e. Changed tests must actually execute and passpnpm lint:tests. One command, runs 4 linters: oxlint and eslint on the test files matching TEST_GLOBS (src/**/*.test.ts and tests/**/*.test.ts by default), knip and svelte-check (with --tsgo by default) on what knip.tests.jsonc and tsconfig.tests.json cover. Lint a *.e2e.ts test from sv add playwright, a *.spec.ts test, or a test file outside the TEST_GLOBS patterns with pnpm lint:file. Without tsgo (with the default --tsgo flag) or without tsconfig.tests.json, its svelte-check step reports ✓; a missing knip.tests.jsonc fails its knip step; when no file matches TEST_GLOBS it lints nothing and exits 0 (SETUP.md). Must exit 0. Do NOT run individual linters: you WILL forget onetee /tmp/test-output.log. If output is already in context, READ IT: never rerun. NEVER run the same expensive command twice in a row just to grep differentlypnpm validate:build exit 0 with no failure in its lint table (or, for a CSS-only change, the exception above)? Each edited workflow file passed test -f and then exited 0 under pnpx [email protected]?git diff to see what actually changed. Subagents can claim "done, no changes needed" while having silently modified files, or claim "fixed" while having broken something. Never tell the user "I didn't change that" without checking git firstWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fubits1/svelte-skills --plugin frontend13 skills in this plugin
/code-styleCode style rules for all languages: variable naming, brace style, HTML data attributes, markup, forms and locale formatting, CSS nesting. Auto-invoke when editing code files, writing new functions or markup, or naming variables./code-style-cssUse when editing CSS, SCSS, or style blocks in .svelte files. Covers CSS-specific code style rules. Auto-invoke when writing or modifying styles./commentsComment rules for every language: which comments survive, format, protected comments, placement, TODOs. Use when writing, editing, moving or deleting comments, docstrings or TODOs. Auto-invoke when editing code files./css-nestingConvert flat CSS to nested & syntax while satisfying stylelint's no-descending-specificity and no-duplicate-selectors rules. Use when nesting selectors, refactoring flat CSS to &, or fixing stylelint specificity/duplicate errors after nesting./css-subgridUse when building card grids, tile layouts, or repeated components where inner content (icons, titles, prices, buttons) must align across siblings. Also use when seeing misaligned card content at different text lengths./editingFile editing discipline: correct types, safe refactors, Svelte file rules, config overrides, markdown lint, visual refactors. Requires frontend:code-style and frontend:comments. Auto-invoke when editing code files.Other plugins' skills for the same job