performance-optimization

Diagnose and fix frontend and backend performance bottlenecks through measurement-driven optimization workflows.

2|Updated Jul 25, 2026
One-click install
npx skills add https://github.com/ankaboot-source/boucle --skill performance-optimization-ankaboot-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/ankaboot-source/boucle/tree/main/.jcode/skills/performance-optimization
Command: npx skills add https://github.com/ankaboot-source/boucle --skill performance-optimization-ankaboot-source

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web applications slow down through N+1 queries, oversized bundles, unoptimized images, and render-blocking resources, but teams often optimize blindly without profiling data. This Skill enforces a measure-first workflow that identifies real bottlenecks, fixes them, verifies the improvement, and guards against regressions. ## Core Features & Use Cases - Measurement-First Workflow: Follows a five-step loop (measure, identify, fix, verify, guard) using Lighthouse, Chrome DevTools, web-vitals RUM data, and backend query logging. - Anti-Pattern Fixes: Provides concrete code fixes for N+1 queries, unbounded data fetching, missing image optimization, unnecessary React re-renders, large bundles, and missing caching. - Core Web Vitals Targets: Defines thresholds for LCP, INP, and CLS plus enforceable performance budgets for bundle size, API latency, and Lighthouse scores in CI. - Use Case: When users report a sluggish dashboard, profile the interaction in DevTools, find long tasks blocking the main thread, apply code splitting or memoization, then re-measure against the baseline and revert if the gain is within noise. ## Quick Start Ask the AI to profile the slow page load on the dashboard route and fix the identified bottleneck following the performance-optimization workflow.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I fix N+1 queries in my backend API?

Replace per-record queries with a single query using joins or eager loading, such as Prisma's include option. Detect N+1 patterns by enabling database query logging and looking for repeated similar queries within one request.

How to improve Core Web Vitals scores like LCP and INP?

For LCP, optimize hero images with responsive srcset, modern formats like AVIF, and fetchpriority="high". For INP, break up long tasks over 50ms using scheduler.yield() and defer non-critical work out of event handlers.

What performance budgets should I enforce in CI?

Recommended budgets are under 200KB gzipped JavaScript, under 50KB CSS, API responses under 200ms at p95, and a Lighthouse score of at least 90. Enforce them with bundlesize and Lighthouse CI in your pipeline.

Does React.memo always improve rendering performance?

No. React.memo helps only for expensive components that re-render with identical props, and overusing it adds comparison overhead. Profile first with the Performance tab and apply memoization only where measurements show benefit.

When should I avoid optimizing performance?

Avoid optimizing without profiling evidence of an actual problem. Premature optimization adds complexity and maintenance cost without measurable gains, and changes that show no improvement over baseline should be reverted.

Why did my optimization show no measurable improvement?

The change may have targeted the wrong bottleneck, or the gain is within run-to-run variance. Re-measure under identical conditions as the baseline, compare against variance rather than the mean, and revert if the delta is noise.