optimize-performance

Identify and apply backend performance improvements to reduce endpoint latency.

28|3|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/girijashankarj/cursor-handbook --skill optimize-performance-girijashankarj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-performance
Source: https://github.com/girijashankarj/cursor-handbook/tree/main/.cursor/skills/backend/optimize-performance
Command: npx skills add https://github.com/girijashankarj/cursor-handbook --skill optimize-performance-girijashankarj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and apply backend performance improvements to speed up endpoints and reduce latency.

Core Features & Use Cases

  • Measure: collect metrics and identify the slow path (endpoint, query, or function).
  • Profile: pinpoint bottlenecks (DB queries, N+1, CPU, I/O) and avoid guessing.
  • Design & Implement: propose 1–2 concrete changes (index, batch, cache, algorithm) and apply them while preserving behavior.
  • Verify: re-run the scenario and confirm improvement, employing existing tests.

Quick Start

Begin by measuring the current latency of the target endpoint and follow the five-step workflow.

Frequently Asked Questions about optimize-performance

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

FAQPage Schema
How do I reduce backend latency for slow database queries?

To reduce backend latency, you must first measure the current endpoint speed, profile to pinpoint bottlenecks like N+1 queries, then design changes such as adding indexes or caching before verifying the improvement.

What is the best way to profile backend performance bottlenecks?

The best way to profile backend performance is to follow a measured workflow that identifies slow paths in endpoints, database queries, or microservices pipelines, pinpointing CPU, I/O, or N+1 issues rather than guessing.

Can I optimize microservices performance without measuring first?

No, you should not optimize microservices performance without measurement. The workflow enforces safety rules requiring you to collect metrics and identify the slow path before proposing and implementing any caching or indexing changes.

How do I apply database indexing to speed up web service endpoints?

To apply database indexing, measure the current latency, profile the query bottleneck, then implement the index alongside batching or caching while preserving behavior, and verify the endpoint improvement using existing tests.

When should I use caching versus indexing for backend optimization?

You choose between caching and indexing after profiling the bottleneck. Profiling determines whether latency stems from I/O, CPU, or database queries, guiding you to propose one or two concrete changes that best address the specific slow path.

Does backend performance optimization work for microservices pipelines?

Yes, backend performance optimization applies to microservices pipelines. It targets web services and database-heavy queries where latency matters, enforcing parameterized queries and pagination to safely reduce latency across the pipeline.