npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lightscore

v0.1.3

Published

Lighthouse scores in your terminal, with concrete fixes for everything below 100 — and a markdown report your coding agent can act on.

Readme

lightscore

Lighthouse scores in your terminal, with concrete fixes for everything below 100, and a Markdown report your coding agent can act on.

$ npx lightscore milindmishra.com
Auditing https://milindmishra.com

=== https://milindmishra.com — MOBILE ===
performance: 94  |  accessibility: 100  |  best-practices: 100  |  seo: 100

  Performance gaps:
    - cumulative-layout-shift: 75% (0.152)
    - cache-insight: 50% (Est savings of 5 KiB)
    - cls-culprits-insight: 0%
    - network-dependency-tree-insight: 0%
    - layout-shifts: 0% (2 layout shifts found)

=== https://milindmishra.com — DESKTOP ===
performance: 100  |  accessibility: 100  |  best-practices: 100  |  seo: 100

  Performance gaps:
    - cache-insight: 50% (Est savings of 5 KiB)
    - network-dependency-tree-insight: 0%

Get started

Install the agent skill so your coding agent knows the whole audit → fix → re-audit loop:

npx skills add thatbeautifuldream/lightscore

Then just ask your agent to "audit localhost:3000 and fix the issues", or run an audit yourself:

npx lightscore localhost:3000

Usage

lightscore never starts a server for you, it audits whatever is already running.

npx lightscore localhost:3000           # local dev server
npx lightscore milindmishra.com         # bare domain -> https://
npx lightscore milindmishra.com example.com/pricing  # audit several pages in one go
npx lightscore https://example.com --runs 5 --form-factor mobile,desktop --concurrency 2 --out lighthouse-report.md

Running lightscore with no arguments prints the help.

Then feed the report to an agent:

claude "fix the issues in lighthouse-report.md"

Agent usage

SKILL.md teaches coding agents how to use lightscore, the audit → fix → re-audit loop, flag choices, and JSON output for parsing. It works with Claude Code, Cursor, Codex, and 60+ other agents via skills.sh:

npx skills add thatbeautifuldream/lightscore

Programmatic usage

The CLI is a thin wrapper over the library:

import { audit } from "lightscore";

const results = await audit(["https://example.com"], {
  formFactors: ["mobile"],
  runs: 3,
  onEvent: (e) => { /* job-start | job-done | job-error */ },
});

Flags

  • <urls...>, URLs, domains, or host:ports to audit (required)
  • -r, --runs <n>, number of runs to median across (default 3, reduces noise)
  • -f, --form-factor <mobile,desktop>, which form factors to audit (default both)
  • -c, --concurrency <n>, Chrome instances auditing in parallel (default 1)
  • -o, --out <file>, write a Markdown report
  • --json, print structured results instead of the terminal report

How it works

  • src/api.ts, the programmatic core: audit(targets, options) fans every (URL × form factor) job out over a pool of Chrome instances and reports progress as events, so the CLI, CI, or a server can consume it the same way.
  • src/lighthouse-runner.ts, thin wrapper over the Lighthouse Node API: launches Chrome, runs N times, takes the median, and extracts gaps (audits scoring below 100%) ranked by weighted impact.
  • src/resolve-target.ts, normalizes a bare host or domain into a full URL (localhost gets http://, everything else https://).
  • src/knowledge/audit-fixes.json, a curated map of Lighthouse audit ID → why it matters and how to fix it, distilled from web.dev docs and common framework fixes. This is what turns a bare score into something actionable, extend it as you hit new audit IDs.
  • src/report.ts, renders terminal output and the Markdown report.

Extending the knowledge base

Add an entry to src/knowledge/audit-fixes.json keyed by the Lighthouse audit ID (shown in terminal output, e.g. unused-javascript):

"audit-id": {
  "why": "One line on why this hurts the score/user.",
  "fix": "Concrete, actionable fix."
}