optimization

Diagnose and optimize system performance bottlenecks using profiling, observability, and measurement-driven workflows.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill optimization-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimization
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/optimization
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill optimization-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Software systems often suffer from hidden performance bottlenecks, slow user flows, and resource inefficiencies that are hard to identify without a systematic, measurement-first methodology. ## Core Features & Use Cases - Bottleneck Identification: Systematic profiling, tracing, and log analysis to detect CPU spikes, memory leaks, high latency, and lock contention. - Full-Stack Optimization Guidance: Covers Core Web Vitals (LCP, INP, CLS) for frontend, plus database indexing, N+1 query avoidance, caching, and connection pooling for backend. - Observability & Verification Cycle: Uses OpenTelemetry, Prometheus, Grafana, and distributed tracing with a Measure-Analyze-Optimize-Verify loop including regression testing. - Use Case: When an API endpoint responds slowly, follow the workflow to baseline current latency, profile the code, form an optimization hypothesis, apply one atomic change, and verify improvement with before/after metrics. ## Quick Start Ask the agent to analyze a slow endpoint or page, establish baseline performance metrics, and propose a verified optimization plan.

Frequently Asked Questions about optimization

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

FAQPage Schema
How do I identify performance bottlenecks in my application?

Identify bottlenecks through four steps: profiling to find CPU and memory hotspots, tracing requests across systems, analyzing logs for slowness patterns, and reviewing user flows for friction points. Always measure a baseline before making changes.

How to optimize slow database queries?

Optimize slow queries by adding indexes to frequently filtered columns, eliminating N+1 query patterns with joins or eager loading, and caching stable data in stores like Redis. Connection pooling also reduces overhead by reusing open database connections.

What are Core Web Vitals and how do I improve them?

Core Web Vitals are LCP (loading speed), INP (interaction responsiveness), and CLS (layout stability). Improve them with server-side rendering or static generation, optimized WebP/AVIF images with lazy loading, and JavaScript bundle splitting.

What observability tools should I use for performance monitoring?

Use Prometheus and Grafana for metrics visualization, Jaeger or Zipkin for distributed tracing, and New Relic or Datadog for full-stack APM. OpenTelemetry provides the standard instrumentation layer connecting these tools.

When should I avoid optimizing code?

Avoid premature optimization before the code works correctly and before you have measurements proving a real bottleneck. Follow the 80/20 rule: focus only on the small portion of code causing most of the performance impact.