Agent skill

reactive-dashboard-performance

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.

Stars 81
Forks 12

Install this agent skill to your Project

npx add-skill https://github.com/curiositech/some_claude_skills/tree/main/.claude/skills/reactive-dashboard-performance

Metadata

Additional technical details for this skill

tags
react performance testing dashboard optimization
category
Frontend Development
pairs with
[
    {
        "skill": "react-performance-optimizer",
        "reason": "Dashboard performance depends on React memoization, virtualization, and state management"
    },
    {
        "skill": "admin-dashboard",
        "reason": "Admin dashboards are the primary consumer of reactive dashboard performance patterns"
    },
    {
        "skill": "data-viz-2025",
        "reason": "Dashboard charts and graphs require performant data visualization rendering"
    }
]

SKILL.md

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)

  1. Skeleton-First Loading

    • Render skeleton immediately (0ms perceived load)
    • Stream in data progressively
    • Never show spinners for <200ms loads
  2. Aggressive Caching

    • React Query with staleTime: 5min, cacheTime: 30min
    • Optimistic updates for mutations
    • Prefetch on hover/mount
  3. Code Splitting

    • Route-based splitting (Next.js automatic)
    • Component-level lazy() for heavy widgets
    • Preload critical paths
  4. Memoization Strategy

    • useMemo for expensive computations
    • React.memo for pure components
    • useCallback for stable references

Testing Reactive Dashboards

  1. Mock Strategy

    • Mock at service boundary (React Query, analytics)
    • Never mock UI components (test real DOM)
    • Use MSW for API mocking when possible
  2. Async Handling

    typescript
    // WRONG - races with React
    render(<Dashboard />);
    const element = screen.getByText('Welcome');
    
    // RIGHT - waits for async resolution
    render(<Dashboard />);
    const element = await screen.findByText('Welcome');
    
  3. Timeout Debugging

    • Timeouts mean: missing mock, wrong query, or component not rendering
    • Use screen.debug() to see actual DOM
    • Check console for unmocked errors
  4. Test Wrapper Pattern

    typescript
    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

  1. Check what's actually rendering

    typescript
    render(<Component />);
    screen.debug(); // See actual DOM
    
  2. Find unmocked dependencies

    • Check console for "not a function" errors
    • Look for network requests in test output
    • Verify all contexts are provided
  3. Fix async queries

    • Use findBy* instead of getBy*
    • Increase timeout if needed: waitFor(() => {...}, { timeout: 3000 })
    • Mock React Query properly
  4. 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

typescript
const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      staleTime: 5 * 60 * 1000, // 5min
      cacheTime: 30 * 60 * 1000, // 30min
      refetchOnWindowFocus: false,
      refetchOnMount: false,
      retry: 1,
    },
  },
});

Skeleton Pattern

typescript
function Dashboard() {
  const { data, isLoading } = useQuery('dashboard', fetchDashboard);

  // Show skeleton immediately, no loading check
  return (
    <div>
      {data ? <RealWidget data={data} /> : <SkeletonWidget />}
    </div>
  );
}

Common Pitfalls

  1. Spinners for fast loads - Use skeletons instead
  2. Unmemoized expensive computations - Wrap in useMemo
  3. Testing implementation details - Test user behavior
  4. Mocking too much - Mock at boundaries only
  5. Synchronous test expectations - Everything is async

When debugging test timeouts, ALWAYS start with screen.debug() to see what actually rendered.

Expand your agent's capabilities with these related and highly-rated skills.

curiositech/some_claude_skills

3d-cv-labeling-2026

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

81 12
Explore
curiositech/some_claude_skills

project-management-guru-adhd

Expert project manager for ADHD engineers managing multiple concurrent projects. Specializes in hyperfocus management, context-switching minimization, and parakeet-style gentle reminders. Activate on 'ADHD project management', 'context switching', 'hyperfocus', 'task prioritization', 'multiple projects', 'productivity for ADHD', 'task chunking', 'deadline management'. NOT for neurotypical project management, rigid waterfall processes, or general productivity advice without ADHD context.

81 12
Explore
curiositech/some_claude_skills

large-scale-map-visualization

Master of high-performance web map implementations handling 5,000-100,000+ geographic data points. Specializes in Leaflet.js optimization, Supercluster algorithms, viewport-based loading, canvas rendering, and progressive disclosure UX patterns.

81 12
Explore
curiositech/some_claude_skills

adhd-design-expert

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

81 12
Explore
curiositech/some_claude_skills

liaison

Translate multi-agent ecosystem activity into human-readable status briefings, decision requests, and progress summaries. Use for 'status update', 'brief me', 'what happened', 'summarize progress'. NOT for project planning (use project-management-guru-adhd), code review, or technical documentation.

81 12
Explore
curiositech/some_claude_skills

windows-95-web-designer

Modern web applications with authentic Windows 95 aesthetic. Gradient title bars, Start menu paradigm, taskbar patterns, 3D beveled chrome. Extrapolates Win95 to AI chatbots, mobile UIs, responsive layouts. Activate on 'windows 95', 'win95', 'start menu', 'taskbar', 'retro desktop', '95 aesthetic', 'clippy'. NOT for Windows 3.1 (use windows-3-1-web-designer), vaporwave/synthwave, macOS, flat design.

81 12
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results