# Prompt: Optimize Performance

Use when something is slow or before a perf-sensitive ship.

---

Target: **`<URL or module>`**

Measure against `docs/performance-budgets.md`:

- LCP ≤ 2.5s (3G), CLS ≤ 0.1
- Initial JS ≤ 250 KB gz
- API p95 ≤ 300 ms
- DB query p95 ≤ 50 ms

Steps:

1. Capture current numbers (Lighthouse + bundle analyzer for FE; pino latency logs + `EXPLAIN ANALYZE` for BE).
2. Identify the 1–3 biggest violations.
3. Propose fixes with expected gain.
4. After fixing, re-measure and confirm.

Use the `performance-budgeting` skill. Never trade correctness/security for speed.
