r3: Skill for Claude Code

.claude/skills/build-and-distribution/SKILL.md

build-and-distribution is a skill for Claude Code from hyperlogue/r3. It costs 134 tokens per session (2,298 once invoked), scanned A, original, MIT.

A project guide for building and distributing r3, including its command-line program and browser interface.

In plain words
What is it for?
Use it when changing the build process, preparing platform-specific packages, or maintaining the npm launcher and browser demo.
Why use it?
It explains how the browser files are prepared, how everything is packaged into one executable, and how releases are shipped through GitHub and npm.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is hyperlogue/r3's own configuration. It tells Claude Code how to work on r3 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything r3 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hyperlogue/r3. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/hyperlogue/r3/main/.claude/skills/build-and-distribution/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/hyperlogue/r3

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-and-distribution

README.md
[![agentmods](https://agentmods.dev/badge/skills/hyperlogue/r3/build-and-distribution/github.svg)](https://agentmods.dev/skills/hyperlogue/r3/build-and-distribution)
Your own site
<a href="https://agentmods.dev/skills/hyperlogue/r3/build-and-distribution"><img src="https://agentmods.dev/badge/skills/hyperlogue/r3/build-and-distribution/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for build-and-distribution

Your own site · 80×15
<a href="https://agentmods.dev/skills/hyperlogue/r3/build-and-distribution"><img src="https://agentmods.dev/badge/skills/hyperlogue/r3/build-and-distribution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,298 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 51
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 123
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium MCP Rug Pull · line 39
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00134 $0.02298
Opus 5 $0.00067 $0.01149
Sonnet 5 $0.00027 $0.00460
Haiku 4.5 $0.00013 $0.00230

Measured 9d ago against content hash c4e694031212, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

build-and-distribution scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **GitHub Releases** carry the raw assets (curl / Homebrew). No checksum
.claude/skills/build-and-distribution/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Building and shipping r3

This file is the design source of truth for r3's build + distribution — update it here when the pipeline changes. (Cutting an actual release — changelog, version bump, tag — is the separate release skill.)

The single-file binary

bun run build runs one Bun.build({ compile }) (scripts/compile.ts) over the CLI entry — which imports the daemon, which imports the SPA via import index from "../web/index.html". That embeds the Bun runtime, all JS deps, bun:sqlite, and the bundled SPA (as Bun.embeddedFiles) into one ./r3 executable that serves its own UI. The CLI is the binary; the hidden __daemon subcommand re-execs it to serve.

The CSS pre-pass is load-bearing. The SPA stylesheet is Tailwind-compiled first in a separate browser-target pass (scripts/spa-css.ts, shared with release-binaries.ts). A compile build is target:"bun", whose CSS printer keeps Tailwind's native nesting verbatim — and un-lowered nesting breaks in browsers (& {…} under ::placeholder is unmatchable, so placeholders lose their dimming). The pre-pass lowers it flat; the compile build embeds it as-is. Don't remove it.

Two release channels, one tag-driven pipeline

scripts/release-binaries.ts cross-compiles the four r3-<os>-<arch> binaries. From there:

  • GitHub Releases carry the raw assets (curl / Homebrew). No checksum manifest ships with them — GitHub publishes a sha256 digest per asset, and the build job verifies against those digests on the reuse path.
  • npm ships a tiny launcher (@hyperlogue/r3, npm/launch.mjs) whose per-platform binaries are optional-dependency packages (@hyperlogue/r3-<os>-<arch>, staged by scripts/stage-npm-packages.ts). npm installs only the matching package, so bunx/npx @hyperlogue/[email protected] resolves-and-execs that version's binary with no runtime download — the launcher only does createRequire().resolve + spawn.

npm auth is trusted publishing (OIDC) — there is no npm token. Each of the five packages registers release.yml by filename as its trusted publisher on npmjs.com, and npm mints a short-lived publish-only credential from the runner's OIDC identity. So: renaming .github/workflows/release.yml breaks publishing until all five registrations are updated, publishing can't move to another workflow or a self-hosted runner, and a brand-new package name (adding a platform target) has no trusted publisher yet — its first publish is manual, then register release.yml on it. Requires npm ≥ 11.5.1, which is why the job upgrades npm and omits setup-node's registry-url (its .npmrc placeholder token would shadow OIDC).

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 160 lines · 134 tokens per session scan A c4e694031212

Subscribe to this mod's changes

build-and-distribution is a skill published in the GitHub repository hyperlogue/r3 (25 stars, last pushed 3d ago), licensed MIT. It adds 134 tokens to every session and 2,298 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.