performance-optimization
Installation
SKILL.md
Performance Optimization
Use this skill when performance is an explicit goal or an obvious risk: latency, throughput, memory, CPU, startup time, build time, I/O, database load, concurrency, or scalability. The objective is to make code faster or lighter without changing observable behavior, and to verify improvements with measurements whenever measurement is feasible.
Performance is a first-class design constraint, but correctness, security, and maintainability still set the boundaries. Prefer efficient choices when they are equally clear. Reserve invasive rewrites, clever micro-optimizations, and added complexity for measured hot paths or high-risk workloads.
Activation Criteria
Use this skill when the task includes:
- Explicit performance terms such as optimize, speed up, slow, bottleneck, latency, throughput, memory, allocation, CPU, hot path, scalability, benchmark, profile, N+1, cache, lazy loading, or concurrency.
- Code that runs frequently, handles large data, sits in request/build/render loops, or performs repeated I/O or database work.
- Review of an implementation where algorithmic complexity, excessive allocations, blocking I/O, unbounded concurrency, or resource leaks are likely to cause real cost.
- Choosing between otherwise similar implementations where one is clearly more efficient with no meaningful readability or correctness penalty.
- PHP 8.4+ code that builds expensive services, entities, or object graphs that are often never used, where native lazy objects can defer construction.
Do not use this skill as the primary lens when: