skills/performance-optimization/SKILL.md
Use when diagnosing slow code, optimizing queries, reducing latency, or profiling application performance
npx skillsauth add kienbui1995/magic-powers performance-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Measure first, optimize second. Never optimize without profiling data — intuition about bottlenecks is wrong ~90% of the time.
Core principle: Profile → Identify bottleneck → Fix → Measure improvement → Repeat.
1. Define target metric (e.g., p95 < 200ms)
2. Profile to find actual bottleneck
3. Fix the #1 bottleneck only
4. Measure — did it improve?
5. Repeat until target met
| Pattern | Problem | |---------|---------| | Premature optimization | Wasting time on non-bottlenecks | | Optimizing without measuring | No proof it helped | | Micro-optimizing | Loop tricks save nanoseconds, architecture saves seconds | | Caching everything | Cache invalidation bugs, stale data |
content-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.