rust-npm-publish

Installation
SKILL.md

Rust npm Publish

Teach agents how to distribute Rust-compiled binaries via npm using the platform package pattern. This is the same pattern used by tools like SWC, Turbopack, and similar Rust-to-npm distribution pipelines.

When to Use This Skill

Activate when any of the following are true:

  • The repository has both Cargo.toml and package.json at root
  • Scripts directory contains *publish* or *platform* files
  • The user asks about publishing Rust binaries to npm
  • Platform-specific npm packages exist (@scope/cli-darwin-arm64, etc.)

The Pattern

Instead of shipping one npm package with pre-built binaries for all platforms, publish platform-specific packages as optionalDependencies. npm installs only the one matching the user's OS/CPU.

Related skills
Installs
GitHub Stars
1
First Seen
Mar 4, 2026