- Home
- Skills
- Klaudworks
- Universal Skills
- Npm Publisher
npm-publisher_skill
- Shell
163
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
2 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill klaudworks/universal-skills --skill npm-publisher- SKILL.md3.6 KB
Overview
This skill automates and documents the complete npm package release workflow for projects using Git and GitHub Actions. It guides you through staging, committing, semantic version bumping, tagging, pushing, and verifying automated CI/CD publishing. The goal is a reliable, repeatable release process with clear error handling and a pre-release checklist.
How this skill works
It inspects your local git state and guides you to stage and commit changes, then determines an appropriate semantic version bump (patch, minor, major) based on the changes or your input. It runs npm version to update package.json, create a commit and git tag, then pushes commits and tags to trigger GitHub Actions that publish to npm. After the CI runs, it verifies the release and provides commands to test the published package.
When to use it
- You are ready to publish a new npm release (bugfix, feature, or breaking change).
- You need to bump version, tag, and trigger CI/CD to publish to npm.
- You have unstaged or uncommitted local changes that must be included in the release.
- CI failed on a previous publish and you need to re-release a fixed patch.
- You want a repeatable checklist to avoid publishing mistakes.
Best practices
- Review changes with git status and git diff before releasing.
- Run the full test and build pipeline locally before versioning.
- Use clear, meaningful commit messages explaining why changes exist.
- Apply semantic versioning: patch for fixes, minor for new features, major for breaking changes.
- Verify CI completion and test the published package via npx to confirm success.
Example use cases
- Publish a patch release after fixing a bug: stage, commit, npm version patch, push tags, confirm CI success.
- Release a new minor version after adding a feature: assess diff to choose 'minor', bump version, and verify deployment.
- Recover from push rejection: git pull --rebase, resolve conflicts, then push commits and tags again to trigger CI.
- Handle CI failure: inspect GitHub Actions logs, fix issues, and create a new patch release.
- Verify a published package by clearing npx cache and running npx <package-name> --version.
FAQ
Commit or stash all changes first. Use git status to confirm a clean working tree, then run npm version again.
How long until the package is published after pushing a tag?
GitHub Actions usually starts immediately; expect CI to complete in about 30 seconds to a few minutes depending on your workflow.
What if the version already exists on npm?
Check existing versions with npm view <package-name> versions and bump to the next appropriate version; do not reuse existing tags.