跳到正文
cccskills
免费在 GitHub 公开

cc-pagespeed

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

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md2.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use when adding monitoring, metrics, logging, or tracing to Spring AI or LLM integration code. Covers token tracking, latency measurement, cost estimation, and prompt/response logging. Use when user mentions AI monitoring, token costs, or LLM observability.

中文简介正在准备中。当前显示原文说明。

lgzarturo/springboot-course32026年10月20日 更新

android

免费

Provides expert knowledge for building modern native Android apps using Kotlin, Jetpack Compose, Material Design 3, MVI architecture, Hilt dependency injection, and Media3/ExoPlayer.

中文简介正在准备中。当前显示原文说明。

lgzarturo/springboot-course32026年10月20日 更新

Design, implement, review, and audit Android Jetpack Compose UI/UX for phone interfaces. Use when a request concerns concrete Compose layout, components, interaction, accessibility, or visual behavior. Do not activate for framework or dependency presence alone; non-UI Android work is excluded.

中文简介正在准备中。当前显示原文说明。

lgzarturo/springboot-course32026年10月20日 更新

Provides expert knowledge for designing, implementing, and managing REST API versioning strategies with deprecation workflows.

中文简介正在准备中。当前显示原文说明。

lgzarturo/springboot-course32026年10月20日 更新

astro

免费

Provides expert knowledge for building Astro 5+ sites with Islands Architecture, Content Collections, TypeScript, and performance-first rendering strategies.

中文简介正在准备中。当前显示原文说明。

lgzarturo/springboot-course32026年10月20日 更新

Audits token storage mechanisms to prevent XSS-based JWT theft.

中文简介正在准备中。当前显示原文说明。

lgzarturo/springboot-course32026年10月20日 更新

查看 lgzarturo 的全部技能

报告此技能的问题