Performance Testing
Guidelines for making performance testing objective and CI-gatable instead of a manual, occasional check. Contains 5 rules across 3 categories.
When to Apply
Reference these guidelines when:
- Writing a k6 (or similar) load test for an API or service
- Setting performance budgets/thresholds that should fail CI when breached
- Investigating a reported performance regression
- Setting up Lighthouse CI for frontend Core Web Vitals
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Load Testing | HIGH | load- |
| 2 | Web Vitals & Frontend Budgets | HIGH | vitals- |
| 3 | Profiling & Diagnosis | MEDIUM | profiling- |
Quick Reference
1. Load Testing (HIGH)
load-k6-thresholds- Define pass/fail thresholds in the script itselfload-ramping-vus- Ramp virtual users gradually, don't spike
2. Web Vitals & Frontend Budgets (HIGH)
vitals-core-web-vitals-budget- Explicit LCP/CLS/INP budgetsvitals-lighthouse-ci-gate- Run Lighthouse CI on every PR
3. Profiling & Diagnosis (MEDIUM)
profiling-flame-graphs- Profile before optimizing
How to Use This Skill
- Read
rules/_sections.mdfor full category descriptions. - For a new load test, start from
load-k6-thresholdsso the test is CI-gatable from day one. - For frontend regressions, check budgets first (
vitals-core-web-vitals-budget), then profile (profiling-flame-graphs) rather than guessing at a fix.
See rules/_template.md for the format used by every rule file.