performance-optimization — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited performance-optimization (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Make the interface feel instant and measure honestly: find where users wait, decide per wait whether to eliminate it (optimistic UI, preloading, batching) or mask it (skeletons, progressive loading), and implement the fix. The prime directive: perceived latency outranks actual latency — a 3-second operation that responds instantly to the click beats a 1-second one that freezes — but never fake what you can't deliver (no invented progress numbers, no optimistic UI where rollback would burn the user). Deliver an audit ranked by user impact plus working code.
Use for: sluggish-feeling interactions, optimistic UI, Core Web Vitals remediation, preloading/anticipatory loading, request batching/dedup, layout-shift fixes, perceived-performance strategy.
Hand off instead when the real need is:
skills/frontend-design/loading-statesskills/frontend-design/interaction-physics (motion spec) or skills/frontend-design/design-engineer-mindset (rendering pipeline, layout thrashing)skills/frontend-design/error-handling-recoveryfetch/axios vs a data library (TanStack Query, SWR, Apollo, RTK Query). This decides implementation strategy — libraries get optimistic updates and dedup through their APIs; hand-rolled fetching may need those primitives added.await chains that could parallelize, duplicate fetches of the same resource, effects re-fetching on every render.aspect-ratio, content injected above existing content, fonts swapping without fallback metrics, ad/embed slots without reserved space.web-vitals package, Lighthouse CI, RUM/analytics. If the project runs in this environment, get real numbers (Lighthouse or a profile) before and after — never quote scores you didn't measure.Ask the user (one batch, only what inspection didn't answer): which flows feel slow (or is it a Lighthouse/CWV score problem?), and any field data available (CrUX, analytics). If the complaint is already specific ("saving a task feels laggy"), don't ask — profile that flow and proceed.
| Perceived wait | Treatment |
|---|---|
| < 100ms | Nothing needed — feels instant |
| 100ms – 1s | Instant local feedback (button state) — no spinner |
| 1s – 10s | Eliminate if possible; else mask with skeleton/spinner (per skills/frontend-design/loading-states) |
| > 10s | Progress with real numbers + background the work if the stack allows |
skills/frontend-design/error-handling-recovery). Optimistic UI without rollback is a data-integrity bug, not a performance win.In priority order:
await chains with Promise.all or batched endpoints; deduplicate in-flight requests (data libraries do this free).references/patterns.md.Core Web Vitals "good" thresholds (75th percentile of field data):
font-display strategy with fallback metrics.Do not invent numbers: report only measured values, label lab vs field, and if you can't measure in this environment, deliver the fixes plus instructions for the user to verify.
Re-measure the same way you measured before (same tool, same page, throttling noted). For optimistic flows, force a failure and confirm exact rollback + notice. For CLS fixes, reload with network throttling and watch for shift.
Deliver both artifacts:
1. The code — implemented optimistic mutations (via the project's data library when present), parallelized/batched/deduplicated requests, masking treatments, and vitals fixes.
2. Performance Audit (markdown):
## Summary
One paragraph: what felt/measured slow, root causes, what changed.
## Measurements
| Metric | Before | After | Threshold | Source (lab/field, tool) |
| LCP | 4.1s | 2.2s | ≤2.5s | Lighthouse, throttled |
| INP | — | — | ≤200ms | not measurable here — verify via [tool] |
| CLS | 0.34 | 0.05 | ≤0.1 | Lighthouse |
(only rows you actually measured; never invented)
## Findings & fixes (ranked by user impact)
| # | Finding | Evidence | Fix | Status |
| 1 | Task save blocks UI ~800ms | network tab | optimistic update + rollback | implemented |
| 2 | 4 serial awaits on dashboard load | code | Promise.all | implemented |
| 3 | Hero image no dimensions → CLS | measured 0.34 | aspect-ratio + preload | implemented |
## Mutation strategy table
| Mutation | Strategy | Why | Rollback/undo |
| Like toggle | optimistic | trivial reversal | snapshot restore |
| Checkout | pessimistic | irreversible charge | n/a — inline pending |
## Not done / recommended next
[Backend latency, infra, CDN items outside frontend scope]await chains left where requests are independentprefers-reduced-motion; staggering cappedHard don'ts: don't add a data-fetching library solely for one optimization without flagging the tradeoff; don't chase a Lighthouse score with tricks that hurt real UX (lazy-loading the LCP image, skeleton-flashing instant content); don't remove existing loading feedback just to "feel faster".
skills/frontend-design/loading-states → owns which indicator shows for waits this skill can't eliminate; run them together — space reservation is shared CLS work.skills/frontend-design/error-handling-recovery → supplies the rollback failure messaging every optimistic mutation needs.skills/frontend-design/design-engineer-mindset → owns rendering-pipeline depth (layout thrashing, frame budget) when INP/jank fixes need main-thread work.skills/frontend-design/interaction-physics → its compositor-only animation rule prevents the jank this skill would otherwise have to fix.references/patterns.md — optimistic create/delete/toggle with rollback, data-library notes, skeleton/blur-up/progressive/staggered masking, anticipatory preloading, request batching and dedup code, and CWV measurement guidance. Read it when implementing the fixes.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.