跳到主要内容

Lighthouse Axe

Run Lighthouse and axe audits via npx.

Skill metadata​

SourceOptional — install with vibeos skills install official/web-development/lighthouse-axe
Pathoptional-skills/web-development/lighthouse-axe
Version1.0.0
AuthorVibeOS
LicenseMIT
Platformslinux, macos, windows
Tagslighthouse, axe, a11y, seo, performance, audit, web
Related skillssite-page-analyze, site-map-crawl, browser-e2e, web-site-kit

Reference: full SKILL.md​

信息

The following is the complete skill definition that VibeOS loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.

Lighthouse + axe Audit

Optional heavyweight page audit: Lighthouse (perf/SEO/a11y scores) and axe-core CLI when installed. Not a core tool — runs via npx / local Node. Prefer site-page-analyze for fast structure signals without Node.

When to Use​

  • Need numeric Lighthouse categories or axe violation lists
  • CI gate after cinematic / admin scaffold
  • User explicitly asks for Lighthouse / axe (not plain DOM map)

Prerequisites​

  • Node.js 20+ and network for first npx download (or preinstalled CLIs)
  • Target URL reachable (local localhost or remote)
  • Script: scripts/run_page_audit.py

How to Run​

python3 scripts/run_page_audit.py --url http://127.0.0.1:3000 --out ./audit
# Lighthouse-only:
python3 scripts/run_page_audit.py --url URL --lighthouse-only --out ./audit
# axe-only (requires @axe-core/cli via npx):
python3 scripts/run_page_audit.py --url URL --axe-only --out ./audit

Then skim audit/lighthouse.json / audit/axe.json and summarize issues.

Quick Reference​

OutputMeaning
lighthouse.jsonCategories + audits (Chrome)
axe.jsonAccessibility violations
summary.mdShort human summary

Procedure​

  1. Confirm the app is up (vibeos project servers --expect <port> --health).
  2. Run run_page_audit.py with --url and --out.
  3. If Node/npx missing, stop and install Node — do not fake scores.
  4. Report failing categories / axe critical+serious counts with paths.
  5. Pair with site-page-analyze for title/H1/meta structure (lighter).

Pitfalls​

  • First npx pull needs network; pin versions in CI when possible.
  • Auth walls: audit only public or pre-authenticated URLs.
  • Do not treat Lighthouse as a substitute for real browser smoke (browser-e2e).
  • Optional skill — not seeded by default; vibeos skills install official/web-development/lighthouse-axe.

Verification​

  • Script exits 0 when tools run; writes at least one JSON under --out.
  • Exit 2 on bad args; exit 1 when Node/npx unavailable.
  • Offline unit test covers --help / arg validation without network.