performance-optimizer
Identifies and resolves performance bottlenecks across frontend (Core Web Vitals, code splitting, lazy loading), backend (N+1 queries, async processing), and database (EXPLAIN ANALYZE, indexing strategies) layers. Use when the user reports slow code, latency issues, memory leaks, needs to speed up an application, or wants to benchmark and profile performance.
Best use case
performance-optimizer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Identifies and resolves performance bottlenecks across frontend (Core Web Vitals, code splitting, lazy loading), backend (N+1 queries, async processing), and database (EXPLAIN ANALYZE, indexing strategies) layers. Use when the user reports slow code, latency issues, memory leaks, needs to speed up an application, or wants to benchmark and profile performance.
Teams using performance-optimizer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/performance-optimizer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How performance-optimizer Compares
| Feature / Agent | performance-optimizer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Identifies and resolves performance bottlenecks across frontend (Core Web Vitals, code splitting, lazy loading), backend (N+1 queries, async processing), and database (EXPLAIN ANALYZE, indexing strategies) layers. Use when the user reports slow code, latency issues, memory leaks, needs to speed up an application, or wants to benchmark and profile performance.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
> **AI-consumed reference.** Optimized for Claude to read during execution. > Human-readable explanation: see [docs/architecture/HIERARCHICAL_PLANNING.md](../../../docs/architecture/HIERARCHICAL_PLANNING.md) > or [docs/getting-started/](../../../docs/getting-started/) depending on topic. # Skill: Performance Optimizer Identify and resolve performance bottlenecks. Measure first, optimize second. --- ## Principles 1. Measure first, optimize second 2. Optimize the bottleneck, not everything 3. 80/20: 80% of slowness is in 20% of code --- ## Profiling | Layer | Tools | Metrics | |-------|-------|---------| | Frontend | Lighthouse, DevTools | FCP, LCP, TTI, CLS | | Backend | APM, profilers | Response time, throughput | | Database | EXPLAIN, slow query log | Query time, index usage | | Memory | Heap snapshots | Allocation, leaks | --- ## Frontend **Core Web Vitals:** LCP < 2.5s, FID < 100ms, CLS < 0.1 **Quick wins:** `loading="lazy"` images, `lazy(() => import(...))` code splitting, `debounce` handlers, `useMemo` for expensive computations. Optimize images (WebP), cache headers, preload fonts. --- ## Backend | Issue | Solution | |-------|----------| | N+1 queries | Eager loading, batching | | Missing indexes | Add appropriate indexes | | Unbounded queries | Pagination, limits | | Sync blocking | Async/parallel processing | | No caching | Cache hot data | --- ## Database `EXPLAIN ANALYZE` for slow queries. Look for Seq Scan (bad) vs Index Scan (good). | Query Pattern | Index Type | |---------------|------------| | Exact match | B-tree | | Range | B-tree | | Full-text | GIN/GiST | | JSON | GIN | --- ## Caching | Level | TTL | Use Case | |-------|-----|----------| | Browser | Hours-Days | Static assets | | CDN | Minutes-Hours | API responses | | Application | Seconds-Minutes | Computed data | Invalidation: time-based, event-based, or version-based. --- ## Memory | Leak Cause | Fix | |------------|-----| | Event listeners | Cleanup in useEffect/destroy | | Closures | Null out references | | Growing collections | WeakMap, clear periodically | | Timers | clearInterval/clearTimeout | --- ## Optimization Workflow 1. Profile → capture baseline metrics 2. Identify bottleneck → focus on hottest path 3. Set target metric → define measurable goal 4. Apply fix → implement targeted optimization 5. Re-measure → compare against baseline 6. Verify → confirm no regressions, tests pass
Related Skills
vue-expert
Vue 3 gotchas and decision criteria. Covers reactivity traps, Composition API pitfalls, and Pinia patterns.
typescript-expert
TypeScript gotchas and decision criteria covering nullish coalescing pitfalls (|| vs ??), strict tsconfig settings (noUncheckedIndexedAccess, exactOptionalPropertyTypes), type guard patterns, discriminated unions, and as const vs enum. Use when writing TypeScript, configuring tsconfig, implementing type guards, or debugging null/undefined errors.
tree-of-thoughts
Branch, evaluate, prune, expand — structured search over solution space. Use for architecture with multi-step decisions, refactor planning, or complex debug hypothesis trees. Paper: Yao et al. 2023.
test-writer
Write tests with TDD following structured patterns. Ensures consistent AAA structure, proper coverage targets, and framework-specific conventions. Without this skill, tests lack consistent naming, miss coverage targets, and skip anti-pattern checks.
stitch-design
Generate UI designs using Google Stitch AI with optimized prompts
session-continuation
Manage workflow state across sessions with handoff and resume. TOON-based state persistence.
sequential-thinking
Structured thinking process for complex analysis. Supports revision, branching, and dynamic adjustment.
self-improve
Apply learned improvements to the Aura Frog plugin. Updates rules, adjusts agent routing, modifies workflow configurations, and generates knowledge base entries.
self-healing-orchestrator
Proposes patches for F2 (local-logic) and F3 (local-design) failures. NEVER applies without user approval. Confidence ≥0.7 to propose; below that, escalates raw findings. Counts toward replan_budget. Per-task: max 1; per-session: max 5.
self-consistency
Generate N independent reasoning paths and vote on the answer. Use for architectural trade-offs, ambiguous design decisions, or when single-path reasoning risks locking onto the first plausible answer. Paper: Wang et al. 2022.
scalable-thinking
Design for scale while keeping implementation simple (KISS).
run-orchestrator
Execute 5-phase TDD workflow for complex features. Use when the user invokes /run, asks to build/create/implement a feature, requests a complex multi-file change, or types 'fasttrack:'. Enforces phase gates, sprint contracts, and builder!=reviewer discipline.