Sign in
Explore
Prompts · RulesDevOps & CloudReviewed

performance-optimization

Web performance standards based on Core Web Vitals (LCP, INP, CLS), with anti-patterns, detection regexes and framework fixes.

Kind
Rules
Works with
GitHub Copilot
Source
Awesome Copilot @ d85f762d6e52
Path
instructions/performance-optimization.instructions.md
License
MIT
Jobs
Review
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Performance Standards

Comprehensive performance rules for web application development. Every anti-pattern includes a severity classification, detection method, Core Web Vitals metric impacted, and corrective code examples.

**Severity levels:**

- **CRITICAL** — Directly degrades a Core Web Vital past the "poor" threshold. Must be fixed before merge.
- **IMPORTANT** — Measurably impacts user experience. Fix in same sprint.
- **SUGGESTION** — Optimization opportunity. Plan for a future iteration.

---

## Core Web Vitals Quick Reference

### LCP (Largest Contentful Paint)

**Good: < 2.5s | Needs Improvement: 2.5-4s | Poor: > 4s**

Measures when the largest visible content element finishes rendering. Four sequential phases:

| Phase | Target | What It Measures |
|-------|--------|-----------------|
| TTFB | ~40% of budget | Server response time |
| Resource Load Delay | < 10% | Time between TTFB and LCP resource fetch start |
| Resource Load Duration | ~40% | Download time for the LCP resource |
| Element Render Delay | < 10% | Time between download and paint |

### INP (Interaction to Next Paint)

**Good: < 200ms | Needs Improvement: 200-500ms | Poor: > 500ms**
…