agentleFS
lgzarturolgzarturo/codeconductor/.agents/skills/cc-pagespeed/SKILL.md

cc-pagespeed

Skill0 starsChanged 27 days agoMITView on GitHub

Run the PageSpeed performance audit — 80/20 analysis of Core Web Vitals using the PageSpeed Insights API.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read PAGESPEED_API_KEY from the environment.

    line 18
  2. Distinctive:

    Call the PageSpeed Insights API for the URL provided above.

    line 28
  3. Distinctive:

    Call PSI directly via WebFetch and fetch the HTML source for manual resource-hint analysis.

    line 31
  4. Very specific:

    Write the full performance report to {YYYY-MM-DD}_pagespeed-{hostname}-claude.md in the current directory.

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.
  • 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%.


Step 5 — Report

Write the full performance report to {YYYY-MM-DD}_pagespeed-{hostname}-claude.md in the current directory.

Required sections:

  1. Resumen Ejecutivo (2–3 paragraphs)
  2. Métricas Actuales (lab vs field table)
  3. Recursos con Mayor Impacto
  4. Plan de Acción Priorizado (80/20 table)
  5. Solución Técnica Detallada (per finding: problem, evidence, code, expected gain)
  6. Quick Wins / High Impact Changes / Roadmap

End every report with:

---
*Informe generado el {YYYY-MM-DD} · Herramienta: Claude Code + pagespeed-perf skill*
*API Key usada: {Sí / No} · Datos CrUX: {Disponibles / No disponibles}*

Requirements

PAGESPEED_API_KEY — Optional but strongly recommended.

  • With key: real CrUX field data + 25,000 requests/day quota.
  • Without key: lab data only (Lighthouse); shared rate limit applies.

Set in your shell:

$env:PAGESPEED_API_KEY = "your-api-key"   # Windows PowerShell
export PAGESPEED_API_KEY="your-api-key"    # macOS / Linux

Get a free key: https://developers.google.com/speed/docs/insights/v5/get-started

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.