lighthouse

lighthouse is a command for Claude Code from Piyush8296/claude-workspace. It costs 14 tokens per session (858 once invoked), scanned A, original, MIT.

A command that runs Lighthouse audits on a website. Lighthouse is a tool that measures performance, accessibility, common web practices, and search-engine readiness.

In plain words
What is it for?
Auditing a URL or local page and producing a prioritized list of performance, accessibility, best-practice, and SEO fixes.
Why use it?
It replaces manually checking these areas with a report of scores and the most important problems to fix.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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 commands/piyush8296/claude-workspace/lighthouse
Clone the repo
git clone --depth 1 https://github.com/Piyush8296/claude-workspace

Made for: Claude Code.

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/piyush8296/claude-workspace/lighthouse.svg)](https://agentmods.dev/commands/piyush8296/claude-workspace/lighthouse)
Your own site
<a href="https://agentmods.dev/commands/piyush8296/claude-workspace/lighthouse"><img src="https://agentmods.dev/badge/commands/piyush8296/claude-workspace/lighthouse.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 858 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.1 $0.00014 $0.00858
Opus 5 $0.00007 $0.00429
Sonnet 5 $0.00003 $0.00172
Haiku 4.5 $0.00001 $0.00086

Measured 5d ago against content hash b6521b660373, 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 5d ago.

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 · 121 lines

How it starts

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

Lighthouse Audit

Audit: $ARGUMENTS

Instructions

1. Determine the target

  • If a URL is provided, use it directly
  • If no argument, use http://localhost:3000
  • If a path is provided, assume it's a route on localhost

2. Run Lighthouse

# Run Lighthouse with JSON output
npx lighthouse "$TARGET_URL" \
  --output=json \
  --output-path=./.lighthouse-report.json \
  --chrome-flags="--headless --no-sandbox" \
  --quiet

If Lighthouse isn't available or fails, fall back to manual analysis:

  • Read the HTML output of key pages
  • Check for common performance/SEO/a11y patterns
  • Run npx tsc --noEmit and npx eslint as proxies

3. Parse scores

Extract the four category scores:

cat .lighthouse-report.json | node -e "
  const r = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
  const c = r.categories;
  console.log('Performance:', Math.round(c.performance.score * 100));
  console.log('Accessibility:', Math.round(c.accessibility.score * 100));
  console.log('Best Practices:', Math.round(c['best-practices'].score * 100));
  console.log('SEO:', Math.round(c.seo.score * 100));
"

4. Extract failing audits

For each category with score < 90, list failing audits:

cat .lighthouse-report.json | node -e "
  const r = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
  Object.entries(r.audits)
    .filter(([,a]) => a.score !== null && a.score < 1)
    .sort((a,b) => (a[1].score||0) - (b[1].score||0))
    .slice(0, 20)
    .forEach(([id, a]) => {
      console.log(Math.round((a.score||0)*100) + '/100', id, '-', a.title);
    });
"

5. Generate fix plan

For each failing audit, prioritize by impact:

CRITICAL (score < 50):

  • Identify the root cause in the codebase
  • Provide a specific fix with file:line reference
  • Reference the relevant skill (core-web-vitals, seo-fundamentals, accessibility)

WARNING (score 50-89):

  • Describe the issue and suggest a fix
  • Estimate effort (quick fix vs. architectural change)

Read the full file on GitHub · 121 lines

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. 5d ago First seen · 121 lines · 14 tokens per session scan A b6521b660373

Subscribe to this mod's changes

lighthouse is a command published in the GitHub repository Piyush8296/claude-workspace (2 stars, last pushed 4mo ago), licensed MIT. It adds 14 tokens to every session and 858 once invoked, about $0.0001 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 commands, from other repositories

review-pr

Multi-agent PR review with four modes (review, re-review, self-review, address-feedback) - spawns parallel subagents, saves diff to /tmp for context efficiency, supports file exclusion patterns.

hoblin/claude-ruby-marketplace · 39 tokens

resume_handoff

Resume work from handoff document with context analysis and validation.

hoblin/claude-ruby-marketplace · 11 tokens

feature

Command "feature" from hoblin/claude-ruby-marketplace, covering input format, context, workflow, step 1: setup and step 2: gather historical context.

hoblin/claude-ruby-marketplace · 0 tokens

sm-sail

Command "sm-sail" from ScienceIsNeato/slop-mop, covering /sm-sail — drive a pr to green, autonomously, the loop, when sail parks on review threads, when to stop before "pr ready" — only two reasons and expect convergence, not one pass.

ScienceIsNeato/slop-mop · 0 tokens

sm-buff

You usually don't run buff directly — run sm sail. sm sail drives the whole PR to green and calls buff watch / triage for you, stopping only when it needs you to act (see /sm-sail). Reach for sm buff here only for surgical work: inspecting a specific failure, or resolving a single review thread when sail has parked on…

ScienceIsNeato/slop-mop · 0 tokens

sm-wake-angry-drunk-captain

The last-resort verb. Use it ONLY when the loop is genuinely exhausted: barnacles filed, gates green or truly unfixable, and the single remaining move is a human judgment call no sm verb can make for you.

ScienceIsNeato/slop-mop · 0 tokens