# npm download radar — a replayable Reelier skill

Trailing-7-day npm download count for the reelier package — shape-asserted, value-fresh, read-only

A real, read-only Reelier skill against a live public API — no account, no keys, no writes. Every replay proves: npm's downloads API answers with a numeric weekly count.

- Steps: 1 · Assertions: 3 · Effect: read (counts parsed from the file, never hand-typed)
- Endpoints: https://api.npmjs.org/downloads/point/last-week/reelier
- Canonical file: https://raw.githubusercontent.com/seldonframe/reelier/main/examples/portfolio/npm-download-radar.skill.md
- HTML page: https://www.reelier.com/skills/npm-download-radar

## What this checks

One step: an HTTP GET to npm's downloads API for the trailing-7-day count of the reelier package. Three assertions hold it to account: the API answered 200, downloads is a non-negative number, and the package name comes back as a string.

The assertions check the shape, never the value. The count changes every week, so the skill binds it onto the receipt (downloads = json.downloads) instead of pinning it — every replay records the fresh number, and a healthy pull is always the same shape.

## The skill file (verbatim)

```markdown
---
name: npm-download-radar
description: Trailing-7-day npm download count for the reelier package — shape-asserted, value-fresh, read-only
---

<!-- synced from seldonframe/reelier examples/portfolio — edit there -->

# npm download radar

Inputs: (none — this file replays green as-is; see the personalization note)

<!--
  Personalization: swap the one literal `reelier` at the end of the URL for
  your own package name (the portfolio README's "Point these at YOUR project"
  section has the one-command version). The skill grammar deliberately has no
  default-value syntax for {{var}} holes — an unbound {{var}} is an explicit
  error, never a guessed fallback — so this file ships with a literal that
  works with zero flags instead of a hole that fails without one.

  Endpoint verified live on 2026-07-21: 200, body
  {"downloads":263,"start":"2026-07-14","end":"2026-07-20","package":"reelier"}.
-->

The assertions check the **shape**, never the value: the count changes every
week, but a healthy pull is always a 200 with a numeric `downloads` and the
package name echoed back as a string.

## Steps

### Step 1 — Last-week downloads
- intent: Fetch the trailing-7-day npm download count for the reelier package
- action: http.get {"url": "https://api.npmjs.org/downloads/point/last-week/reelier"}
- assert: status == 200
- assert: json.downloads >= 0
- assert: json.package is string
- bind: downloads = json.downloads
- effect: read
```

## Run it yourself

`reelier run` takes a local file, so fetch the canonical copy first (or clone the repo). The replay writes its receipt to `.reelier/runs/`.

```sh
curl -fsSL https://raw.githubusercontent.com/seldonframe/reelier/main/examples/portfolio/npm-download-radar.skill.md -o npm-download-radar.skill.md
npx -y reelier@latest run npm-download-radar.skill.md

# or from a clone:
git clone https://github.com/seldonframe/reelier
cd reelier && npx -y reelier@latest run examples/portfolio/npm-download-radar.skill.md
```

## Seed receipt — 2026-07-21

Replayed for real with the published CLI (resolved to reelier@0.12.1) on 2026-07-21; the run record confirms passed: true and 0 LLM tokens (input + output). Verbatim output:

```
✓ Step 1 — Last-week downloads [passed] 167ms

PASSED: 1/1 steps ok, 0 failed, 167ms total
```

Standing audit log: a GitHub Action replays all five portfolio skills every 6 hours (plus on demand) — https://github.com/seldonframe/reelier/actions/workflows/portfolio-replay.yml. A failing endpoint produces an honestly failing receipt, never a retried-until-green one.

## Point it at your project

Swap the one literal `reelier` at the end of the URL for your own package name. The skill grammar has no default-value syntax for {{var}} holes — an unbound {{var}} is an explicit error, never a guessed fallback — so this file ships with literals that replay green with zero flags.

```sh
sed 's/reelier/YOUR-PACKAGE/g' npm-download-radar.skill.md > my-download-radar.skill.md \
  && npx -y reelier@latest run my-download-radar.skill.md
```

---

Reelier — agents make claims, Reelier writes receipts. AGPL-3.0.
Portfolio index: https://www.reelier.com/skills (twin: https://www.reelier.com/skills.md) · Replay ledger: https://www.reelier.com/replays · Machine-readable summary: https://www.reelier.com/llms.txt
