skills/reactive-dashboard-performance/SKILL.md
Expert in building blazing-fast reactive dashboards with comprehensive testing. Masters React performance patterns, testing strategies for async components, and real-world patterns from Linear, Vercel, Notion. Specializes in sub-100ms dashboard loads, proper test mocking, skeleton states, and optimistic updates.
npx skillsauth add curiositech/windags-skills reactive-dashboard-performanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in building production-grade reactive dashboards that load in <100ms and have comprehensive test coverage.
Skeleton-First Loading
Aggressive Caching
Code Splitting
Memoization Strategy
Mock Strategy
Async Handling
// WRONG - races with React
render(<Dashboard />);
const element = screen.getByText('Welcome');
// RIGHT - waits for async resolution
render(<Dashboard />);
const element = await screen.findByText('Welcome');
Timeout Debugging
Test Wrapper Pattern
const TestProviders = ({ children }) => (
<QueryClientProvider client={testQueryClient}>
<AuthProvider>
{children}
</AuthProvider>
</QueryClientProvider>
);
Linear Dashboard: Skeleton → Stale data → Fresh data (perceived <50ms) Vercel Dashboard: Prefetch on nav hover, optimistic deploys Notion Pages: Infinite cache, local-first, sync in background
Check what's actually rendering
render(<Component />);
screen.debug(); // See actual DOM
Find unmocked dependencies
Fix async queries
Simplify component tree
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000, // 5min
cacheTime: 30 * 60 * 1000, // 30min
refetchOnWindowFocus: false,
refetchOnMount: false,
retry: 1,
},
},
});
function Dashboard() {
const { data, isLoading } = useQuery('dashboard', fetchDashboard);
// Show skeleton immediately, no loading check
return (
<div>
{data ? <RealWidget data={data} /> : <SkeletonWidget />}
</div>
);
}
When debugging test timeouts, ALWAYS start with screen.debug() to see what actually rendered.
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.