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.
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.
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...
StarMapper audit focus areas
When auditing StarMapper specifically, pay attention to:
- MapLibre GL bundle size — dynamic import with
ssr: false, never SSR
- Chunk loop INP — React state updates during long scans block interactions
- Popup XSS —
innerHTML usage in MapLibre popups
- Dark mode contrast —
@theme tokens must meet WCAG AA on dark background
- OG images —
/[owner]/[repo]/opengraph-image.tsx must be correct size
- JSON-LD — Structured data in
layout.tsx for rich results
- GitHub token exposure — Never in NEXT_PUBLIC_* variables
- Badge SVG caching — CDN 6h TTL on
/api/badge/[owner]/[repo]
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---67# Web quality audit89Comprehensive quality review based on Google Lighthouse audits. Covers Performance, Accessibility, SEO, and Best Practices across 150+ checks.1011## How it works12131. Analyze the provided code/project for quality issues142. Categorize findings by severity (Critical, High, Medium, Low)153. Provide specific, actionable recommendations164. Include code examples for fixes1718## Audit categories1920### Performance (40% of typical issues)2122**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.2627**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.3233**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.3839### Accessibility (30% of typical issues)4041**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.4546**Operable:**47* **Keyboard accessible.** All functionality available via keyboard. No keyboard traps.48* **Focus visible.** Clear focus indicators on all interactive elements.49* **Skip links.** Provide "Skip to main content" for keyboard users.5051**Understandable:**52* **Page language.** Set `lang` attribute on `<html>`.53* **Consistent navigation.** Same navigation structure across pages.54* **Error identification.** Form errors clearly described and associated with fields.55* **Labels and instructions.** All form inputs have associated labels.5657**Robust:**58* **Valid HTML.** No duplicate IDs. Properly nested elements.59* **ARIA used correctly.** Prefer native elements. ARIA roles match behavior.60* **Name, role, value.** Interactive elements have accessible names and correct roles.6162### SEO (15% of typical issues)6364**Crawlability:**65* **Valid robots.txt.** Doesn't block important resources.66* **XML sitemap.** Lists all important pages. Submitted to Search Console.67* **Canonical URLs.** Prevent duplicate content issues.68* **No noindex on important pages.** Check meta robots and headers.6970**On-Page SEO:**71* **Unique title tags.** 50-60 characters. Primary keyword included.72* **Meta descriptions.** 150-160 characters. Compelling and unique.73* **Heading hierarchy.** Single `<h1>`. Logical heading structure.74* **Descriptive link text.** Not "click here" or "read more".7576**Technical SEO:**77* **Mobile-friendly.** Responsive design. Tap targets ≥ 48px.78* **HTTPS.** Secure connection required.79* **Fast loading.** Performance directly impacts ranking.80* **Structured data.** JSON-LD for rich snippets (Article, Product, FAQ, etc.).8182### Best practices (15% of typical issues)8384**Security:**85* **HTTPS everywhere.** No mixed content. HSTS enabled.86* **No vulnerable libraries.** Keep dependencies updated.87* **CSP headers.** Content Security Policy to prevent XSS.88* **No exposed source maps.** In production builds.8990**Modern Standards:**91* **No deprecated APIs.** Replace `document.write`, synchronous XHR, etc.92* **Valid doctype.** Use `<!DOCTYPE html>`.93* **Charset declared.** `<meta charset="UTF-8">` as first element in `<head>`.94* **No browser errors.** Clean console. No CORS issues.9596**UX Patterns:**97* **No intrusive interstitials.** Especially on mobile.98* **Clear permission requests.** Only ask when needed, with context.99* **No misleading buttons.** Buttons do what they say.100101## Severity levels102103| Level | Description | Action |104|-------|-------------|--------|105| **Critical** | Security vulnerabilities, complete failures | Fix immediately |106| **High** | Core Web Vitals failures, major a11y barriers | Fix before launch |107| **Medium** | Performance opportunities, SEO improvements | Fix within sprint |108| **Low** | Minor optimizations, code quality | Fix when convenient |109110## Audit output format111112When performing an audit, structure findings as:113114```markdown115## Audit results116117### Critical issues (X found)118- **[Category]** Issue description. File: `path/to/file.js:123`119 - **Impact:** Why this matters120 - **Fix:** Specific code change or recommendation121122### High priority (X found)123...124125### Summary126- Performance: X issues (Y critical)127- Accessibility: X issues (Y critical)128- SEO: X issues129- Best Practices: X issues130131### Recommended priority1321. First fix this because...1332. Then address...1343. Finally optimize...135```136137## StarMapper audit focus areas138139When auditing StarMapper specifically, pay attention to:1401411. **MapLibre GL bundle size** — dynamic import with `ssr: false`, never SSR1422. **Chunk loop INP** — React state updates during long scans block interactions1433. **Popup XSS** — `innerHTML` usage in MapLibre popups1444. **Dark mode contrast** — `@theme` tokens must meet WCAG AA on dark background1455. **OG images** — `/[owner]/[repo]/opengraph-image.tsx` must be correct size1466. **JSON-LD** — Structured data in `layout.tsx` for rich results1477. **GitHub token exposure** — Never in NEXT_PUBLIC_* variables1488. **Badge SVG caching** — CDN 6h TTL on `/api/badge/[owner]/[repo]`149150## Quick checklist151152### Before every deploy153- [ ] Core Web Vitals passing154- [ ] No accessibility errors (axe/Lighthouse)155- [ ] No console errors156- [ ] HTTPS working157- [ ] Meta tags present158- [ ] `rtk tsc` → 0 errors159160### Weekly review161- [ ] Check Search Console for issues162- [ ] Review Core Web Vitals trends163- [ ] Update dependencies (`pnpm outdated`)164- [ ] Test with screen reader165166### Monthly deep dive167- [ ] Full Lighthouse audit168- [ ] Performance profiling169- [ ] Accessibility audit with real users170- [ ] SEO keyword review171172## References173174For detailed guidelines on specific areas:175- [Performance Optimization](../performance/SKILL.md)176- [Core Web Vitals](../core-web-vitals/SKILL.md)177- [Accessibility](../accessibility/SKILL.md)178- [Best Practices](../best-practices/SKILL.md)