performance-optimization

Measure p50/p95 bottlenecks, apply targeted fixes, and verify improvements.

18|1|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/nexus-substrate/nexus-agents --skill performance-optimization-nexus-substrate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/nexus-substrate/nexus-agents/tree/main/skills/performance-optimization
Command: npx skills add https://github.com/nexus-substrate/nexus-agents --skill performance-optimization-nexus-substrate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Performance optimization often turns into guesswork, slowing teams down with changes that are hard to validate and easy to regress; this Skill replaces speculation with measurement-driven improvements that target the real bottleneck.

Core Features & Use Cases

  • Measure-first workflow (MIFVG): Establish a baseline (p50/p95), profile to identify the true bottleneck, implement a targeted fix, verify with reproducible before/after results, and guard against silent regressions.
  • Evidence-aligned remediation patterns: Apply common fixes only when measurements support them, such as removing N+1 queries via batching, preventing unbounded data via pagination/cursors, eliminating synchronous I/O on hot paths, reducing unnecessary serialization, improving cache hit/miss patterns, using code-splitting for bundle size regressions, and addressing re-render storms in UI frameworks.
  • Verification and governance checks: Require a clear reproduction scenario, profiler-based bottleneck identification, test/lint/typecheck pass-through, and documented monitoring/performance gates (including Core Web Vitals checks when relevant).

Quick Start

Ask the AI to optimize the code path for reported slowness by measuring p50 and p95, profiling to pinpoint the bottleneck, applying a single targeted fix, verifying reproducibly, and adding a performance guard.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I fix slow code and identify real performance bottlenecks?

Fix slow code by establishing a p50/p95 baseline, profiling to pinpoint the true bottleneck, applying a targeted fix, and verifying reproducible before/after results to eliminate guesswork.

What is the best way to resolve N+1 queries and unbounded data fetching?

Resolve N+1 queries and unbounded data by applying measurement-supported fixes like batching, pagination, or cursors, ensuring changes target profiler-identified bottlenecks rather than speculation.

How do I prevent performance regressions after optimizing a slow core path?

Prevent performance regressions by adding performance gates and monitoring, such as Core Web Vitals checks, to CI pipelines to catch silent degradation after slow core path remediation.

Does performance optimization work for both backend query slowness and frontend bundle size?

Performance optimization applies to both backend scenarios like query, I/O, serialization, and caching issues, and frontend scenarios like bundle size, re-render storms, and Core Web Vitals.

Why does my UI framework experience re-render storms and how can I profile them?

UI re-render storms occur from unnecessary component updates; profile them using the measure-identify-fix-verify-guard workflow to apply targeted fixes and verify reproducible before/after improvements.

What's the best way to measure before-and-after improvements when optimizing performance?

Measure before-and-after improvements by establishing numeric p50/p95 baselines, profiling bottlenecks, applying a single targeted fix, and verifying reproducible results with profiler evidence.