bun-publishing
БесплатноБез исполняемых скриптовНе проверенPublish npm packages built with Bun: package.json config, CLI tool packaging, provenance signing, release automation. Use when setting up…
от laurigates★ 61 звезда на GitHubОб этом скилле
Bun npm Publishing
When to Use This Skill
| Scenario | Use this skill | Alternative |
|---|---|---|
| Configuring package.json for npm publishing | Yes | N/A |
| Publishing a package to npm registry | Yes | N/A |
Setting up CLI tool packaging with bin |
Yes | N/A |
| Configuring provenance signing | Yes | N/A |
| Setting up release-please automation | Yes | N/A |
| Validating tarball contents before publish | Yes | N/A |
| Installing or updating dependencies | No - use bun-package-manager |
bun-add for quick additions |
| Building/bundling before publish | No - use bun-development |
bun-build for quick builds |
Core Expertise
Publishing npm packages built with Bun:
- Package.json configuration for npm registry
- CLI tool packaging with executable binaries
- Provenance signing for supply chain security
- Release automation with release-please
Package.json Configuration
Essential Publishing Fields
{
"name": "@org/package-name",
"version": "1.0.0",
"description": "Package description",
"main": "build/index.js",
"type": "module",
"publishConfig": {
"access": "public"
},
"files": [
"build/",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsc && chmod +x build/index.js",
"prepublishOnly": "bun run build"
},
"engines": {
"node": ">=20.0.0",
"bun": ">=1.0.0"
}
}
Field Reference
| Field | Purpose |
|---|---|
publishConfig.access |
public required for scoped packages |
files |
Whitelist of files/dirs to include in tarball |
main |
Entry point for CommonJS/ES import |
type |
module for ESM, commonjs for CJS |
engines |
Runtime version requirements |
prepublishOnly |
Runs before npm publish |
Scoped Packages
Scoped packages (@org/name) require explicit public access:
{
"name": "@myorg/mypackage",
"publishConfig": {
"access": "public"
}
}
Or use the CLI flag:
npm publish --access public
CLI Tool Packaging
Binary Entry Configuration
{
"bin": {
"mycli": "build/index.js"
}
}
For single-command packages:
{
"bin": "build/index.js"
}
Executable Setup
Entry point requires shebang and executable permission:
#!/usr/bin/env node
// build/index.js
import { main } from "./main.js";
main();
Build script must set permissions:
{
"scripts": {
"build": "tsc && chmod +x build/index.js"
}
}
Makefile Integration
build-prod:
rm -rf build
tsc --declaration --sourceMap
chmod +x build/index.js
publish: build-prod
npm publish --access public
Publishing Commands
Manual Publishing
# Standard publish (runs prepublishOnly)
npm publish
# Scoped package (requires --access public)
npm publish --access public
# Dry run to verify contents
npm publish --dry-run
# View what would be published
npm pack --dry-run
With Provenance
Supply chain security via npm provenance:
npm publish --provenance --access public
Requires:
- CI environment (GitHub Actions, GitLab CI)
id-token: writepermission in workflow- npm registry-url configured
Files Whitelist
Recommended Pattern
{
"files": [
"build/",
"README.md",
"LICENSE"
]
}
What to Include
| Include | Examples |
|---|---|
| Build output | build/, dist/ |
| Type definitions | *.d.ts (usually in build) |
| Documentation | README.md, LICENSE |
| Config scripts | User-facing setup scripts |
What to Exclude
Already excluded by npm (no need to list):
node_modules/.git/.env**.log
Explicitly exclude via .npmignore if needed:
src/
tests/
*.test.ts
.github/
Release Automation
Release-Please Integration
.github/workflows/release-please.yml:
name: Release Please
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: googleapis/[email protected]
id: release
with:
release-type: node
package-name: mypackage
publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 24
registry-url: https://registry.npmjs.org
- uses: oven-sh/[email protected]
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run build
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Conventional Co
Установить bun-publishing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(bun run tsc *)Bash(bun run check *)Bash(bun test *)Bash(bun run build *)Bash(npm pack *)Bash(npm view *)Bash(npm access list *)Bash(npm outdated *)ReadWriteEditGrepGlobTodoWriteFAQ
Что делает скилл bun-publishing?
Publish npm packages built with Bun: package.json config, CLI tool packaging, provenance signing, release automation. Use when setting up `publishConfig`/`files`/`bin`, packaging a CLI, enabling `--provenance`, or wiring release-please.
Как установить скилл bun-publishing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bun-publishing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic