Agent skill

Download Stats

by nubjs in nubjs/nub

Generate download-stats CSVs and a chart for nub across its distribution channels (npm + GitHub release assets, which subsume Homebrew).

MITAuto-check passedDocuments & Office

Install Download Stats

skills CLI
$ npx skills add nubjs/nub --skill download-stats -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nubjs/nub download-stats --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nubjs/nub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/download-stats .claude/skills/download-stats && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
download-stats
GitHub stars
4.4k
Token cost
~2.5k tokens
SKILL.md length
1,369 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
MIT

At a glance

Generate download-stats CSVs and a chart for nub across its distribution channels (npm + GitHub release assets, which subsume Homebrew).

  • Tasks that involve CSV and tabular files
  • SKILL.md covers What may be added to what —… and Granularity and gotchas (the…
  • Calls node, npm and gh

What it does

Download Stats is an agent skill from nubjs/nub. Generate download-stats CSVs and a chart for nub across its distribution channels (npm + GitHub release assets, which subsume Homebrew). Invoke (via the Skill tool) when asked to check, chart, or export download numbers, install counts, or adoption stats. Encodes the channel map, which numbers may be added together, each channel's real granularity and lag, and the checksum-asset inflation gotcha.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering CSV and tabular files. It works with npm, GitHub and Homebrew. The repository describes itself as: The fast all-in-one Node.js toolkit. The licence is MIT.

When your agent uses it

  • Tasks that involve CSV and tabular files

Example prompts

  • “/download-stats”

Requirements

  • Node.js
  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit 568e73a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • npm
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Download Stats loads about 2.5k tokens when it runs. Until then it costs about 104 tokens; SKILL.md has 1,369 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nubjs/nub at commit 568e73a, republished under its MIT licence (© nubjs). 1,369 words, ~2,539 tokens.

Download SKILL.mdSave it as .claude/skills/download-stats/SKILL.md (or your agent's skills folder).
name
download-stats
description
Generate download-stats CSVs and a chart for nub across its distribution channels (npm + GitHub release assets, which subsume Homebrew). Invoke (via the Skill tool) when asked to check, chart, or export download numbers, install counts, or adoption stats. Encodes the channel map, which numbers may be added together, each channel's real granularity and lag, and the checksum-asset inflation gotcha.
metadata.internal
true

download-stats — pull nub's download numbers into CSVs and a chart

One command does everything:

sh
node scripts/download-stats.mjs             # npm from the API, GitHub from the ledger branch, then CSVs + chart
node scripts/download-stats.mjs --npm-only  # skip the gh-authenticated GitHub half
node scripts/download-stats.mjs --chart-only # re-render from the CSVs on disk, no network
node scripts/download-stats.mjs --no-chart --out <dir> --package @nubjs/nub --repo nubjs/nub

Output lands in tmp/download-stats/ (gitignored — derived data, regenerated on demand):

FileWhat it holds
downloads-weekly.csvThe clean series. week_start,week_end,days,complete,npm,github,total — one row per UTC Monday week. github fills only when snapshot intervals cover all seven days; total also needs the npm week complete.
npm-weekly.csvThe npm half by UTC Monday week, with a gaps column and platforms_total for reference.
npm-monthly.csvCalendar months, with expected_days, gaps, and the current month's projected_remainder/projected_total.
npm-daily.csvOne row per day since first publish: the meta package, each platform package, platforms_total, running cumulative.
github-releases.csvPer-release, per-asset cumulative counters, one set per snapshot date — a flattened export of the ledger, regenerated each run.
github-intervals.csvWritten once two or more snapshots exist — the deltas between them, with a per_day rate. Intervals, NOT weeks: a snapshot delta ignores week boundaries.
summary.jsonMachine-readable totals, the platform split, and the caveats as data.
downloads.htmlSelf-contained page — no deps, no CDN, opens from disk. Hero total, an all-time source split, and one stacked chart (npm below, GitHub above) toggling weekly/monthly.

Pure aggregation logic lives in scripts/lib/download-stats.mjs and is tested in scripts/download-stats.test.mjs; the renderer is scripts/lib/download-chart.mjs.

The page draws COMPLETE PERIODS ONLY. A part-period bar is not a small period, it is an unfinished one, and drawing it puts a fake cliff at the right edge; the month in progress is the single exception, shown at its full projected height with the forecast hatched so the bar still spans a real month. Bars stack by SOURCE — the only split that can be stacked, since the npm platform packages are pulled BY an npm install and stacking them would draw the same install twice.

Two renderer traps, both of which shipped a silently-wrong chart before they were caught by magnifying a screenshot rather than by reading the code:

  • A CSS custom property does not resolve inside <pattern> content — the tile is a paint resource, not part of the rendered tree, so var(--x) there paints nothing. Emit literal hex per mode and select with a CSS fill:url(#id) rule on the referencing element.
  • A paint server inside a display:none subtree is dead. The weekly and monthly charts are both in the document with one hidden, so a <defs> emitted per chart gives duplicate ids where url() takes the first — which is whichever chart the toggle just hid. Define patterns ONCE in a zero-sized but never-hidden <svg>.

What may be added to what — the double-counting rule

The only unduplicated total is npm @nubjs/nub + GitHub binary assets. Verified against npm/nub/package.json, npm/nub/postinstall.js, install.sh and crates/nub-cli/src/cli.rs:

Install path@nubjs/nub@nubjs/nub-<plat>GitHub asset
npm i -g @nubjs/nub110
npm i -g --omit=optional100 (a broken install, still counted)
npm ci from a lockfile11..80
pnpm with supportedArchitectures1N0
curl install.sh001 (+1 .sha256)
nub upgrade001 (+1 .sha256)
Homebrew tap001
  • Never add the platform packages to the meta package. They are pulled BY an npm install, never instead of one, so summing counts the same install twice. Measured all-time they run ~1.7x the meta count (and up to 6x in a given week), which is the tell that they are not one-per-install.
  • They are not a usable OS split either. A multi-arch Docker build, a supportedArchitectures pnpm install, and a registry mirror caching every optionalDependency each pull several per install. For an OS split use the GitHub per-asset counts, where one download really is one binary.
  • Nothing installs the binary outside these channels. postinstall.js only chmods and re-links shims, and bin/launch.js makes no network call — so an npm install always rides a platform package, and the curl/upgrade/brew paths never touch npm. The two channels are independent and add cleanly.
  • These are downloads, not users and not installs. An upgrade re-downloads; npm counts CI, mirrors and bots.
Show full SKILL.md (726 more words)Show less

Granularity and gotchas (the reasons this skill exists)

  • npm: daily is the finest granularity. api.npmjs.org/downloads/range/<start>:<end>/<pkg> returns UTC-day buckets; there is no hourly API. A single request caps at ~18 months — the script stitches windows, so all-time works regardless of age.
  • npm lags ~2 days, so the trailing week is ALWAYS short. The script trims trailing zero-days and flags every week with a complete column; quote the last COMPLETE week, never the trailing partial one, or a reporting artifact reads as a cliff.
  • Per-version npm splits have no history — api.npmjs.org/versions/<pkg>/last-week is a trailing-7-day snapshot only.
  • A snapshot interval is not a week, and summing the two channels across mismatched windows is the trap. The first real interval here ran 6 days across a week boundary; attributing it to either week would have compared 6 days of GitHub against 2 days of npm and called the sum a weekly total. allocateDeltasToDays() spreads an interval evenly over the days it covers, and weeklyGithub() returns null unless every day of the week is covered — an empty cell, never a partial one dressed as a whole.
  • GitHub asset counters are cumulative-only, and the daily ledger is the ONLY record of the past. No history endpoint exists. .github/workflows/download-stats.yml has taken a daily snapshot since 2026-06-24 and commits it to the download-stats-data branch (never main — main's ruleset blocks the Actions bot). readLedger() reads that branch; deltas between consecutive snapshots are the downloads in each interval, clamped at 0 since a deleted release can walk a counter backwards.
    • Never start a second snapshot series. A fresh live fetch gives exactly one data point and quietly competes with a ledger that already has months of depth. This skill previously described the script taking its own snapshots; that was a duplicate built without finding the existing one, and it is why this bullet now leads with the ledger.
    • Periods before 2026-06-25 (the first delta) have no GitHub figure and print —. That is missing data, not zero, and it is not recoverable.
    • 2026-09-01 through 2026-09-11 is ONE 11-day interval, not eleven days. The workflow failed every day of that span — gh api --paginate --jq emits one array per page, and the release list crossed 100 entries on 2026-09-01 — and the fix landed with the 2026-09-11 snapshot. The gain over those 11 days is real but is spread evenly across them, so daily and weekly GitHub figures inside the span are averages. Check gh run list --workflow=download-stats.yml whenever the ledger tip is older than two days — a failing schedule is silent, and every missed day widens the smear.
    • Bucketing a release's downloads by its publish date to fake earlier history does not work — tested against two snapshots: 0% of the interval's gain went to releases published inside it, and a release from two months earlier still gained 566. Old releases keep accruing.
  • Exclude .sha256 assets — every release ships a checksum file per tarball and installers fetch them, inflating the raw sum by roughly half (measured: 17.5K checksum fetches against 34.1K real binaries). nub-launcher-* templates are fetched by nub compile to cross-compile, not by anyone installing nub. assetKind() does this classification; do not re-derive it with a grep.
  • The month in progress is projected, and the method is deliberate. projectMonth() extrapolates the remaining days at the mean of the trailing 7 days. Two traps it exists to avoid: (1) remaining days are counted forward from the LAST OBSERVED DAY, never as expected_days - observed_days — a package's first month is short because publishing started mid-month, and the naive form would "project" days that already happened; (2) the rate is a trailing 7-day window rather than a month-to-date mean, because that window holds one of each weekday and npm traffic is heavily CI-driven, so weekdays run far above weekends.
  • npm sometimes reports a day as zero for EVERY package at once — a batch-job gap, not a zero-download day (measured: 2026-07-12 and 2026-08-14). isGapDay() flags them. They are left at zero in totals, because imputing would invent downloads, but they are excluded from the forecast rate, where one false zero cost 6%. A day where only the meta package reads zero while platform packages report is left alone as the ambiguous case.
  • The rolling canary prerelease is excluded — it is recreated by every nightly canary build, so its counters reset and would corrupt the snapshot deltas. nub upgrade --canary downloads are therefore uncounted.

© nubjs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/download-stats of nubjs/nub.

Open the folder on GitHubat commit 568e73a

Compare with similar skills

Download Stats next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Download Stats compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Download Stats this skillnubjs/nub4.4k—~2.5kAutomated safety check: PassMIT
Release Flowromankurnovskii/BrewMate300—~976Automated safety check: PassMIT
Deploykangraemin/claude-inspector131—~739Automated safety check: NotesMIT
ClickUp CLI Release Processkrodak/clickup-cli123—~906Automated safety check: WarnMIT
Release Processbradygaster/squad3.3k—~1.5kAutomated safety check: PassMIT
Release Processbradygaster/squad3.3k—~2.4kAutomated safety check: PassMIT

Similar skills

  • Release Flow

    romankurnovskii/BrewMate

    Automate the full application release flow for BrewMate, including committing local changes, bumping version, waiting for GitHub Actions release build, and pushing the in-repo cask update…

    300 GitHub stars~976 tokensUpdated 12 days ago
    DevOps & CloudAuto-check passed
  • Deploy

    kangraemin/claude-inspector

    Claude Inspector macOS 배포 스킬. An agent skill from kangraemin/claude-inspector.

    131 GitHub stars~739 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check: notes
  • ClickUp CLI Release Process

    krodak/clickup-cli

    Walks through releasing a new version of clickup-cli: pre-release checks, version bump, tagging, CI watch, release notes and the Homebrew update.

    123 GitHub stars~906 tokensUpdated 4 days ago
    DevOps & CloudAuto-check: warnings
  • Release Process

    bradygaster/squad

    Operate Squad's automated insider, preview, and stable release channels safely

    3.3k GitHub stars~1.5k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Release Process

    bradygaster/squad

    Prepare, publish, recover, and verify Squad insider, preview, and stable releases

    3.3k GitHub stars~2.4k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Release

    kdlbs/kandev

    Kandev release and version-channel conventions — unified Stable SemVer plus deterministic npm-only Nightlies.

    912 GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed

More from nubjs/nub

All 31 skills in this repo
  • Cpu Reduction

    nubjs/nub

    Diagnose and clear CPU, memory, and disk contention on the maintainer's dev host.

    4.4k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Reclaim disk on the maintainer's Mac when the volume is full or filling — ENOSPC, "no space left on device", a failed build or agent harness, or a routine sweep of Rust build residue.

    4.4k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Nub Charts

    nubjs/nub

    Build a performance chart for nubjs.com — the SVG bar figures in blog posts, docs pages and social posts (a runtime augmentation against plain node, an install or dispatch comparison, a cross-tool…

    4.4k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Audit Thread

    nubjs/nub

    A skill your agent uses when running a compatibility/parity AUDIT — enumerating where nub diverges from a reference it claims parity with (pnpm CLI grammar, a lockfile format, a Node behavior, a…

    4.4k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Linux Vm Test

    nubjs/nub

    Run ad-hoc Nub tests and debugging probes on real local Linux guests.

    4.4k GitHub stars~986 tokensUpdated today
    Auto-check passed
  • Performance-trace Nub package-manager installs using the existing phase timings, structured diagnostics, and sampling-profiler workflow.

    4.4k GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Questions about Download Stats

What does Download Stats do?

Generate download-stats CSVs and a chart for nub across its distribution channels (npm + GitHub release assets, which subsume Homebrew). Download Stats is an agent skill from nubjs/nub. Generate download-stats CSVs and a chart for nub across its distribution channels (npm + GitHub release assets, which subsume Homebrew).

When should I use Download Stats?

Download Stats fits situations like: tasks that involve CSV and tabular files.

How do I install Download Stats in Claude Code?

Run `npx skills add nubjs/nub --skill download-stats -a claude-code`. Or copy the skill folder (.claude/skills/download-stats in nubjs/nub) into .claude/skills/download-stats in your project. Claude Code loads it when a task matches its description.

How do I install Download Stats in Codex?

Run `npx skills add nubjs/nub --skill download-stats -a codex`. Or copy the skill folder (.claude/skills/download-stats in nubjs/nub) into .agents/skills/download-stats in your project. Codex loads it when a task matches its description.

Can I use Download Stats in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nubjs/nub --skill download-stats -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/download-stats, .gemini/skills/download-stats, .github/skills/download-stats and .opencode/skills/download-stats in your project.

What does Download Stats need to run?

Going by SKILL.md and its folder, Download Stats needs the command-line tools its instructions call (node, npm and gh). Our summary lists: Node.js; Docker.

Does Download Stats access the network?

SKILL.md contains no URLs. Its commands use npm and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Download Stats safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Download Stats use?

Download Stats is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Download Stats use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Download Stats?

Skills that share tags, products or a category with Download Stats: Release Flow (romankurnovskii/BrewMate, 300 stars), Deploy (kangraemin/claude-inspector, 131 stars), ClickUp CLI Release Process (krodak/clickup-cli, 123 stars) and Release Process (bradygaster/squad, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Download Stats?

nubjs (a GitHub organization) maintains it in nubjs/nub, which has 4,375 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 10, 2026.

Source: nubjs/nub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.