GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - psandis/siteclaw: Lighthouse-backed CLI that tracks performance history across a portfolio of client sites, correlates regressions with deploy notes, and flags root causes shared across multiple sites. Part of the openclaw toolset.

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
biome.json
biome.json
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
siteclaw.config.json
siteclaw.config.json
 
 
sites.json
sites.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Siteclaw

npm version

Lighthouse-backed performance history tracker for a portfolio of client sites. See which sites are slow, why, and whether several sites share the same root cause. Works standalone or as an OpenClaw skill.

What It Does

  • runs Lighthouse against any site (by name from sites.json, a bare domain, or a full URL) and stores the result
  • reports all six Lighthouse performance metrics (FCP, LCP, Speed Index, TTI, TBT, CLS), rated against Google's published thresholds, not just the aggregate score
  • diagnostics: server response time (TTFB), DOM size, network request/byte totals, named third-party origin impact, legacy/duplicated JavaScript, HTTP/1.1 usage
  • security checks: HTTPS, HSTS, CSP against XSS
  • --device mobile|desktop|both: run either or both of Lighthouse's real device presets
  • tracks performance score history per site and per device, with a trend indicator and a comparison against the previous run
  • correlates shared render-blocking resources across sites, per device (e.g. the same theme/plugin asset slowing down several client sites at once)
  • attaches an optional note to a run (e.g. "deployed plugin update") to trace a regression back to a change
  • --json flag on all commands for agents and scripts

Requirements

  • Node 22+
  • Google Chrome or Chromium installed locally (Lighthouse drives a headless instance via chrome-launcher)
  • pnpm (only for local development)

better-sqlite3 ships prebuilt binaries for macOS, Linux, and Windows (x64 and arm64), so no compiler toolchain is needed to install.

Install

npm install -g siteclaw

or, for local development:

git clone https://github.com/psandis/siteclaw.git
cd siteclaw
pnpm install
pnpm build

Quick Start

# sites.json: array of sites to track
echo '[{ "name": "client-a", "url": "https://client-a-domain.com" }]' > sites.json

siteclaw check client-a --note "deployed plugin update"
siteclaw check https://example.com    # one-off check, no sites.json entry needed
siteclaw list
siteclaw history client-a
siteclaw correlate

(Running from a clone instead of a global install? Use pnpm dev <command> in place of siteclaw <command>.)

CLI

Check a site

siteclaw check techcrunch

Running Lighthouse (mobile) against https://techcrunch.com...

techcrunch [mobile]: performance score 61

Diagnosis: Largest Contentful Paint is 4436ms (poor) with a fast server (TTFB 17ms): the delay is happening client-side after the server has already responded. Check for a slow-loading render-blocking resource, redirect, or content waiting on a client-side request. Published research on web performance generally (not a claim about this specific site): a 100ms delay has been linked to roughly a 7% drop in conversions, a 1-second delay on e-commerce pages to up to a 20% drop, and sites taking over 3 seconds to load see roughly 53% of mobile visitors abandon before it finishes (Google/Akamai-SOASTA; Deloitte/Google 2020).

Core metrics:
  First Contentful Paint: 2251ms (needs improvement)
  Largest Contentful Paint: 4436ms (poor)
  Speed Index: 10337ms (poor)
  Time to Interactive: 31373ms (poor)
  Total Blocking Time: 439ms (needs improvement)
  Cumulative Layout Shift: 0.064 (good)

Opportunities:
  Reduce unused CSS: Reduce unused rules from stylesheets and defer CSS not used for above-the-fold content to decrease bytes consumed by network activity. [Learn how to reduce unused CSS](https://developer.chrome.com/docs/lighthouse/performance/unused-css-rules/). (160ms potential savings)
  Reduce unused JavaScript: Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. [Learn how to reduce unused JavaScript](https://developer.chrome.com/docs/lighthouse/performance/unused-javascript/).
  Avoid enormous network payloads: Large network payloads cost users real money and are highly correlated with long load times. [Learn how to reduce payload sizes](https://developer.chrome.com/docs/lighthouse/performance/total-byte-weight/).

Diagnostics:
  Server response time (TTFB): 17ms
  DOM elements: 7118
  Network requests: 212 (3.9MB transferred)
  Unnecessary legacy JS (old-browser polyfills/transforms): 25.1KB
  Third-party impact (main-thread time):
    Google Tag Manager: 102ms, 521.5KB
    Google CDN: 60ms, 347.4KB
    Facebook: 52ms, 189.9KB
    servenobid.com: 40ms, 438.2KB
    Clarity: 39ms, 26.9KB

Security:
  HTTPS: yes
  HSTS header: present
  CSP against XSS: configured

Vs. previous check (2026-09-16T22:36:52.911Z): score up 2, LCP -20ms

Notes:

  • accepts either a name from sites.json, a bare domain (www.example.com), or a full http(s):// URL; no sites.json entry required for the latter two
  • --note <text> attaches a note to the run, useful for tracing a later regression back to a specific change
  • --device mobile|desktop|both: defaults to mobile (Lighthouse's own default, and how most real-world traffic arrives); both runs and reports each device separately, each compared against its own device-specific history
  • Diagnosis synthesizes the metrics into one root-cause line instead of leaving you to interpret a list of numbers. It checks, in order: server response time (TTFB), since a slow server delays everything downstream and no front-end fix can compensate for it; then poor Total Blocking Time (weighted 30% in Lighthouse's own score), blamed on the heaviest third-party origin if one is reported, otherwise on the site's own JavaScript; then a client-side LCP delay when the server itself is fast. The general research context (conversion/bounce-rate impact of load-time delay) is cited from Google/Akamai-SOASTA and the Deloitte/Google 2020 mobile speed study. These are general industry findings, not a prediction for your specific site, and only appear when something is genuinely poor.
  • metric ratings (good / needs improvement / poor) use Google's own published Core Web Vitals / Lighthouse thresholds, including TTFB (good ≤800ms, poor >1800ms, per web.dev)
  • server response time shows unavailable when Lighthouse could not measure it for that run, and the diagnosis then makes no server-side verdict
  • legacy/duplicated JavaScript and HTTP/1.1 usage only print when non-zero, so a clean result doesn't clutter the output
  • render-blocking resources come from Lighthouse's render-blocking-insight audit; opportunity savings show milliseconds and/or bytes, whichever Lighthouse reports
  • security checks (HTTPS, HSTS, CSP) come from Lighthouse's best-practices category, run alongside performance
  • the "vs. previous check" line is skipped for the metric comparison (score still shown) if the previous run predates core-metrics tracking, rather than showing a misleading diff against missing data

List all sites

siteclaw list

nasa	mobile	64	2026-09-16T20:46:54.909Z
rollingstone	mobile	21	2026-09-16T20:47:12.956Z
techcrunch	mobile	61	2026-09-16T22:37:21.115Z

Notes:

  • one row per site per device (latest run of each); a site checked with --device both appears once as mobile and once as desktop
  • only shows sites currently listed in sites.json; older runs for sites removed from that file stay in the database but are hidden here

History for one site

siteclaw history techcrunch

[mobile]
2026-09-16T20:46:40.141Z	37
2026-09-16T21:48:00.486Z	42 note: second check for real history example
2026-09-16T22:07:20.149Z	44
2026-09-16T22:09:31.502Z	34
2026-09-16T22:12:13.034Z	46
2026-09-16T22:26:42.655Z	36
2026-09-16T22:35:05.269Z	58
2026-09-16T22:36:25.673Z	42
2026-09-16T22:36:52.911Z	59
2026-09-16T22:37:21.115Z	61
Trend: up 2

Notes:

  • runs are grouped per device, each with its own trend; mobile and desktop scores come from different throttling/emulation and are never compared against each other
  • --device mobile|desktop shows only that device
  • the trend compares the two most recent runs of that device

Correlate shared issues

siteclaw correlate

No shared render-blocking resources found across sites.

Notes:

  • compares the latest run of every site currently in sites.json, separately per device (--device mobile|desktop to limit to one)
  • flags render-blocking resource URLs that appear on more than one site, usually a shared theme or plugin asset. When two sites share one, the output reads Shared render-blocking resources (<device>): followed by <url> -> affects: <site-a>, <site-b>.
  • the example above was produced from runs recorded before 0.2.3, which stored no render-blocking resources (see CHANGELOG); re-run check on your sites for correlate to have data to compare

Configuration

All defaults live in siteclaw.config.json at the project root. No code changes needed to:

  • change where the SQLite database (dbPath) or site list (sitesPath) live
  • change which Lighthouse audits (opportunityAudits) get surfaced as opportunities
{
  "dbPath": "siteclaw.db",
  "sitesPath": "sites.json",
  "opportunityAudits": [
    "image-delivery-insight",
    "unused-css-rules",
    "unused-javascript",
    "total-byte-weight"
  ]
}

If the file is missing, these same values are used as built-in defaults. Every opportunityAudits ID must exist in the installed Lighthouse version; an unknown ID is silently skipped. Lighthouse 13 replaced several classic audits with *-insight audits (for example uses-optimized-images became image-delivery-insight).

Agent Integration

All commands support --json for structured output:

siteclaw --json check techcrunch
siteclaw --json list
siteclaw --json history techcrunch
siteclaw --json correlate

OpenClaw Skill

Once installed globally (npm install -g siteclaw), add a SKILL.md to your workspace:

---
name: siteclaw
description: Lighthouse performance history tracker for a portfolio of client sites
version: 0.2.3
requires_binaries:
  - siteclaw
---

When the user asks about site performance, regressions, or shared issues across client
sites, use the `siteclaw` CLI:

- To check a site: `siteclaw --json check <site-or-url>`
- To list all tracked sites: `siteclaw --json list`
- To see history for one site: `siteclaw --json history <site>` (returns `{ site, devices: [{ device, runs, trend }] }`)
- To find shared issues across sites: `siteclaw --json correlate` (each entry has `device`, `url`, `sites`)

Testing

pnpm test runs the Vitest suite in tests/:

  • db.test.ts: SQLite storage, per-device history and latest-run queries, legacy-row fallbacks
  • sites.test.ts: sites.json loading and site-name / URL / bare-domain resolution
  • config.test.ts: defaults and siteclaw.config.json overrides
  • correlate.test.ts: cross-site shared render-blocking resource detection
  • diagnosis.test.ts: root-cause diagnosis priority and wording
  • ratings.test.ts: good / needs improvement / poor thresholds
  • third-party.test.ts: third-party origin ordering and top-five cut
  • audit-data.test.ts: safe reading of Lighthouse audit details (missing fields, wrong types)

Lighthouse itself is not mocked or covered by automated tests: it requires a real headless Chrome and a real network call, so it's verified manually via siteclaw check against a real URL instead.

Tech Stack

TypeScript/Node, lighthouse + chrome-launcher for measurement, better-sqlite3 for storage, commander for the CLI, vitest for tests, biome for lint/format, pnpm as package manager.

Related

  • 🦀 Dietclaw: Codebase health monitor
  • 🦀 Dustclaw: Find out what is eating your disk space
  • 🦀 Driftclaw: Deployment drift detection across environments
  • 🦀 Feedclaw: RSS/Atom feed reader and AI digest builder
  • 🦀 OpenClaw: The open claw ecosystem

License

See MIT

About

Lighthouse-backed CLI that tracks performance history across a portfolio of client sites, correlates regressions with deploy notes, and flags root causes shared across multiple sites. Part of the openclaw toolset.

Topics

clilighthouseopenclawperformance-monitoringsqlitetypescriptwordpress

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.