agentleFS
6t9xstar6t9xstar/one-step-seo/skills/core-web-vitals/SKILL.md

core-web-vitals

Skill5 starsChanged 36 days agoMITView on GitHub

Audit Core Web Vitals (LCP, INP, CLS) via Google PageSpeed Insights (--psi) alongside offline performance hygiene (HTML payload weight, image dimensions, lazy loading, and third-party script bloat).

  • Reads credentials

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use web-quality-audit, structured-data and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • RodrigoTomeESSkill

    web-quality-audit

    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".

    Also in 12 projects that use this

  • huiferSkill

    structured-data

    生成和验证 JSON-LD 结构化数据,支持 Article、BlogPosting、Organization、WebPage、Product、LocalBusiness 等 Schema.org 类型。自动检测页面类型,验证语法,检查必需字段,提供 Google Rich Results 测试工具链接和 Next.js 组件代码示例。

    Also in 3 projects that use this

  • kpbraySkill

    best-practices

    Applies Power BI best practices, BPA rules, and enterprise standards. Use for quality validation, naming conventions, and performance optimization.

    Also in 7 projects that use this

  • ElasticSkill

    accessibility

    Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.

    Also in 18 projects that use this

  • nilssonrSkill

    seo

    Full SEO workflow for auditing pages and creating SEO-optimized content. Provides checklists with educational explanations aligned with Google Search Central documentation.

    Also in 10 projects that use this

  • GSA-TTSSkill

    architecture-decision-records

    Load when a user wants architecture decision records (ADRs) drafted from requirements or a design discussion, asks which decisions need an ADR, or wants an ADR draft reviewed for one-sided trade-offs, weak alternatives or missing requirement links. Not for setting up a project's whole documentation system (project-documentation-system).

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 0 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    Never treat null / missing metrics as 0: If CrUX field data is unavailable for a low-traffic URL, report Field metrics as Unavailable …

    line 29
  2. Very specific:

    CLS drivers: Check O09-img-dims (P2) for <img> tags missing explicit width and height attributes.

    line 35
  3. Very specific:

    LCP / payload drivers: Check P01-html-size (>300 KB HTML) and P02-img-count (>20 images).

    line 36
  4. Very specific:

    INP / TBT drivers: Check T14-third-party (>5 distinct third-party <script> hosts) and recommend defer or removing non-essential trackers.

    line 37
  5. Very specific:

    Always distinguish Lighthouse Lab (simulated) from CrUX Field (real-user 75th percentile) metrics and state the active strategy (mobile or …

    line 51
  6. Very specific:

    Rate limits & errors: If the PSI API returns HTTP 429 or times out, P05-psi-error (P3) records the diagnostic note without crashing the …

    line 63
  7. Very specific:

    Never hardcode or echo PSI_API_KEY into command arguments, commit messages, or generated reports.

    line 67
  8. Very specific:

    Do not recommend adding loading="lazy" to the primary above-the-fold hero/LCP <img>, as lazy-loading the LCP element delays largest …

    line 68

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “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

core-web-vitals — Core Web Vitals & Performance Hygiene

1. Description & Activation Criteria

Activate core-web-vitals when the user wants to:

  • Measure or interpret Lighthouse Lab metrics (Performance score, LCP, CLS, FCP, TBT, Speed Index, TTFB) and Chrome UX Report (CrUX) 75th-percentile Field metrics (LCP, INP, CLS) via --psi.
  • Audit offline performance and layout stability signals (P01-html-size, P02-img-count, O09-img-dims, T14-third-party, T00-truncated).

2. Inputs & Prerequisites

  • Target: Public http(s) URL (for --psi live metrics) or local HTML file (for offline HTML/image/script hygiene checks).
  • Environment variable for --psi:
    • PSI_API_KEY: Required when passing --psi. Read exclusively from process.env.PSI_API_KEY (never passed on the command line or logged in reports).
    • --psi-strategy <mobile|desktop>: Defaults to mobile.

3. Step-by-Step Workflow

  1. Run performance checks:
    • With PSI_API_KEY configured: npx one-step-seo page <url> --psi --psi-strategy mobile --out ./seo-report
    • Without PSI_API_KEY (offline/HTML hygiene): npx one-step-seo page <target> --skills core-web-vitals --out ./seo-report
  2. Separate Lab vs CrUX Field results (P03-psi-lab, P04-psi-field, P05-psi-error):
    • Inspect report.page.psi.lab and report.page.psi.field in report.json.
    • Never treat null / missing metrics as 0: If CrUX field data is unavailable for a low-traffic URL, report Field metrics as Unavailable (insufficient CrUX field data), never 0ms or 0.00.
    • Evaluate CrUX 75th-percentile thresholds (lib/psi.mjs):
      • LCP: Good <=2.5s, Needs Improvement 2.5s–4.0s (P2), Poor >4.0s (P1).
      • INP: Good <=200ms, Needs Improvement 200ms–500ms (P2), Poor >500ms (P1).
      • CLS: Good <=0.10, Needs Improvement 0.10–0.25 (P2), Poor >0.25 (P1).
  3. Diagnose root causes in HTML markup (P01, P02, O09, T14):
    • CLS drivers: Check O09-img-dims (P2) for <img> tags missing explicit width and height attributes.
    • LCP / payload drivers: Check P01-html-size (>300 KB HTML) and P02-img-count (>20 images). Note: keep the hero/LCP image eager (fetchpriority="high", no loading="lazy") and lazy-load below-the-fold images.
    • INP / TBT drivers: Check T14-third-party (>5 distinct third-party <script> hosts) and recommend defer or removing non-essential trackers.

4. Tools & CLI Commands

# Run a mobile PageSpeed Insights + SEO audit (requires PSI_API_KEY in environment)
PSI_API_KEY=your_key npx one-step-seo page https://example.com --psi --psi-strategy mobile --out ./seo-report

# Run offline performance & script hygiene checks without an API key
npx one-step-seo page https://example.com --skills core-web-vitals --out ./seo-report

5. Evidence Requirements

  • Always distinguish Lighthouse Lab (simulated) from CrUX Field (real-user 75th percentile) metrics and state the active strategy (mobile or desktop).
  • Explicitly report null metrics as Unavailable / Not measured.
  • Cite exact counts from P01-html-size, P02-img-count, O09-img-dims, and T14-third-party.

6. Expected Outputs

  1. Core Web Vitals Table: Metric, Lab Value, CrUX Field Value (p75), Threshold Status (Good / Needs Improvement / Poor / Unavailable).
  2. Markup Bottleneck Plan: Specific images missing dimensions, third-party script hosts to defer, and HTML payload reductions.

7. Limitations & External Data

  • External API dependency for --psi: Live LCP/INP/CLS measurements require network access to https://www.googleapis.com/pagespeedonline/v5/runPagespeed and PSI_API_KEY.
  • Rate limits & errors: If the PSI API returns HTTP 429 or times out, P05-psi-error (P3) records the diagnostic note without crashing the audit or penalizing the Search SEO score.

8. Safety & Approval Rules

  • Never hardcode or echo PSI_API_KEY into command arguments, commit messages, or generated reports.
  • Do not recommend adding loading="lazy" to the primary above-the-fold hero/LCP <img>, as lazy-loading the LCP element delays largest contentful paint.

9. Examples

# Check environment readiness for PSI
npx one-step-seo doctor

# Audit desktop Core Web Vitals
PSI_API_KEY=your_key npx one-step-seo page https://example.com --psi --psi-strategy desktop --out ./seo-report

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.