All skills
Skillintermediate

optimize perf

Analyze and optimize code for runtime performance with measurable improvements.

Claude Code Knowledge Pack7/10/2026

Overview

Analyze and optimize code for runtime performance with measurable improvements.

Steps

  1. Identify the performance target:
  2. Profile the code:
  3. Analyze common performance issues:
  4. Apply optimizations in order of impact:
  5. Measure the improvement after each optimization.
  6. Document the trade-offs of each optimization.

Format

Target: <what was optimized>
Before: <baseline metric>
After: <improved metric>
Improvement: <percentage>

Rules

  • Always measure before and after; never optimize without data.
  • Fix the biggest bottleneck first (Amdahl's Law).
  • Do not sacrifice readability for marginal gains.