Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add onsager-ai/dev-skills --skill rust-npm-publishgit clone --depth 1 https://github.com/onsager-ai/dev-skillsWrote 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.
[](https://agentmods.dev/skills/onsager-ai/dev-skills/rust-npm-publish)<a href="https://agentmods.dev/skills/onsager-ai/dev-skills/rust-npm-publish"><img src="https://agentmods.dev/badge/skills/onsager-ai/dev-skills/rust-npm-publish/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.
<a href="https://agentmods.dev/skills/onsager-ai/dev-skills/rust-npm-publish"><img src="https://agentmods.dev/badge/skills/onsager-ai/dev-skills/rust-npm-publish.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00132 | $0.02065 |
| Opus 5 | $0.00066 | $0.01033 |
| Sonnet 5 | $0.00026 | $0.00413 |
| Haiku 4.5 | $0.00013 | $0.00206 |
Grade A, and why
rust-npm-publish scanned grade A with 0 findings 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 10d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust npm Publishing
Distribute Rust binaries to npm using the optionalDependencies platform package pattern.
When to Use This Skill
Activate when any of the following are true:
- Publishing Rust binaries to npm or debugging publish pipeline failures
- Setting up
publish.config.ts,bin.js, or platform package manifests - Managing version sync across workspace packages and
Cargo.toml - Working with
workspace:*protocol or prepare/restore scripts - Scripts matching
*publish*,*platform*,*version*, or*sync*exist
Decision Tree
What does the user need?
Setting up publishing for the first time?
→ The Pattern section + Configuration + Templates
Running the publish pipeline?
→ Publish Pipeline section
→ Full details: references/publish-pipeline.md
Adding a new platform?
→ Adding a New Platform section
→ Platform reference: references/platform-matrix.md
Version sync / bump?
→ Versioning section
→ Full strategy: references/version-strategy.md
→ workspace:* details: references/workspace-protocol.md
Debugging a failure?
→ references/troubleshooting.md
The Pattern
@scope/my-tool ← main package (thin JS wrapper + bin.js)
├── optionalDependencies:
│ ├── @scope/my-tool-darwin-arm64 ← macOS ARM (M-series)
│ ├── @scope/my-tool-darwin-x64 ← macOS Intel
│ ├── @scope/my-tool-linux-x64 ← Linux x86_64
│ └── @scope/my-tool-windows-x64 ← Windows x86_64
Each platform package contains only the pre-compiled binary for that target. npm installs only the one matching the user's OS/CPU at install time.
Same approach used by SWC, Turbopack, esbuild, and similar tools.
Configuration
Each repo provides a publish.config.ts (see examples/):
export default {
scope: '@myorg',
binaries: [{ name: 'my-cli', scope: 'cli', cargoPackage: 'my-cli-rs' }],
platforms: ['darwin-x64', 'darwin-arm64', 'linux-x64', 'windows-x64'],
mainPackages: [{ path: 'packages/cli', name: 'my-cli' }],
cargoWorkspace: 'Cargo.toml',
repositoryUrl: 'https://github.com/myorg/my-project',
};
What ships with it
22 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/clawden.config.ts 608 B runs code
- examples/lean-spec.config.ts 904 B runs code
- references/platform-matrix.md 2.7 KB
- references/publish-pipeline.md 4.8 KB
- references/troubleshooting.md 5.1 KB
- references/version-strategy.md 6.7 KB
- references/workspace-protocol.md 4.1 KB
- templates/add-platform-deps.ts 1.4 KB runs code
- templates/bump-dev-version.ts 1.3 KB runs code
- templates/copy-platform-binaries.sh 1.6 KB runs code
- templates/generate-platform-manifests.ts 3.1 KB runs code
- templates/prepare-publish.ts 1.9 KB runs code
- templates/publish-main-packages.ts 1.8 KB runs code
- templates/publish-platform-packages.ts 2.4 KB runs code
- templates/restore-packages.ts 958 B runs code
- templates/scripts/.gitkeep 0 B
- templates/sync-versions.ts 2.1 KB runs code
- templates/types.ts 960 B runs code
- templates/validate-no-workspace-protocol.ts 1.3 KB runs code
- templates/validate-platform-binaries.ts 2.8 KB runs code
- templates/wrapper/bin.js 2.2 KB runs code
- templates/wrapper/package.json 304 B
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.
- 10d ago First seen · 211 lines · 132 tokens per session scan A de55c5b3bdc9
rust-npm-publish is a skill published in the GitHub repository onsager-ai/dev-skills (5 stars, last pushed 28d ago), licensed MIT. It adds 132 tokens to every session and 2,065 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
omh-rust
This is a Hermes-native rust workflow skill.
bevy-ecs
Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the Time resource for frame-rate-independent motion. Use when building or debugging a Bevy game in Rust — when the user mentions…
rust-project
Modern Rust project architecture guide for 2025. Use when creating Rust projects (CLI, web services, libraries). Covers workspace structure, error handling, async patterns, and idiomatic Rust best practices.
gcs-rust-download-object-api
Fix "DownloadObjectRequest not found" error in google-cloud-storage Rust crate. Use when: (1) Trying to download objects from GCS using the Rust SDK, (2) Looking for a download request type in http::objects::download module, (3) Compile error about missing type. The downloadobject method uses GetObjectRequest from the…
azure-keyvault-secrets-rust
Client library for Azure Key Vault Secrets — secure storage for passwords, API keys, and other secrets.