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

@unveil/vk

v0.6.0

Published

Fetch GitHub account activity and analyze it for automation patterns

Downloads

1,505

Readme

vk

Fetch GitHub account activity and analyze it for automation patterns

This is the batteries-included wrapper around @unveil/identity. Give it a username and it does the GitHub API calls for you, then hands the result to the scoring engine.

It talks to the GitHub REST API with native fetch and has no dependencies beyond @unveil/identity, so it runs the same in Node, Deno, Bun, the browser and edge runtimes.

Both packages are the logic behind AgentScan, a tool for analyzing GitHub account behavior to detect potential AI agents and automated activity. The results are indicators, not verdicts.

Install

npm install @unveil/vk

Usage

import { analyze } from "@unveil/vk";

const { analysis, eventsCount } = await analyze("github_account_username", {
  token: process.env.GITHUB_TOKEN,
});

console.log(analysis.classification); // "organic" | "mixed" | "automation" | "insufficient-data"
console.log(analysis.score);          // 100 = human, 0 = automation
console.log(analysis.confidence);     // 0-1: how much evidence there was
console.log(eventsCount);             // how many events we actually got back

Options

analyze(username, {
  token: "ghp_...",   // GitHub token. Optional, but strongly recommended
  showEvents: true,   // return the raw events too. Off by default
});

token is sent as Authorization: Bearer. Without it you are on the unauthenticated rate limit, which is 60 requests per hour for the whole IP — and each analyze call spends 4 of them. With a token you get 5000 per hour. The token needs no scopes; all the data read here is public.

showEvents controls whether the raw events come back in the result. They are left out by default because 300 GitHub events is a lot of JSON to carry around when all you wanted was the score.

Result

{
  analysis,     // the full IdentifyResult from @unveil/identity
  events,       // the raw events, or [] unless showEvents is set
  eventsCount,  // always the real count, even when events is empty
}

analysis is whatever identify() returns — score, classification, confidence, flags, groups, window, timezone and profile. See the identity README for the full shape and for what each of the 53 heuristics looks at.

How much it fetches

analyze requests three pages of 100 public events, in parallel. That is both the maximum GitHub serves from the public events endpoint and the window @unveil/identity scores over, so there is nothing to gain from asking for more.

Accounts with less activity than that simply return fewer events, and the analysis reports lower confidence to match.

Errors

analyze rejects instead of returning a partial result. A missing user, a revoked token or an exhausted rate limit all come back as a plain Error carrying GitHub's own message, with the status and url of the failed request attached to it:

try {
  await analyze("ghost");
} catch (error) {
  if (error.status === 404) {
    // no such account
  }
}

Network failures reject with whatever fetch threw, untouched.

Which package do I want?

Use @unveil/vk when you have a username and want an answer.

Use @unveil/identity when you already have the user and events — from your own database, a cache, a webhook, or your own authenticated client — and only want the scoring. It has no network access and no dependencies on how you got the data.

Issues and feature requests

Please drop an issue if you find something that doesn't work, or have an idea for something that works better.