Skip to main content
skill CX Codex

performance-optimizer · oakoss — Claude Code skill: how to install

performance-optimizer provides structured workflows for profiling, caching, and full-stack performance tuning. Helps eliminate slow database queries, optimize bundles, and reduce API latency.

MIT 124 installs ★ 29 updated 2026-08-17

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add oakoss/agent-skills --skill performance-optimizer -a claude-code
Open on GitHub

What performance-optimizer does

The skill outlines a six-step performance workflow: profiling, database tuning, caching, frontend adjustments, backend optimization, and monitoring. It defines target budgets such as sub-500ms P95 API responses, sub-100ms database queries, and Core Web Vitals thresholds including LCP under 2.5s and INP under 200ms.

Guidance covers browser caching, CDN layers, and application caches with Redis or Memcached. It flags antipatterns like SELECT *, functions inside WHERE clauses, and synchronous computational loads that belong in background job workers like BullMQ. Without prior measurements from Chrome DevTools, React Profiler, or EXPLAIN ANALYZE, the instructions reject premature code changes.

What it helps with

  • fix N+1 database queries and missing indexes
  • configure multi-tier caching across HTTP headers, CDN, and Redis
  • cut frontend bundle size to hit Core Web Vitals targets
  • move heavy request calculations into BullMQ background queues

Example prompts for the agent

  • Run EXPLAIN ANALYZE on this slow query and suggest targeted indexes
  • Check our API response times against the P95 target and outline a Redis caching strategy
  • Audit our bundle size and configure lazy loading for heavy components

How to install performance-optimizer

1Skills CLI (Vercel)

npx skills add oakoss/agent-skills --skill performance-optimizer -a claude-code

2Manually: put the files in place

~/.claude/skills/performance-optimizer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/performance-optimizer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about performance-optimizer

How to install performance-optimizer in Claude Code?

Run npx skills add oakoss/agent-skills --skill performance-optimizer -a claude-code in your terminal. Alternatively, place the skill file at ~/.claude/skills/performance-optimizer/SKILL.md.

What does performance-optimizer do?

It guides the agent through six optimization phases across database queries, backend APIs, frontend bundles, and cache layers.

Which profiling tools does the skill expect?

The workflow relies on Chrome DevTools, React Profiler, and database EXPLAIN ANALYZE before making any optimization changes.

Source text

SKILL.md · MIT
---
name: performance-optimizer
description: Optimize application performance and scalability. Use when investigating slow applications, scaling bottlenecks, or improving response times. Use for profiling, caching, database optimization, frontend performance, and backend tuning.
license: MIT
metadata:
  author: oakoss
  version: '1.1'
---

# Performance Optimizer

## Overview

Provides a systematic approach to application performance optimization across the full stack. Use when diagnosing slow page loads, high API latency, database bottlenecks, or scaling issues. Not a substitute for application-specific profiling -- always measure before optimizing.

## Quick Reference

### Performance Budgets

| Metric                          | Target  | Category       |
| ------------------------------- | ------- | -------------- |
| Largest Contentful Paint (LCP)  | < 2.5s  | Core Web Vital |
| Interaction to Next Paint (INP) | < 200ms | Core Web Vital |
| Cumulative Layout Shift (CLS)   | < 0.1   | Core Web Vital |
| First Contentful Paint (FCP)    | < 1.8s  | Frontend       |
| Time to Interactive (TTI)       | < 3.8s  | Frontend       |
| Total Blocking Time (TBT)       | < 200ms | Frontend       |
| API Response Time (P95)         | < 500ms | Backend        |
| Database Query Time (P95)       | < 100ms | Database       |
| Server Response Time (TTFB)     | < 600ms | Backend        |

### Optimization Phases

| Phase         | Focus                         | Key Action                                                       |
| ------------- | ----------------------------- | ---------------------------------------------------------------- |
| 1. Profiling  | Identify real bottlenecks     | Chrome DevTools, React Profiler, EXPLAIN ANALYZE                 |
| 2. Database   | Eliminate slow queries        | Strategic indexes, fix N+1, connection pooling                   |
| 3. Caching    | Reduce redundant work         | Redis, HTTP headers, CDN for static assets                       |
| 4. Frontend   | Reduce bundle and render time | Bundle analysis, code splitting, resource hints, lazy loading    |
| 5. Backend    | Speed up API responses        | Serverless optimization, streaming, conditional requests, queues |
| 6. Monitoring | Sustain performance           | APM tools, alerting thresholds, dashboards                       |

### Caching Layers

| Layer         | Scope                  | Duration                                          |
| ------------- | ---------------------- | ------------------------------------------------- |
| Browser Cache | HTTP headers           | Static assets: 1 year (immutable); HTML: no-cache |
| CDN           | Cloudflare, CloudFront | Same as browser, purge on deploy                  |
| Application   | Redis, Memcached       | Varies (e.g., 1 hour for user data)               |
| Database      | Query cache            | Automatic                                         |

## Common Mistakes

| Mistake                                                      | Correct Pattern                                                                                    |
| ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| Optimizing before profiling                                  | Measure first with Chrome DevTools, EXPLAIN ANALYZE, or APM tools to find real bottlenecks         |
| Adding indexes on every column                               | Use strategic indexes on columns in WHERE, ORDER BY, and JOIN clauses; monitor with slow query log |
| SELECT \* on large tables                                    | Select only needed columns to reduce I/O and memory                                                |
| N+1 queries in loops                                         | Eager loading or DataLoader batching                                                               |
| Functions in WHERE clause                                    | Store normalized values, use generated columns to preserve index usage                             |
| Caching without an invalidation strategy                     | Define TTL and invalidate-on-write policies; stale cache is worse than no cache                    |
| Loading entire libraries for a single utility                | Use direct imports and tree-shaking                                                                |
| Running heavy computations synchronously in request handlers | Offload to background job queues (BullMQ) and return immediately                                   |

## Delegation

When working on performance optimization, delegate to:

- `frontend-builder` -- React-specific performance patterns
- `application-security` -- Rate limiting and DDoS protection
- `ci-cd-architecture` -- Build pipeline optimization

## References

- [Profiling and Measurement](references/profiling.md) -- Chrome DevTools, React Profiler, Node.js/Python profiling, database EXPLAIN
- [Database Optimization](references/database.md) -- Strategic indexes, N+1 fixes, query optimization, connection pooling
- [Caching Strategies](references/caching.md) -- Redis patterns, HTTP cache headers, CDN configuration
- [Frontend Performance](references/frontend.md) -- Bundle analysis, code splitting, resource hints, third-party scripts, mobile performance, React patterns
- [Backend Performance](references/backend.md) -- Serverless optimization, streaming responses, conditional requests, background queues, rate limiting
- [Monitoring and Alerting](references/monitoring.md) -- APM tools, custom monitoring, dashboards, alert thresholds

© oakoss · MIT · oakoss/agent-skills

Similar skills

All skills for Backend and APIs →

performance-optimizer by other authors comes first.

performance-optimizer davila7 The performance-optimizer skill helps locate slow points in code, databases, and APIs, then compare measurements before and after changes. Use it when a page, query, or endpoint feels slow. CX Codex +1 70installs optimizing-performance CloudAI-X optimizing-performance guides performance profiling and tuning across frontend, backend, and database layers. It enforces measuring baselines before touching code and verifying against latency targets. CX Codex +1 ★ 1,424repo stars Performance Optimizer daffy0208 Performance Optimizer guides coding agents through profiling, database indexing, and caching to meet Web Vitals and backend latency targets. CX Codex +1 228installs database-performance-optimizer Alysson Franklin database-performance-optimizer diagnoses query bottlenecks, optimizes composite indexes, and configures tenant-aware connection pooling for multi-tenant SaaS platforms. CX Codex ★ 1,013repo stars woocommerce-performance woocommerce woocommerce-performance flags database and caching bottlenecks in WooCommerce PHP code. Useful when writing custom SQL queries or rendering catalog lists. CX Codex +1 372installs diagnosing-endpoint-performance PostHog diagnosing-endpoint-performance — a skill that identifies why a PostHog endpoint is slow or expensive, then recommends a concrete fix: increase cache TTL, enable materialisation, restructure variables, or rewrite the query. CX Codex +1 316installs supabase-performance-optimizer davila7 supabase-performance-optimizer — a Claude slash command that inspects a Supabase database for slow queries and wasted indexes, then hands back an optimization plan. CX Codex +1 1,026installs

From the same set106

The whole set →
resend Guides AI agents in integrating the Resend email API, handling React Email templates, domain verification, and Svix webhooks. CX Codex +1 127installs tanstack-pacer Hands your agent a map of TanStack Pacer: debouncing, throttling, rate limits and async queues, with the matching React hooks. Useful when a handler fires too often. CX Codex +1 126installs tanstack-devtools tanstack-devtools guides AI coding agents in configuring Query cache, Router, and Form debugging panels across React applications. CX Codex +1 125installs seo-optimizer seo-optimizer — an SEO architecture skill: JSON-LD entities, E-E-A-T signals, topic clusters and a 30-point content audit. Runs in Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. CX Codex +1 125installs storybook-stories Writes Storybook stories and interaction tests in CSF3 format. Handles component examples, Chromatic visual snapshot setup, and accessibility checks. CX Codex +1 124installs shell-integration The shell-integration Claude Code skill provides terminal integration guides and Bash, Zsh, and Fish patterns for completions, prompt hooks, and portable POSIX wrappers. CX Codex +1 123installs usability-tester usability-tester plans usability test sessions, evaluates interfaces against heuristic standards, and scores UX friction points using severity formulas. CX Codex +1 122installs react-email Build responsive HTML emails from React Email components and render them as HTML or plain text. Useful for transactional messages and marketing templates. CX Codex +1 122installs

Project sponsors

Companies that keep this analytics open