cc-pagespeedlisted
Install: claude install-skill lgzarturo/codeconductor
# PageSpeed Performance Audit
Audit URL: $ARGUMENTS
---
## Step 1 — Pre-flight (pagespeed-perf skill)
Invoke `pagespeed-perf` skill.
Read `PAGESPEED_API_KEY` from the environment. Compute the output filename:
`{YYYY-MM-DD}_pagespeed-{hostname}-claude.md`.
Log whether the API key was found. Proceed regardless — lab data is available
without a key, but CrUX field data requires it.
---
## Step 2 — Collect
Call the PageSpeed Insights API for the URL provided above.
- Strategy: `both` (mobile + desktop) unless the user specified otherwise.
- If Bun is available, use `~/.claude/skills/pagespeed-perf/scripts/run.ts`.
- If Bun is unavailable, call PSI directly via WebFetch and fetch the HTML
source for manual resource-hint analysis.
---
## Step 3 — Analyze
Extract from the PSI response:
- Core Web Vitals: LCP, INP, CLS, FCP, TBT, TTFB
- LCP element (type, selector, HTML snippet)
- Third-party scripts ordered by blocking time
- Render-blocking resources
- Unused JavaScript and CSS (savings in bytes and ms)
From the HTML source:
- Resource hints (`<link rel="preload|preconnect|prefetch">`)
- Images: lazy loading, `fetchpriority`, format, dimensions
- Fonts: `font-display`, preloaded subsets
- Blocking scripts in `<head>` (no `async`/`defer`)
---
## Step 4 — Prioritize
Score each identified optimization using the 80/20 matrix:
`Score = Impact × Ease` (each 1–5, max 25).
Order findings by descending score. Mark optimizations with Score ≥ 20 as
**Critical 20%**.
---