lighthouse

lighthouse is a command for Claude Code from fatihkan/badi. It costs 0 tokens per session (369 once invoked), scanned A, original, MIT.

A website audit command that uses Google PageSpeed Insights to report performance, accessibility, best practices, SEO, and Core Web Vitals for a URL.

In plain words
What is it for?
Use it to audit mobile or desktop pages, inspect metrics such as LCP and CLS, and get improvement suggestions for weak areas.
Why use it?
It turns a web address into concrete checks for speed, usability, technical quality, and search visibility. Core Web Vitals are Google's measurements of loading speed, responsiveness, and layout stability.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Part of the badi plugin — 81 skills, 86 commands, 30 agents, 7 hooks shipped together

Good fit Use it to audit mobile or desktop pages, inspect metrics such as…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/fatihkan/badi/lighthouse
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.

Clone the repo
git clone --depth 1 https://github.com/fatihkan/badi

Made for: Claude Code.

Or install badi, the plugin that ships this one along with the rest of its 81 skills, 86 commands, 30 agents, 7 hooks.

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/commands/fatihkan/badi/lighthouse.svg)](https://agentmods.dev/commands/fatihkan/badi/lighthouse)
Your own site
<a href="https://agentmods.dev/commands/fatihkan/badi/lighthouse"><img src="https://agentmods.dev/badge/commands/fatihkan/badi/lighthouse.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 369 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00369
Opus 5 $0.00000 $0.00185
Sonnet 5 $0.00000 $0.00074
Haiku 4.5 $0.00000 $0.00037

Measured today against content hash 1cfe1870322b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 today.

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.

.claude/commands/lighthouse.md · 46 lines

What it actually says

Lighthouse audit command. Performance, Accessibility, Best Practices, SEO scores and Core Web Vitals via the Google PageSpeed Insights API.

Required Tools

  • Bash (badi lighthouse command invocation)

Procedure

Step 1: Get the URL

Take a full URL from the user. Mind the http/https prefix. Ask if invoked without an argument.

Step 2: Strategy Selection

Mobile or desktop? Mobile is usually the default since Google does mobile-first indexing.

badi lighthouse [url]              # Mobile (default)
badi lighthouse [url] --desktop    # Desktop

Step 3: Interpret the Result

Scores in 4 categories:

  • Performance - speed metrics
  • Accessibility - axe-core based
  • Best Practices - HTTPS, console errors
  • SEO - meta tags, crawlability

Core Web Vitals:

  • FCP < 1.8s (good), < 3.0s (fair)
  • LCP < 2.5s (good), < 4.0s (fair)
  • TBT < 200ms (good), < 600ms (fair)
  • CLS < 0.1 (good), < 0.25 (fair)

Step 4: Improvement Suggestions

For categories under 90, give the user concrete suggestions:

  • Low Performance: "Image optimization, code splitting, caching"
  • Low A11y: "Get detail with /a11y-audit [url]"
  • Low SEO: "Detailed report via badi seo audit [url]"

Example

/lighthouse https://example.com
/lighthouse https://example.com --desktop
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. today First seen · 46 lines · 0 tokens per session scan A 1cfe1870322b

Subscribe to this mod's changes

lighthouse is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 369 tokens. 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-09-06.