Accessibility

Adjust how this site looks and moves. Settings apply while you browse this site and are not saved: reloading the page resets them.

Presets

Text

Text size
Line height

Display

Colour

Motion

Navigate and listen

Page structure

Read aloud

Read aloud is not available in this browser.

CG Web Skills

Web performance engineer

cg-web-lighthouse-optimizer

You hand it Lighthouse reports as JSON; it traces each real bottleneck to its cause in the repository and fixes it there. The score is a measuring instrument, not the goal.

5,424 words of method · Documented for version 1.3.0 · checked

Read the full SKILL.md

1

No score gaming

Hiding content from the audit, lazy-loading the LCP image, preloading everything, removing interactive elements to pass accessibility checks, keyword stuffing for SEO — the skill lists these tricks and forbids them. Mobile and desktop are analyzed as separate test conditions, and a lab score is never mistaken for what real users experience.

No change may be made solely because it raises a Lighthouse score.

cg-web-lighthouse-optimizer · SKILL.md · translated from German

3

Any Lighthouse JSON, normalized first

A single report, a mobile/desktop pair, an array, a PageSpeed Insights wrapper or JSON pasted as text: Claude normalizes it, checks for runtime errors, warnings, mismatched versions or URLs, and only then decides what to optimize.

Do not guess a device class when the JSON structure is contradictory.

cg-web-lighthouse-optimizer · SKILL.md · translated from German

25

From audit details to the file that causes it

The audit title is only a pointer. Claude reads the details — savings, affected URLs, nodes, timings — and follows them into the codebase: the actual LCP element, the dependency behind the long tasks, the unsized image behind the layout shift, the font, the third-party script, the cache header.

Do not just conclude “reduce JavaScript” from this — find the concrete dependency or bundle culprit in the repository.

cg-web-lighthouse-optimizer · SKILL.md · translated from German

26

Version-aware, down to Lighthouse 13

Audit IDs change between major releases, and Lighthouse 13 folded many older performance audits into shared insights. Claude reads the report's own version and weights, and maps old and new audit IDs to the same problem domain instead of fixing audits that don't exist in the report.

The skill must map by meaning, not work blindly from string matches.

cg-web-lighthouse-optimizer · SKILL.md · translated from German

What it refuses to claim

A change that probably helps is not a measured improvement. When Lighthouse cannot be run again, the skill reports what it changed and why — and nothing more:

If no new Lighthouse run is possible, the skill must not claim that the scores have improved.

cg-web-lighthouse-optimizer · SKILL.md · translated from German

The loop it works in

Not score → hack → score. One root-cause group at a time, validated with lint, build and tests, then measured again on mobile and desktop before the next change.

  1. measure
  2. identify
  3. hypothesize
  4. change
  5. validate
  6. measure again

Try asking Claude

  • Here are the Lighthouse reports for mobile and desktop. Fix what's slowing the site down.
  • Our mobile LCP is 4.8 s. Find out why and fix it.
  • Analyze this PageSpeed Insights JSON and improve the site in the repo.
  • The new Lighthouse run is worse than last week. Compare the reports and fix the regression.
Terminal session
$ npx cg-web-skills@latest install cg-web-lighthouse-optimizer