lighthouse

lighthouse is a skill for Claude Code, Codex from nimajafari/lighthouse-skill. It costs 59 tokens per session (2,589 once invoked), scanned A, original, MIT.

A workflow for using Google Lighthouse, a tool that audits a website's speed, accessibility, search visibility, and common web practices.

In plain words
What is it for?
It helps establish a baseline, find issues, set performance limits, check a URL in continuous integration, and compare results before and after a fix.
Why use it?
It replaces guesses about website quality with measured scores and specific failed checks that can be tested again after changes.

Skill for Claude CodeCodex

Part of the lighthouse-skill plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nimajafari/lighthouse-skill/lighthouse
Any agent
npx skills add nimajafari/lighthouse-skill --skill lighthouse
Clone the repo
git clone --depth 1 https://github.com/nimajafari/lighthouse-skill

Made for: Claude Code, Codex.

Or install lighthouse-skill, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lighthouse

README.md
[![agentmods](https://agentmods.dev/badge/skills/nimajafari/lighthouse-skill/lighthouse.svg)](https://agentmods.dev/skills/nimajafari/lighthouse-skill/lighthouse)
Your own site
<a href="https://agentmods.dev/skills/nimajafari/lighthouse-skill/lighthouse"><img src="https://agentmods.dev/badge/skills/nimajafari/lighthouse-skill/lighthouse.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,589 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00059 $0.02589
Opus 5 $0.00030 $0.01295
Sonnet 5 $0.00012 $0.00518
Haiku 4.5 $0.00006 $0.00259

Measured 4d ago against content hash 791850ff9d0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lighthouse scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run-lighthouse.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/lighthouse/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Lighthouse

Run Google Lighthouse to measure web quality and verify that fixes actually moved the numbers. Lighthouse audits a URL across Performance, Accessibility, SEO, and Best Practices and returns a 0–100 score per category plus a list of failing audits with specific guidance.

When to use this skill

This skill measures. Sibling quality skills fix. The workflow is a loop:

measure (this skill)  →  fix (performance / accessibility / seo / best-practices)  →  re-measure

Reach for this skill to: get a baseline score, find the specific failing audits, set a performance budget, gate a build in CI, or prove a change improved (or regressed) a metric. Don't guess at improvements — measure, change one thing, measure again.

How it works

  1. Pick a target URL — a deployed URL, or a local dev/preview server (http://localhost:3000).
  2. Run Lighthouse — prefer scripts/run-lighthouse.sh <url>; it runs several times, takes the median, and emits compact JSON (full reports are huge and waste context).
  3. Read category scores + failing audits from the JSON.
  4. Map each failing audit to a fix using the relevant quality skill.
  5. Re-run and report the before/after delta.

Install & run (CLI)

The Lighthouse readme installs it globally (needs Node 22 LTS+), and it drives a local Chrome/Chromium you must have installed:

npm install -g lighthouse
# or: yarn global add lighthouse

lighthouse https://example.com --view    # basic run; --view opens the HTML report

Lighthouse auto-detects an installed Chrome; point it at a specific binary with the CHROME_PATH environment variable.

For a quick one-off without a global install, npx lighthouse <url> also works — the published CLI bin supports it, though the official docs only cover the global install.

Machine-readable run for an agent (JSON to a file, quiet, headless):

npx lighthouse https://example.com \
  --quiet \
  --chrome-flags="--headless=new" \
  --only-categories=performance,accessibility,seo,best-practices \
  --output=json --output-path=./lh.json

Read the full file on GitHub · 205 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 205 lines · 59 tokens per session scan A 791850ff9d0e

Subscribe to this mod's changes

lighthouse is a skill published in the GitHub repository nimajafari/lighthouse-skill (2 stars, last pushed 2mo ago), licensed MIT. It adds 59 tokens to every session and 2,589 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

accessibility

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

addyosmani/web-quality-skills · 51 tokens

best-practices

Apply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities".

addyosmani/web-quality-skills · 49 tokens

performance

Optimize web performance for faster loading and better user experience. Use when asked to "speed up my site", "optimize performance", "reduce load time", "fix slow loading", "improve page speed", or "performance audit".

addyosmani/web-quality-skills · 49 tokens

seo

Optimize for search engine visibility and ranking. Use when asked to "improve SEO", "optimize for search", "fix meta tags", "add structured data", "sitemap optimization", or "search engine optimization".

addyosmani/web-quality-skills · 46 tokens

core-web-vitals

Optimize Core Web Vitals (LCP, INP, CLS) for better page experience using field and lab evidence. Use when asked to "improve Core Web Vitals", "fix LCP", "reduce CLS", "optimize INP", "page experience optimization", or "fix layout shifts".

addyosmani/web-quality-skills · 67 tokens

web-quality-audit

Run an evidence-led web quality audit covering performance, accessibility, SEO, best practices, and agentic browsing. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".

addyosmani/web-quality-skills · 58 tokens