Web quality audit
Comprehensive quality review based on Google Lighthouse audits. Covers Performance, Accessibility, SEO, and Best Practices across 150+ checks.
How it works
- Analyze the provided code/project for quality issues
- Categorize findings by severity (Critical, High, Medium, Low)
- Provide specific, actionable recommendations
- Include code examples for fixes
Audit categories
Performance (40% of typical issues)
Core Web Vitals — Must pass for good page experience:
- LCP (Largest Contentful Paint) < 2.5s. The largest visible element must render quickly. Optimize images, fonts, and server response time.
- INP (Interaction to Next Paint) < 200ms. User interactions must feel instant. Reduce JavaScript execution time and break up long tasks.
- CLS (Cumulative Layout Shift) < 0.1. Content must not jump around. Set explicit dimensions on images, embeds, and ads.
Resource Optimization:
- Compress images. Use WebP/AVIF with fallbacks. Serve correctly sized images via
srcset.
- Minimize JavaScript. Remove unused code. Use code splitting. Defer non-critical scripts.
- Optimize CSS. Extract critical CSS. Remove unused styles. Avoid
@import.
- Efficient fonts. Use
font-display: swap. Preload critical fonts. Subset to needed characters.
Loading Strategy:
- Preconnect to origins. Add
<link rel="preconnect"> for third-party domains.
- Preload critical assets. LCP images, fonts, and above-fold CSS.
- Lazy load below-fold content. Images, iframes, and heavy components.
- Cache effectively. Long cache TTLs for static assets. Immutable caching for hashed files.
Accessibility (30% of typical issues)
Perceivable:
- Text alternatives. Every
<img> has meaningful alt text. Decorative images use alt="".
- Color contrast. Minimum 4.5:1 for normal text, 3:1 for large text (WCAG AA).
- Don't rely on color alone. Use icons, patterns, or text alongside color indicators.
- Captions and transcripts. Video has captions. Audio has transcripts.
Operable:
- Keyboard accessible. All functionality available via keyboard. No keyboard traps.
- Focus visible. Clear focus indicators on all interactive elements.
- Skip links. Provide "Skip to main content" for keyboard users.
- Sufficient time. Users can extend time limits. No auto-advancing content without controls.
Understandable:
- Page language. Set
lang attribute on <html>.
- Consistent navigation. Same navigation structure across pages.
- Error identification. Form errors clearly described and associated with fields.
- Labels and instructions. All form inputs have associated labels.
Robust:
- Valid HTML. No duplicate IDs. Properly nested elements.
- ARIA used correctly. Prefer native elements. ARIA roles match behavior.
- Name, role, value. Interactive elements have accessible names and correct roles.
SEO (15% of typical issues)
Crawlability:
- Valid robots.txt. Doesn't block important resources.
- XML sitemap. Lists all important pages. Submitted to Search Console.
- Canonical URLs. Prevent duplicate content issues.
- No noindex on important pages. Check meta robots and headers.
On-Page SEO:
- Unique title tags. 50-60 characters. Primary keyword included.
- Meta descriptions. 150-160 characters. Compelling and unique.
- Heading hierarchy. Single
<h1>. Logical heading structure.
- Descriptive link text. Not "click here" or "read more".
Technical SEO:
- Mobile-friendly. Responsive design. Tap targets ≥ 48px.
- HTTPS. Secure connection required.
- Fast loading. Performance directly impacts ranking.
- Structured data. JSON-LD for rich snippets (Article, Product, FAQ, etc.).
Best practices (15% of typical issues)
Security:
- HTTPS everywhere. No mixed content. HSTS enabled.
- No vulnerable libraries. Keep dependencies updated.
- CSP headers. Content Security Policy to prevent XSS.
- No exposed source maps. In production builds.
Modern Standards:
- No deprecated APIs. Replace
document.write, synchronous XHR, etc.
- Valid doctype. Use
<!DOCTYPE html>.
- Charset declared.
<meta charset="UTF-8"> as first element in <head>.
- No browser errors. Clean console. No CORS issues.
UX Patterns:
- No intrusive interstitials. Especially on mobile.
- Clear permission requests. Only ask when needed, with context.
- No misleading buttons. Buttons do what they say.
Severity levels
| Level |
Description |
Action |
| Critical |
Security vulnerabilities, complete failures |
Fix immediately |
| High |
Core Web Vitals failures, major a11y barriers |
Fix before launch |
| Medium |
Performance opportunities, SEO improvements |
Fix within sprint |
| Low |
Minor optimizations, code quality |
Fix when convenient |
Audit output format
When performing an audit, structure findings as:
## Audit results
### Critical issues (X found)
- **[Category]** Issue description. File: `path/to/file.js:123`
- **Impact:** Why this matters
- **Fix:** Specific code change or recommendation
### High priority (X found)
...
### Summary
- Performance: X issues (Y critical)
- Accessibility: X issues (Y critical)
- SEO: X issues
- Best Practices: X issues
### Recommended priority
1. First fix this because...
2. Then address...
3. Finally optimize...
Quick checklist
Before every deploy
Weekly review
Monthly deep dive
References
For detailed guidelines on specific areas:
1---2name: web-quality-audit3description: Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".4license: MIT5---6
7# Web quality audit
8
9Comprehensive quality review based on Google Lighthouse audits. Covers Performance, Accessibility, SEO, and Best Practices across 150+ checks.
10
11## How it works
12
131. Analyze the provided code/project for quality issues
142. Categorize findings by severity (Critical, High, Medium, Low)
153. Provide specific, actionable recommendations
164. Include code examples for fixes
17
18## Audit categories
19
20### Performance (40% of typical issues)
21
22**Core Web Vitals** — Must pass for good page experience:
23* **LCP (Largest Contentful Paint) < 2.5s.** The largest visible element must render quickly. Optimize images, fonts, and server response time.
24* **INP (Interaction to Next Paint) < 200ms.** User interactions must feel instant. Reduce JavaScript execution time and break up long tasks.
25* **CLS (Cumulative Layout Shift) < 0.1.** Content must not jump around. Set explicit dimensions on images, embeds, and ads.
26
27**Resource Optimization:**
28* **Compress images.** Use WebP/AVIF with fallbacks. Serve correctly sized images via `srcset`.
29* **Minimize JavaScript.** Remove unused code. Use code splitting. Defer non-critical scripts.
30* **Optimize CSS.** Extract critical CSS. Remove unused styles. Avoid `@import`.
31* **Efficient fonts.** Use `font-display: swap`. Preload critical fonts. Subset to needed characters.
32
33**Loading Strategy:**
34* **Preconnect to origins.** Add `<link rel="preconnect">` for third-party domains.
35* **Preload critical assets.** LCP images, fonts, and above-fold CSS.
36* **Lazy load below-fold content.** Images, iframes, and heavy components.
37* **Cache effectively.** Long cache TTLs for static assets. Immutable caching for hashed files.
38
39### Accessibility (30% of typical issues)
40
41**Perceivable:**
42* **Text alternatives.** Every `<img>` has meaningful `alt` text. Decorative images use `alt=""`.
43* **Color contrast.** Minimum 4.5:1 for normal text, 3:1 for large text (WCAG AA).
44* **Don't rely on color alone.** Use icons, patterns, or text alongside color indicators.
45* **Captions and transcripts.** Video has captions. Audio has transcripts.
46
47**Operable:**
48* **Keyboard accessible.** All functionality available via keyboard. No keyboard traps.
49* **Focus visible.** Clear focus indicators on all interactive elements.
50* **Skip links.** Provide "Skip to main content" for keyboard users.
51* **Sufficient time.** Users can extend time limits. No auto-advancing content without controls.
52
53**Understandable:**
54* **Page language.** Set `lang` attribute on `<html>`.
55* **Consistent navigation.** Same navigation structure across pages.
56* **Error identification.** Form errors clearly described and associated with fields.
57* **Labels and instructions.** All form inputs have associated labels.
58
59**Robust:**
60* **Valid HTML.** No duplicate IDs. Properly nested elements.
61* **ARIA used correctly.** Prefer native elements. ARIA roles match behavior.
62* **Name, role, value.** Interactive elements have accessible names and correct roles.
63
64### SEO (15% of typical issues)
65
66**Crawlability:**
67* **Valid robots.txt.** Doesn't block important resources.
68* **XML sitemap.** Lists all important pages. Submitted to Search Console.
69* **Canonical URLs.** Prevent duplicate content issues.
70* **No noindex on important pages.** Check meta robots and headers.
71
72**On-Page SEO:**
73* **Unique title tags.** 50-60 characters. Primary keyword included.
74* **Meta descriptions.** 150-160 characters. Compelling and unique.
75* **Heading hierarchy.** Single `<h1>`. Logical heading structure.
76* **Descriptive link text.** Not "click here" or "read more".
77
78**Technical SEO:**
79* **Mobile-friendly.** Responsive design. Tap targets ≥ 48px.
80* **HTTPS.** Secure connection required.
81* **Fast loading.** Performance directly impacts ranking.
82* **Structured data.** JSON-LD for rich snippets (Article, Product, FAQ, etc.).
83
84### Best practices (15% of typical issues)
85
86**Security:**
87* **HTTPS everywhere.** No mixed content. HSTS enabled.
88* **No vulnerable libraries.** Keep dependencies updated.
89* **CSP headers.** Content Security Policy to prevent XSS.
90* **No exposed source maps.** In production builds.
91
92**Modern Standards:**
93* **No deprecated APIs.** Replace `document.write`, synchronous XHR, etc.
94* **Valid doctype.** Use `<!DOCTYPE html>`.
95* **Charset declared.** `<meta charset="UTF-8">` as first element in `<head>`.
96* **No browser errors.** Clean console. No CORS issues.
97
98**UX Patterns:**
99* **No intrusive interstitials.** Especially on mobile.
100* **Clear permission requests.** Only ask when needed, with context.
101* **No misleading buttons.** Buttons do what they say.
102
103## Severity levels
104
105| Level | Description | Action |
106|-------|-------------|--------|
107| **Critical** | Security vulnerabilities, complete failures | Fix immediately |
108| **High** | Core Web Vitals failures, major a11y barriers | Fix before launch |
109| **Medium** | Performance opportunities, SEO improvements | Fix within sprint |
110| **Low** | Minor optimizations, code quality | Fix when convenient |
111
112## Audit output format
113
114When performing an audit, structure findings as:
115
116```markdown
117## Audit results
118
119### Critical issues (X found)
120- **[Category]** Issue description. File: `path/to/file.js:123`
121 - **Impact:** Why this matters
122 - **Fix:** Specific code change or recommendation
123
124### High priority (X found)
125...
126
127### Summary
128- Performance: X issues (Y critical)
129- Accessibility: X issues (Y critical)
130- SEO: X issues
131- Best Practices: X issues
132
133### Recommended priority
1341. First fix this because...
1352. Then address...
1363. Finally optimize...
137```
138
139## Quick checklist
140
141### Before every deploy
142- [ ] Core Web Vitals passing
143- [ ] No accessibility errors (axe/Lighthouse)
144- [ ] No console errors
145- [ ] HTTPS working
146- [ ] Meta tags present
147
148### Weekly review
149- [ ] Check Search Console for issues
150- [ ] Review Core Web Vitals trends
151- [ ] Update dependencies
152- [ ] Test with screen reader
153
154### Monthly deep dive
155- [ ] Full Lighthouse audit
156- [ ] Performance profiling
157- [ ] Accessibility audit with real users
158- [ ] SEO keyword review
159
160## References
161
162For detailed guidelines on specific areas:
163- [Performance Optimization](../performance/SKILL.md)
164- [Core Web Vitals](../core-web-vitals/SKILL.md)
165- [Accessibility](../accessibility/SKILL.md)
166- [SEO](../seo/SKILL.md)
167- [Best Practices](../best-practices/SKILL.md)