// This skill must be loaded via the skill tool when the user mentions anything related to publishing or release an npm package. It contains essential knowledge about the complete release workflow. Things a user might say are Publish the npm package,Release a new version,Deploy to npm,Create a new release,Bump the version and publish
| name | npm-publisher |
| description | This skill must be loaded via the skill tool when the user mentions anything related to publishing or release an npm package. It contains essential knowledge about the complete release workflow. Things a user might say are Publish the npm package,Release a new version,Deploy to npm,Create a new release,Bump the version and publish |
This skill provides a complete workflow for publishing npm packages with automated CI/CD. It handles version bumping, git tagging, and triggering automated npm publishing through GitHub Actions.
Follow this workflow when releasing a new version with unstaged changes:
Stage all pending changes:
git add .
Commit with a meaningful message describing what changed:
git commit -m "$(cat <<'EOF'
<Description of changes>
<Optional: more details>
EOF
)"
Important: Never add attributions to a coding agent in commit messages.
Ask the user which type of version bump is appropriate, or infer from the changes:
If unclear, analyze the git diff to determine the appropriate version type based on:
Bump the version using npm:
npm version <patch|minor|major>
This command will:
Push both commits and tags to the remote repository:
git push && git push --tags
After pushing, publishing happens automatically through CI/CD:
gh run list --limit 1
After CI completes successfully, verify the published version:
# Clear npx cache if needed
npx clear-npx-cache
# Test the new version (replace 'universal-skills' with the actual package name)
npx <package-name> --version
Uncommitted changes error:
npm versiongit status to check for uncommitted changesPush rejected:
git pull --rebaseCI/CD failure:
gh run view --logVersion already exists:
npm view <package-name> versionsgit status and git diffBefore starting the release workflow, ensure: