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

@ape-egg/underlens

v1.0.11

Published

Scheduled code review against a human-curated quality document, on your own harness subscriptions — run from a GitHub workflow.

Readme

@ape-egg/underlens

Scheduled code review held to rules you wrote, run from a GitHub workflow on your own AI subscriptions. Guide: underlens.korte.kim.

The workflow's triggers decide when a PR is reviewed. Then one reviewer per configured harness holds the whole codebase at the PR's head to underlens-quality-control.md and reports every place that breaks a numbered rule. The PR's diff tells it where each one comes from: introduced by the PR, caused by the PR together with existing code, or already in the codebase. A judge checks every finding against the code, folds the reports into points and writes one fix PR per point, into an umbrella branch cut from the PR. The PR's section becomes a report from quality control, in the order the quality document lists its rules. Each point is ruled off, then headed by its rule copied from the document, marked when the drift was already in the codebase, then the fix in one short line, its fix PR under Proposed fix:, and Agree (merge the fix) and Disagree (close it). The line above the report says which commit was reviewed, by whom, and when the run finished. Every agreed fix lands in one PR back into yours. Each fix PR's description carries the long account: where the rule breaks, why, and what the fix changed. A disagreed point returns on every review while its rule stands; only changing the code or the rule settles it.

Every point the PR brings in is reported. Drift already in the codebase is capped at 10 points a review, nearest the PR's changes first, so adding Underlens to an old codebase doesn't open a fix PR for every line of it; the section counts the ones held back. Reviewers don't get the codebase pasted into their prompt: they search it rule by rule with their own read-only tools, so the prompt grows with the diff and the rules, not the repository, and each reviewer still stops at 30 minutes.

A reviewer that fails (its CLI won't start, exits with an error, runs past 30 minutes or answers without JSON) doesn't stop the review: the judge works from the reviewers that answered, and the PR's section names each one that failed and why, on one line each. If every reviewer fails, or the judge does, that PR isn't reviewed: an earlier review stays in place, and a PR without one gets a note saying it failed. A scheduled run moves on to the next PR either way. Any failure turns the run red.

Setup

bunx @ape-egg/underlens init      # writes the three files below
claude setup-token                # then:
gh secret set CLAUDE_CODE_OAUTH_TOKEN
gh api -X PUT repos/{owner}/{repo}/actions/permissions/workflow -F can_approve_pull_request_reviews=true   # lets the workflow open fix PRs
git add -A && git commit -m "add underlens" && git push
gh workflow run underlens.yml     # checks every configured harness signs in
  • underlens.config.js: reviewers and judge, one string each naming harness and model.
  • underlens-quality-control.md: the numbered, human-curated rules. Each list item is a rule, numbered top to bottom. Its headline in a report is copied from the document: the item's lead sentence when more sentences follow it, else the ## heading it sits under, else the whole item.
  • .github/workflows/underlens.yml: triggers, permissions, and one job that calls kkortes/underlens/.github/workflows/run.yml@v1 with the harness secrets. The triggers you list pick when reviews run; the cron line is one example schedule, so set the hours your project wants.
name: Underlens

on:
  schedule:
    - cron: '0 3 * * *'
  pull_request:
    types: [edited, closed]
  workflow_dispatch:
    inputs:
      branch:
        description: Run workflow PR of branch (leave empty for harness check)

permissions:
  contents: write
  pull-requests: write

jobs:
  Underlens:
    uses: kkortes/underlens/.github/workflows/run.yml@v1
    with:
      runs-on: ubuntu-26.04
    secrets:
      CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
      CODEX_AUTH_JSON: ${{ secrets.CODEX_AUTH_JSON }}
      GLM_API_KEY: ${{ secrets.GLM_API_KEY }}
      GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
      XAI_API_KEY: ${{ secrets.XAI_API_KEY }}

The check reads Underlens / Quality control. runs-on is the only input, under with:; it defaults to ubuntu-26.04, so change the label or drop the block.

Three parts of that file stay in your repo because GitHub won't let them move: the triggers, the permissions (a called workflow can't widen its caller's token, and a new repo's token is read-only), and the secrets (secrets: inherit only reaches workflows of the same owner). Forward only the secrets of the harnesses you use, if you like; validate names any that's missing.

The called workflow is four steps, if you'd rather run them yourself: actions/checkout@v7, oven-sh/setup-bun@v2, then bunx @ape-egg/underlens@1 with GH_TOKEN: ${{ github.token }} and each harness secret in its env. Check out the default branch (ref: ${{ github.event.repository.default_branch }}) so a PR can't rewrite the rules it's reviewed by. Underlens reads the branch input from the event and deepens a shallow checkout itself.

Harnesses

| id | CLI | secret | signs in with | | --- | --- | --- | --- | | claude | Claude Code | CLAUDE_CODE_OAUTH_TOKEN | Pro/Max subscription (claude setup-token, one year) | | gpt | Codex | CODEX_AUTH_JSON | ChatGPT subscription, ~/.codex/auth.json; private repos only, refresh about weekly on hosted runners | | glm | Claude Code → Z.ai | GLM_API_KEY | GLM Coding Plan key | | gemini | Gemini CLI | GEMINI_API_KEY | API key: no subscription sign-in for CI exists | | grok | Grok CLI | XAI_API_KEY | API key: no subscription sign-in for CI is documented |

Picking a model

Each entry in reviewers and judge is one string. A harness id alone runs that CLI's default model; a model ID that starts with the harness id picks that model and reaches the CLI as written:

export default {
  reviewers: ['claude-opus-5-5', 'gpt-6.1-sol', 'claude-sonnet-5'],
  judge: 'claude-fable-5-1',
};

The same harness can appear more than once on different models; each string runs as its own reviewer. A string whose prefix names no harness fails at config load. Every model string each CLI accepts: underlens.korte.kim/#models — the CLI itself has the final say.

Validate before a real run

Run the workflow with the branch left empty (gh workflow run underlens.yml, or Actions → Underlens → Run workflow). It pings every configured string on its exact harness and model, writes one row per string to the job summary, checks GitHub lets Actions open pull requests (Settings → Actions → General → Workflow permissions → "Allow GitHub Actions to create and approve pull requests"), and fails until all of it is ready. Every review checks that setting again before it starts.

Commands

The workflow runs underlens with no argument; it acts on the event, so the triggers you list decide when reviews run:

  • schedule: reviews every open, non-draft PR that hasn't been reviewed yet.
  • workflow_dispatch: reviews the open PR of the branch named in "Run workflow PR of branch" now (gh workflow run underlens.yml -f branch=<branch>), and fails saying so when that branch has no open PR. With the branch left empty, it validates every reviewer and the judge instead.
  • pull_request opened/reopened: reviews that PR at once. The template leaves these out; add them to review each PR as it opens.
  • pull_request edited: acts on ticked Agree / Disagree boxes.
  • pull_request closed: a fix merged or closed by hand counts as Agree / Disagree, and a closed PR takes its Underlens branches and PRs with it.

underlens init and underlens validate also run by name.