review-performance

Audits front-end performance bottlenecks in Vite+React projects with quantified file-level findings and prioritized fixes.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/jacocanete/cebu-airsoft-hub --skill review-performance-jacocanete
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-performance
Source: https://github.com/jacocanete/cebu-airsoft-hub/tree/main/.opencode/skills/review-performance
Command: npx skills add https://github.com/jacocanete/cebu-airsoft-hub --skill review-performance-jacocanete

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies front-end performance regressions across the codebase by auditing bundle size, image delivery, unnecessary re-renders, expensive client-side computations, animation costs, network waterfall patterns, Socket.io lifecycle issues, and React Query cache misconfiguration to improve load time and runtime responsiveness.

Core Features & Use Cases

  • Bundle size analysis: Find heavy imports and recommend code-splitting or lazy-loading for components like canvas animations, animated text, and markdown preview renderers.
  • Image optimization: Detect missing loading attributes, absent width/height leading to CLS, and opportunities to convert assets to WebP/AVIF.
  • Render and compute hotspots: Surface components causing excessive re-renders (recursive comment trees, poll, editor), expensive inline computations, and missing useMemo/useCallback patterns.
  • Network and caching: Identify waterfall fetch patterns, opportunities for useQueries or route-level prefetching, and React Query staleTime/gcTime improvements.
  • Animation & sockets: Verify rAF cancellation, DPR scaling, Framer Motion object stability, and Socket.io connection/handler cleanup to avoid leaks.
  • Use case: Produce an actionable Pass 4 report for the Cebu Airsoft Hub that prioritizes fixes for the landing page and most-used routes (feed, post detail).

Quick Start

Run a Pass 4 performance audit on the repository root and generate the report at docs/code-review/pass-4-performance.md.

Frequently Asked Questions about review-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit my React and Vite project for front-end performance bottlenecks?

To audit React and Vite front-end performance bottlenecks, the Skill scans the codebase for heavy bundle imports, image delivery issues, network waterfalls, and unnecessary re-renders. It generates file-level findings with line references, quantified impact estimates, and prioritized remediation steps.

How do I fix unnecessary re-renders in recursive React components?

To fix unnecessary re-renders in recursive React components like comment trees, the audit identifies missing memoization patterns and expensive inline computations. It then recommends applying useMemo and useCallback to stabilize references and prevent excessive render cycles.

What is the best way to optimize React Query cache and prevent network waterfall fetches?

The best way to optimize React Query cache and prevent network waterfall fetches is by configuring staleTime and gcTime properly. The audit identifies waterfall patterns and recommends route-level prefetching, useQueries, and cache adjustments to improve data fetching efficiency.

Does the performance audit detect Socket.io connection leaks and animation costs?

Yes, the performance audit detects Socket.io connection leaks and animation costs by verifying rAF cancellation, DPR scaling, and Framer Motion object stability. It also checks Socket.io connection and handler cleanup to prevent memory leaks in real-time features.

How do I reduce bundle size when importing heavy canvas animation and markdown preview components?

To reduce bundle size with heavy canvas animation and markdown preview components, the audit finds heavy imports and recommends code-splitting or lazy-loading. This defers loading non-critical modules, directly improving initial load times for landing pages and feed routes.

How do I optimize image delivery to prevent cumulative layout shift in React applications?

To optimize image delivery and prevent cumulative layout shift in React applications, the audit detects missing loading attributes and absent width or height properties. It recommends adding dimensions and converting assets to WebP or AVIF formats for faster delivery.