Performance audit 1.2.2
Audit static HTML for CLS, lazy-loading, and render-blocking scripts — with safe auto-fixes. Deutsch
Maturity: Documented as stable in VelinStyle 1.2.0. Design Intelligence (plan / review / agent meta) is separate and beta / foundation where noted.
When to use
- Static HTML checks for CLS, lazy-loading, and render-blocking scripts before release.
- Pair with
velinstyle scanfor security/a11y andbootFromDOMinstead of full bundles.
When not
- Do not treat autofix as a Lighthouse replacement — still measure in a real browser.
- Review
--writediffs; defaults may not match every design.
Commands
velinstyle perf audit samples/
velinstyle perf audit index.html
velinstyle perf suggest .
velinstyle perf fix . --write
velinstyle perf audit . --json
perf audit|suggest|fix and velinstyle scan accept a directory or a single file (same pattern as layout).
Rules
| Rule | Severity | Autofix |
|---|---|---|
img-missing-dimensions | warning | width/height defaults |
img-no-lazy | info | loading="lazy" |
script-no-defer | warning | defer on external scripts |
large-inline-style | info | — |
font-display-swap | info | hint in report |
unused-velin-import | info | suggests runtime subpath |
CI
Run npm run test:perf in the framework repo, or npx velinstyle perf audit samples/ --json in CI. Exit code 1 when any error-severity issue is found.
Related
- Production Builder — publish path (trim assets);
perfstays audit-only - CLI
perf· CLIscan - Runtime tree-shaking · Repo tools