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.
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.