Skip to content

Package Publisher

Caution

Automate npm/PyPI package publishing with semantic versioning, changelog generation, CI/CD release pipelines, and provenance attestation.

By community 1,800 v1.0.0 Updated 2026-03-08

Install

Claude Code

Copy the SKILL.md file to .claude/skills/package-publisher.md

About This Skill

Package Publisher automates the entire release lifecycle for npm and PyPI packages, from version bumping to registry publishing with cryptographic provenance.

Semantic Versioning

Integrates semantic-release (npm) or python-semantic-release (PyPI) to automatically determine the next version from conventional commits. `fix:` bumps patch, `feat:` bumps minor, `feat!:` or `BREAKING CHANGE:` bumps major.

npm Publishing

  • Generates `.releaserc.json` with plugins: commit-analyzer, release-notes-generator, changelog, npm, git, github
  • Publishes with `--provenance` flag for npm v9+ supply chain attestation
  • Supports scoped packages and dist-tags (alpha/beta/latest)
  • Dual CJS+ESM builds with package.json `exports` map

PyPI Publishing

  • Uses OIDC trusted publisher (no API token needed) with `pypa/gh-action-pypi-publish`
  • Generates `pyproject.toml` with hatchling build backend
  • Publishes to TestPyPI on PRs, production PyPI on main branch

Changelog

Keeps CHANGELOG.md in Keep a Changelog format, auto-updated on each release. Includes GitHub release notes with contributor attribution.

Pre-release Channels

Configures `next` branch for beta releases and `alpha` branch for canary releases, each publishing to their respective dist-tags.

Use Cases

  • Setting up semantic-release for fully automated npm package publishing
  • Configuring PyPI publishing with trusted publishers (OIDC, no secrets)
  • Generating CHANGELOG.md from conventional commit messages
  • Adding npm provenance attestation for supply chain security

Pros & Cons

Pros

  • + Fully automated releases triggered by conventional commits
  • + PyPI OIDC trusted publisher eliminates long-lived secrets
  • + npm provenance attestation improves supply chain security
  • + Changelog and GitHub releases generated automatically

Cons

  • - Conventional commit discipline required from all contributors
  • - Initial registry setup (npm org, PyPI trusted publisher) is a manual one-time step

Related AI Tools

Related Skills

Stay Updated on Agent Skills

Get weekly curated skills + safety alerts

每周精选 Skills + 安全预警