publish-package
Package registry publishing for npm, crates.io, PyPI, and Homebrew. Verifies prerequisites, runs the publish command, confirms success, and surfaces actionable error hints on failure.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 292
- Forks
- 23
01 前言 Front Matter
- name
- publish-package
- model
- sonnet
- effort
- standard
- description
- Package registry publishing for npm, crates.io, PyPI, and Homebrew. Verifies prerequisites, runs the publish command, confirms success, and surfaces actionable error hints on failure.
02 资源文件 1
- 参考文档REFERENCE.md6.8 KB
03 SKILL.md 正文
Publish Package
HARD GATE — Do not attempt to publish without verifying prerequisites. Missing auth tokens, stale builds, or duplicate versions cause CI failures that are hard to debug post-push.
HARD GATE — Always run
--dry-runfirst. Package registries are append-only — a bad publish cannot be fully undone on most registries.
Publish packages to language-specific registries. Detects package type from manifest files, verifies publish prerequisites, runs the registry-specific publish command, and confirms the version appears on the registry.
Process
1. Detect package type
Read the project root for manifest files to determine the package type:
| Manifest | Registry | Publish command |
|---|---|---|
package.json |
npm | npm publish --access public |
Cargo.toml |
crates.io | cargo publish |
setup.py / pyproject.toml |
PyPI | twine upload dist/* or flit publish |
Formula/<name>.rb |
Homebrew | brew bump-formula-pr |
| Multiple detected | Polyglot | Error: specify registry with `--registry <npm |
If no manifest is found, prompt the user to specify the type or pass --type <npm|crates.io|pypi|brew>.
2. Verify prerequisites
Before attempting any publish, run all applicable checks:
npm (package.json):
See REFERENCE.md
crates.io (Cargo.toml):
See REFERENCE.md
PyPI (setup.py / pyproject.toml):
See REFERENCE.md
3. Run publish
After all prerequisite checks pass, run the registry-specific command:
See REFERENCE.md
4. Verify publish success
After publish, confirm the version appears on the registry:
See REFERENCE.md
5. Error handling
On failure, surface actionable hints:
See REFERENCE.md
6. Dry-run mode (--dry-run)
Run --dry-run to verify all prerequisites without actually publishing:
See REFERENCE.md
7. Dry-run mode per registry
See REFERENCE.md
Verify
→ verify: test -f skills/publish-package/SKILL.md && test -f package.json
→ verify: grep -q publish-package SKILL-INDEX.md
04 同仓库更多 Skills
skill-verify-fail-open-fixture
Negative-path fixture for run-skill-verify.sh — must never PASS.
negative-path
暂无简介
write-document
Write, organize, and sync high-integrity technical documents using the BMAD methodology. Ensures every document is Bold, Minimal, Actionable, and Durable. Use when creating architectural docs, technical guides, or organizing the specs/ directory.
wire-observability
Add structured JSON logging, observability commands, and idempotent setup scripts to a project. Use when a project needs production-readiness instrumentation, when user wants structured logging, or as a production-readiness gate at any phase of development.
wire-ci
CI pipeline setup with bundled, forge-neutral templates and local validation. Detects the forge from the git remote, generates workflows for supported forges, and skips honestly for the rest. The CI equivalent of wire-observability.
visual-dashboard
Start a browser-based dashboard that visualizes architecture, implementation plans, and project status. Persists artifacts in .bigpowers/dashboard/. Reads specs/state.yaml, release-plan.yaml, epics, and planning-status via HTTP API or opencode panel.