lighthouse-audit

Run Lighthouse audits against websites using the Foghorn API. Use when the user wants to check a site's performance, accessibility, best practices, or SEO issues. Covers sign-up, authentication, team/site setup, and issue retrieval.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "lighthouse-audit" with this command: npx skills add artmann/foghorn-api/artmann-foghorn-api-lighthouse-audit

Lighthouse Audit Skill

Run Lighthouse audits and retrieve performance, accessibility, best-practices, and SEO issues for any website using the Foghorn API.

Overview

Foghorn is a site-health monitoring service built on Lighthouse. You register a site, Foghorn crawls its sitemap, audits every page, and exposes the results through a REST API. This skill lets you interact with that API using curl.

Base URL: https://foghorn-api.artgaard.workers.dev

Authentication

All endpoints (except sign-up, sign-in, and health check) require a Bearer token in the Authorization header.

Step 1 — Check for a stored API key

Read ~/.foghorn. If the file exists and its contents start with fh_, you already have a valid API key. Set the auth header and skip to Setup Workflow:

AUTH="Authorization: Bearer <key from ~/.foghorn>"

Step 2 — First-time setup (only if ~/.foghorn is missing or empty)

If no stored key is found, ask the user for their email and password, then run through sign-up, sign-in, and key creation.

Sign up (first time only)

curl -s -X POST https://foghorn-api.artgaard.workers.dev/auth/sign-up \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"min8chars"}'

Sign in (get a JWT)

curl -s -X POST https://foghorn-api.artgaard.workers.dev/auth/sign-in \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"min8chars"}'

Returns { "token": "eyJ...", "expiresIn": 86400, "user": {...} }.

Create an API key

curl -s -X POST https://foghorn-api.artgaard.workers.dev/api-keys \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-agent-key"}'

Returns the full key once in apiKey.key.

Save the key

Write the fh_... key to ~/.foghorn so it is reused in future sessions. Then set the auth header:

AUTH="Authorization: Bearer <key>"

Setup Workflow

Before you can retrieve issues you need a team and a site.

1. Create a team

curl -s -X POST https://foghorn-api.artgaard.workers.dev/teams \
  -H "$AUTH" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Team"}'

2. Add a site

curl -s -X POST https://foghorn-api.artgaard.workers.dev/sites \
  -H "$AUTH" \
  -H "Content-Type: application/json" \
  -d '{"teamId":"TEAM_ID","domain":"www.example.com"}'

The sitemapPath defaults to /sitemap.xml. Override it if your sitemap lives elsewhere.

3. Wait for the crawl

Foghorn periodically scrapes sitemaps and audits discovered pages. Check progress:

curl -s https://foghorn-api.artgaard.workers.dev/sites/SITE_ID \
  -H "$AUTH"

When hasScrapedTheSitemap is true, the sitemap has been processed. Then check pages:

curl -s "https://foghorn-api.artgaard.workers.dev/pages?siteId=SITE_ID" \
  -H "$AUTH"

Pages with a non-null lastAuditedAt have completed audits.

Querying Issues

The /issues endpoint aggregates audit failures across all audited pages.

# All issues for a site
curl -s "https://foghorn-api.artgaard.workers.dev/issues?siteId=SITE_ID" \
  -H "$AUTH"

# Filter by category
curl -s "https://foghorn-api.artgaard.workers.dev/issues?siteId=SITE_ID&category=accessibility" \
  -H "$AUTH"

Categories: performance, accessibility, bestPractices, seo

Response shape

{
  "issues": [
    {
      "auditId": "uses-responsive-images",
      "title": "Properly size images",
      "category": "performance",
      "pages": [
        {
          "pageId": "page-id",
          "url": "https://www.example.com/about",
          "path": "/about",
          "score": 0.45,
          "displayValue": "Potential savings of 120 KiB"
        }
      ]
    }
  ]
}
  • Issues are sorted by number of affected pages (most widespread first).
  • Pages within each issue are sorted by score ascending (worst first).
  • Scores range from 0 (fail) to 1 (pass).

Searching Pages

Find specific pages by URL or path using regex search:

curl -s "https://foghorn-api.artgaard.workers.dev/pages?siteId=SITE_ID&search=blog" \
  -H "$AUTH"

Quick Reference

MethodPathPurpose
GET/Health check
POST/auth/sign-upCreate account
POST/auth/sign-inGet JWT token
POST/api-keysCreate API key
GET/api-keysList API keys
DELETE/api-keys/:idDelete API key
POST/teamsCreate team
GET/teamsList teams
GET/teams/:idGet team
PUT/teams/:idUpdate team
DELETE/teams/:idDelete team
POST/teams/:id/membersAdd member
GET/teams/:id/membersList members
DELETE/teams/:id/members/:userIdRemove member
POST/sitesAdd site
GET/sitesList sites (optional ?teamId=)
GET/sites/:idGet site
PUT/sites/:idUpdate site
DELETE/sites/:idDelete site
GET/pagesList pages (optional ?siteId=, ?search=)
GET/pages/:idGet page with audit report
GET/issuesList issues (optional ?siteId=, ?category=)

See references/api-reference.md for full request/response schemas.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

lighthouse-audit

No summary provided by upstream source.

Repository SourceNeeds Review
Security

lighthouse-audit

No summary provided by upstream source.

Repository SourceNeeds Review
General

review-changes

No summary provided by upstream source.

Repository SourceNeeds Review
Security

Web Security Client-Side Scanner 1773654191

Perform a thorough client-side / browser-facing security assessment of a target web application. Use this skill whenever the user asks to pentest, audit, or...

Registry SourceRecently Updated