# Weekly metrics digest — a replayable Reelier skill

One-run digest of a project's public footprint — npm weekly downloads + GitHub stars + latest version — read-only

A real, read-only Reelier skill against a live public API — no account, no keys, no writes. Every replay proves: Three public sources — npm downloads, GitHub, and the npm registry — all answer in a single read-only run..

- Steps: 3 · Assertions: 8 · Effect: read (counts parsed from the file, never hand-typed)
- Endpoints: https://api.npmjs.org/downloads/point/last-week/reelier · https://api.github.com/repos/seldonframe/reelier · https://registry.npmjs.org/reelier/latest
- Canonical file: https://raw.githubusercontent.com/seldonframe/reelier/main/examples/portfolio/weekly-metrics-digest.skill.md
- HTML page: https://www.reelier.com/skills/weekly-metrics-digest

## What this checks

Three steps, one digest: a GET to npm's downloads API (trailing-7-day count), a GET to GitHub's public repo API (stars + identity), and a GET to the npm registry (latest dist-tag). Eight assertions across the three hold each source to a 200 and a well-formed value.

Every metric is bound onto the receipt (downloads, stars, version) and nothing is pinned — the counts move every week, so each replay records the fresh digest while the shape assertions stay green run to run.

The value is the aggregation: where a single-metric skill answers one question, this one snapshots a project's whole public footprint in one replay — one receipt you can diff week over week.

Honesty note: Step 2 hits the unauthenticated GitHub REST API (60 requests/hour per IP). A rate-limited run returns 403, the status == 200 assert fails, and the receipt records a real failure — never a silent pass.

## The skill file (verbatim)

```markdown
---
name: weekly-metrics-digest
description: One-run digest of a project's public footprint — npm weekly downloads + GitHub stars + latest version — read-only
---

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

# Weekly metrics digest

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

<!--
  Personalization: swap the two literals for your own project — `reelier`
  (the npm package name, used in the downloads URL and the registry URL) and
  `seldonframe/reelier` (the GitHub owner/repo). 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
  work with zero flags.

  Where the single-metric skills each answer one question, this one rolls
  three public sources into a SINGLE receipt — a project's whole public
  footprint in one replay. Each step binds its metric; nothing is pinned, so
  the digest stays value-fresh week to week.

  Endpoints verified live on 2026-07-21: all three 200 — downloads 422,
  stars 1, latest version "0.14.0".
-->

Three sources, one digest. Each step asserts the **shape** (a 200 and a
non-negative or well-formed value) and **binds** the number onto the receipt —
the counts move every week, so the receipt records the fresh digest instead of
pinning a value that would rot tomorrow.

## Steps

### Step 1 — npm weekly 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

### Step 2 — GitHub stars
- intent: Fetch public repo metadata for seldonframe/reelier and read its star count and identity
- action: http.get {"url": "https://api.github.com/repos/seldonframe/reelier"}
- assert: status == 200
- assert: json.stargazers_count >= 0
- assert: json.full_name is string
- bind: stars = json.stargazers_count
- effect: read

### Step 3 — Latest published version
- intent: Fetch the latest published version of reelier from the npm registry
- action: http.get {"url": "https://registry.npmjs.org/reelier/latest"}
- assert: status == 200
- assert: json.version matches /^\d+\./
- bind: version = json.version
- 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/weekly-metrics-digest.skill.md -o weekly-metrics-digest.skill.md
npx -y reelier@latest run weekly-metrics-digest.skill.md

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

## Seed receipt — 2026-07-21

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

```
✓ Step 1 — npm weekly downloads [passed] 147ms
✓ Step 2 — GitHub stars [passed] 249ms
✓ Step 3 — Latest published version [passed] 85ms

PASSED: 3/3 steps ok, 0 failed, 481ms 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 two literals for your own project: `reelier` (the npm package, in the downloads and registry URLs) and `seldonframe/reelier` (the GitHub owner/repo). Do the owner/repo swap first so it doesn't collide with the package swap. 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 -e 's#seldonframe/reelier#YOUR-ORG/YOUR-REPO#g' -e 's/reelier/YOUR-PACKAGE/g' weekly-metrics-digest.skill.md > my-metrics-digest.skill.md \
  && npx -y reelier@latest run my-metrics-digest.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
