| description | Bun publish to npm. Use when the user wants to release to npm, preview with --dry-run, publish a scoped package with --access public, or enable --provenance signing. |
| args | [--dry-run] [--access <level>] [--provenance] |
| allowed-tools | Bash, Read |
| argument-hint | [--dry-run] [--access public] |
| disable-model-invocation | true |
| created | "2025-12-21T00:00:00.000Z" |
| modified | "2026-05-09T00:00:00.000Z" |
| reviewed | "2026-04-25T00:00:00.000Z" |
| name | bun-publish |
/bun:publish
Publish package to npm registry after building with Bun.
When to Use This Skill
| Use this skill when... | Use bun-publishing instead when... |
|---|
Executing a single npm publish action with the right flags | Looking up broader npm publishing workflow guidance and conventions |
Previewing a publish with --dry-run before releasing | Configuring publishConfig, scoped-package access, or provenance setup |
Releasing a scoped package with --access public | Use bun-build when you need to produce build artifacts before publishing |
Enabling supply-chain --provenance signing on a release | Use bun-lockfile-update when bumping dependencies before a release |
Parameters
--dry-run: Preview publish without executing
--access: Access level (public or restricted)
--provenance: Enable supply chain provenance signing
Context
Detect package configuration:
cat package.json | jq '{name, version, publishConfig, bin, files, scripts: {prepublishOnly: .scripts.prepublishOnly}}'
Execution
Pre-publish Validation
bun run tsc --noEmit 2>&1 | head -20
bun run build
npm pack --dry-run
Publish
Dry run (default for first attempt):
npm publish --dry-run {{ "--access " + ACCESS if ACCESS }}
Actual publish:
npm publish {{ "--access " + ACCESS if ACCESS }} {{ "--provenance" PROVENANCE }}
npm publish --access public {{ PROVENANCE }}