performance-optimization

Optimizes Core Web Vitals and latency through measure-identify-fix-verify-guard workflow with EXPLAIN ANALYZE and Lighthouse-CI.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/jankneumann/agentic-assistant --skill performance-optimization-jankneumann
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/jankneumann/agentic-assistant/tree/main/.agents/skills/performance-optimization
Command: npx skills add https://github.com/jankneumann/agentic-assistant --skill performance-optimization-jankneumann

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves performance regressions and slow user experiences by turning optimization into a disciplined MEASURE → IDENTIFY → FIX → VERIFY → GUARD workflow across frontend and backend.

Core Features & Use Cases

  • Performance measurement & baselining: Establish real-world baselines using synthetic testing (e.g., Lighthouse) and real user monitoring (RUM), plus APM and DB timing to quantify p50/p95/p99.
  • Bottleneck identification: Pinpoint whether slowness comes from frontend Core Web Vitals issues (LCP/INP/CLS) or backend latency causes such as N+1 queries, missing indexes, connection-pool saturation, or async/CPU bottlenecks.
  • Targeted fixes with verification: Use EXPLAIN ANALYZE (Postgres) / EXPLAIN FORMAT=JSON (MySQL) and profiling tools like py-spy / cProfile to change only what measurements prove matters, then re-measure to confirm the improvement.
  • Regression guardrails: Add monitoring and CI checks (bundle budgets, Lighthouse-CI, alerting at ~80% of budgets) so improvements don’t decay after the next release.

Use case example: You notice p95 API latency spiking after a release; use this Skill to measure the specific endpoint and trace it to N+1 query patterns, apply a batching/join/eager-loading fix, then validate the new p95 drops into the agreed latency budget.

Quick Start

Use the performance-optimization skill when you have a slow endpoint or Core Web Vitals regression and want a MEASURE → IDENTIFY → FIX → VERIFY → GUARD plan that includes profiling, targeted fixes (e.g., N+1 and indexing), and a regression 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 p95 API latency caused by N+1 queries?

Fix slow p95 API latency by measuring endpoint baselines with APM, using EXPLAIN ANALYZE to identify N+1 query patterns, applying batching or eager-loading fixes, and verifying the p95 drop with re-measurement.

How do I optimize Core Web Vitals like LCP and INP for slow page loads?

Optimize Core Web Vitals by establishing LCP and INP baselines using Lighthouse and RUM, pinpointing frontend render bottlenecks, applying React render hygiene fixes, and adding Lighthouse-CI guardrails to prevent regressions.

What is the best way to find backend bottlenecks causing intermittent slow database operations?

Find backend bottlenecks by profiling with py-spy or cProfile and running EXPLAIN ANALYZE on queries to reveal missing indexes or connection-pool saturation, changing only what measurements prove matters.

How do I prevent performance regressions after deploying optimizations?

Prevent performance regressions by adding CI guardrails like bundle budgets and Lighthouse-CI checks, setting alerting at roughly 80% of your latency thresholds to ensure improvements do not decay after release.

Do I need baseline measurements before starting performance optimization?

Baseline measurements are required before performance optimization to quantify p50 and p95 latency, identify the true bottleneck, and establish a reference to verify that targeted fixes actually improve performance.

How do I trace a slow API endpoint to a specific database query plan?

Trace slow API endpoints to specific query plans by using EXPLAIN FORMAT=JSON for MySQL or EXPLAIN ANALYZE for Postgres to inspect execution paths, then applying indexing or batching fixes one variable at a time.