reactive-dashboard-performance
Optimizes dashboard performance through efficient rendering, caching, and component-level code splitting.
Install
mkdir -p .claude/skills/reactive-dashboard-performance && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12370" && unzip -o skill.zip -d .claude/skills/reactive-dashboard-performance && rm skill.zipInstalls to .claude/skills/reactive-dashboard-performance
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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,Key capabilities
- →Implement skeleton-first loading for perceived instant load times.
- →Apply aggressive caching strategies using React Query.
- →Utilize code splitting for route-based and component-level optimization.
- →Employ memoization strategies for expensive computations and pure components.
- →Test reactive dashboards with mock strategies at service boundaries.
- →Debug integration test timeouts by checking rendered DOM and unmocked dependencies.
How it works
The skill applies performance patterns like skeleton loading, aggressive caching, code splitting, and memoization to React dashboards, and provides strategies for testing asynchronous components and debugging timeouts.
Inputs & outputs
When to use reactive-dashboard-performance
- →Optimizing dashboard load times
- →Fixing slow React components
- →Implementing reactive caching
About this skill
Reactive Dashboard Performance
Expert in building production-grade reactive dashboards that load in <100ms and have comprehensive test coverage.
Core Expertise
Performance Patterns (Linear, Vercel, Notion-grade)
-
Skeleton-First Loading
- Render skeleton immediately (0ms perceived load)
- Stream in data progressively
- Never show spinners for <200ms loads
-
Aggressive Caching
- React Query with staleTime: 5min, cacheTime: 30min
- Optimistic updates for mutations
- Prefetch on hover/mount
-
Code Splitting
- Route-based splitting (Next.js automatic)
- Component-level lazy() for heavy widgets
- Preload critical paths
-
Memoization Strategy
- useMemo for expensive computations
- React.memo for pure components
- useCallback for stable references
Testing Reactive Dashboards
-
Mock Strategy
- Mock at service boundary (React Query, analytics)
- Never mock UI components (test real DOM)
- Use MSW for API mocking when possible
-
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
- Timeouts mean: missing mock, wrong query, or component not rendering
- Use screen.debug() to see actual DOM
- Check console for unmocked errors
-
Test Wrapper Pattern
const TestProviders = ({ children }) => ( <QueryClientProvider client={testQueryClient}> <AuthProvider> {children} </AuthProvider> </QueryClientProvider> );
Real-World Examples
- 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
Diagnostic Protocol
Integration Test Timeouts
-
Check what's actually rendering
render(<Component />); screen.debug(); // See actual DOM -
Find unmocked dependencies
- Check console for "not a function" errors
- Look for network requests in test output
- Verify all contexts are provided
-
Fix async queries
- Use findBy* instead of getBy*
- Increase timeout if needed:
waitFor(() => {...}, { timeout: 3000 }) - Mock React Query properly
-
Simplify component tree
- Test widgets individually first
- Add full integration tests last
- Use data-testid for complex queries
Performance Optimization
Dashboard Load Budget
| Phase | Target |
|---|---|
| Skeleton render | 0-16ms (1 frame) |
| First data paint | <100ms |
| Full interactive | <200ms |
| Lazy widgets | <500ms |
React Query Config
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000, // 5min
cacheTime: 30 * 60 * 1000, // 30min
refetchOnWindowFocus: false,
refetchOnMount: false,
retry: 1,
},
},
});
Skeleton Pattern
function Dashboard() {
const { data, isLoading } = useQuery('dashboard', fetchDashboard);
// Show skeleton immediately, no loading check
return (
<div>
{data ? <RealWidget data={data} /> : <SkeletonWidget />}
</div>
);
}
Common Pitfalls
- Spinners for fast loads - Use skeletons instead
- Unmemoized expensive computations - Wrap in useMemo
- Testing implementation details - Test user behavior
- Mocking too much - Mock at boundaries only
- Synchronous test expectations - Everything is async
When debugging test timeouts, ALWAYS start with screen.debug() to see what actually rendered.
When not to use it
- →When the goal is to test implementation details rather than user behavior.
- →When mocking too many components instead of just at boundaries.
- →When expecting synchronous test expectations for asynchronous operations.
Limitations
- →The skill focuses on React dashboards and may not apply to other UI frameworks.
- →The skill's testing strategies are specific to React Testing Library patterns.
- →The skill's performance targets are specific to dashboard load budgets.
How it compares
This skill provides specific, production-grade performance patterns and testing strategies for reactive dashboards, including detailed configurations and debugging protocols, unlike general React optimization advice.
Compared to similar skills
reactive-dashboard-performance side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| reactive-dashboard-performance (this skill) | 0 | 5mo | No flags | Advanced |
| audit | 0 | 3mo | No flags | Intermediate |
| nextjs-developer | 328 | 2mo | No flags | Advanced |
| frontend-developer | 27 | 3mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by curiositech
View all by curiositech →You might also like
audit
educlopez
Technical UI audit — a11y, performance, responsive. Produces a prioritized findings table. Invoke when the user asks for audit on their UI, or mentions 'audit' alongside design / UI / frontend work.
nextjs-developer
zenobi-us
Expert Next.js developer mastering Next.js 14+ with App Router and full-stack features. Specializes in server components, server actions, performance optimization, and production deployment with focus on building fast, SEO-friendly applications.
frontend-developer
sickn33
Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.
nextjs-app-router-patterns
wshobson
Master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR/SSG, or optimizing React Server Components.
roier-seo
davila7
Technical SEO auditor and fixer. Runs Lighthouse/PageSpeed audits on websites or local dev servers, analyzes SEO/performance/accessibility scores, and automatically implements fixes for meta tags, structured data, Core Web Vitals, and accessibility issues.
bundle-dynamic-imports
TheOrcDev
Use next/dynamic for lazy-loading heavy components. Apply when importing large components like editors, charts, or rich text editors that aren't needed on initial render.