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

@apoorvdarshan/xscore

v1.0.1

Published

Analyze any X (Twitter) account against the open-source recommendation algorithm. CLI tool — run npx @apoorvdarshan/xscore @username

Readme

xscore

Analyze any X (Twitter) account against the open-source X recommendation algorithm. Run one command, get your score.

Quick Start

npx -y @apoorvdarshan/xscore @username

That's it. Fetches tweets locally, scores 19 engagement signals, and opens a shareable results page in your browser.

Prerequisites:

  • Node.js 18+
  • Logged into x.com in Chrome, Edge, or Brave (uses browser cookies via @steipete/bird)

How It Works

  1. Run the CLInpx -y @apoorvdarshan/xscore @username
  2. Local scoring — Fetches last 50 tweets using your browser cookies, scores each against the Phoenix weighted scorer formula
  3. View results — Opens xscores.vercel.app with your results encoded in the URL (shareable)

Your data never touches a server. Everything runs on your machine.

What You Get

  • Overall score (0-100) based on 19 engagement signals
  • Signal breakdown — P(action) for likes, reposts, clicks, dwell time, etc.
  • Per-tweet ranking — Every tweet ranked by P(favorite)
  • Insights — What's boosting and hurting your reach
  • Shareable link — Copy the URL and share it with anyone

Algorithm Mapping

Every piece of scoring logic traces back to xai-org/x-algorithm:

| App Component | Algorithm Source | What It Does | |---|---|---| | src/lib/algorithm.tsACTIONS | phoenix/runners.pyACTIONS list | The 19 predicted engagement signals | | src/lib/algorithm.tsSIGNAL_POLARITY | README.md | Classifies each signal as positive or negative | | src/lib/algorithm.tsscoreTweet() | README.md — "Final Score = Σ (weight_i × P(action_i))" | The weighted scorer formula | | src/lib/algorithm.tsestimateProbabilities() | phoenix/runners.pyprobs = jax.nn.sigmoid(logits) | Approximates P(action) from tweet metrics | | src/lib/algorithm.tsprimaryScore | phoenix/runners.pyprimary_scores = probs[:, :, 0] | Primary ranking uses P(favorite) | | src/lib/algorithm.tsWEIGHTS | NOT IN REPO | Weights are not disclosed; we use ±1.0 placeholders |

The 19 Engagement Signals

From phoenix/runners.py:

| # | Signal | Polarity | |---|---|---| | 0 | favorite_score (PRIMARY) | Positive | | 1 | reply_score | Positive | | 2 | repost_score | Positive | | 3 | photo_expand_score | Positive | | 4 | click_score | Positive | | 5 | profile_click_score | Positive | | 6 | vqv_score (video qualified view) | Positive | | 7 | share_score | Positive | | 8 | share_via_dm_score | Positive | | 9 | share_via_copy_link_score | Positive | | 10 | dwell_score | Positive | | 11 | quote_score | Positive | | 12 | quoted_click_score | Positive | | 13 | follow_author_score | Positive | | 14 | not_interested_score | Negative | | 15 | block_author_score | Negative | | 16 | mute_author_score | Negative | | 17 | report_score | Negative | | 18 | dwell_time | Positive |

Development

npm install
npm run dev

Tech Stack

Limitations

  1. No real model inference — P(action) is approximated from tweet metrics. The real Phoenix model uses a Grok-based transformer.
  2. Weights are unknown — The repo doesn't disclose weight values. All weights are ±1.0 placeholders.
  3. No personalization — The real algorithm personalizes per-viewer. This shows engagement rates from the author's perspective.
  4. Public metrics only — Negative signals (block, mute, report) are estimated since they aren't publicly observable.

Disclaimer

This is an independent tool not affiliated with X. Uses @steipete/bird for data access and xai-org/x-algorithm for scoring logic. Use at your own discretion.

Author

Built by Apoorv Darshan