agentleFS
cogine-aicogine-ai/cogine-dev-skillset/skills/npm-release-pipeline/SKILL.md

npm-release-pipeline

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Use when releasing a Node.js package to npm, or when asked to verify release readiness, run prepublish checks, publish a new version, create/push git tags, create a GitHub Release, or close release-related issues/epics. Best for repo-agnostic npm package release work where the package is defined by package.json and the exact release checklist must be executed safely.

  • Installs packages
  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

34 rules. About 0 are common, 27 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈27

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill to run a safe, repeatable npm release flow for a generic Node.js package.

    line 10
  2. Distinctive:

    Verify remote default branch / release branch state.

    line 17
  3. Distinctive:

    Verify version, changelog / release-notes inputs, npm availability, release channel, CI, and working tree safety.

    line 18
  4. Distinctive:

    Run local release checks.

    line 19
  5. Distinctive:

    Verify published version and dist-tags.

    line 22
  6. Distinctive:

    Create and push git tag.

    line 23
  7. Distinctive:

    Create GitHub Release if requested.

    line 24
  8. Distinctive:

    Check these before publishing:

    line 30
  9. Distinctive:

    If a changelog or release notes process exists, confirm the new version is documented or draftable from merged PRs.

    line 40
  10. Very specific:

    If prepublishOnly exists, treat it as a final guardrail, not a substitute for proactive verification.

    line 41
  11. Distinctive:

    If any of the above is unclear, ask the smallest clarifying question needed.

    line 43
  12. Distinctive:

    Use the package's actual scripts and metadata.

    line 47
  13. Very specific:

    Use a non-latest tag such as next for prereleases, staged rollouts, or any release that should not become the default install target.

    line 103
  14. Distinctive:

    Use semantic tags unless the repo uses another convention.

    line 115
  15. Distinctive:

    Stop and report instead of publishing when:

    line 135
  16. Distinctive:

    Treat these as separate states and report them explicitly:

    line 148
  17. Very specific:

    If the repo uses files, .npmignore, or publishConfig, inspect them when package contents look surprising.

    line 171
  18. Very specific:

    If CHANGELOG.md exists, prefer its version-specific entry as the canonical notes source.

    line 183
  19. Distinctive:

    Keep the notes factual and compact.

    line 206
  20. Distinctive:

    Check release-channel intent before publishing.

    line 210
  21. Very specific:

    use latest for the default stable release users should get from npm install <package-name>

    line 214
  22. Very specific:

    use next (or another explicit tag) for prereleases, canaries, beta lines, or staged rollouts

    line 215
  23. Distinctive:

    do not assume a prerelease semver automatically implies the correct dist-tag.

    line 216
  24. Distinctive:

    Before publish, check current tags:

    line 218
  25. Distinctive:

    After publish, verify that:

    line 224
  26. Distinctive:

    If channel state looks wrong, stop and report the exact mismatch before doing follow-up steps such as GitHub Release creation or issue …

    line 230
  27. Distinctive:

    Create a GitHub Release only when the user asks for it or the repo's release flow clearly requires it.

    line 234
  28. Distinctive:

    Use the finalized release notes as the source of truth for the GitHub Release body.

    line 236
  29. Distinctive:

    Do not assume every release should close issues automatically.

    line 240
  30. Distinctive:

    Before closing release-related issues/epics, confirm that:

    line 242
  31. Distinctive:

    If closing an issue, leave a short comment stating the released package version.

    line 249
  32. Distinctive:

    Ask only if not already obvious from repo state:

    line 253
  33. Distinctive:

    default branch name (main, master, or another branch)

    line 255
  34. Distinctive:

    Keep the report short and operational.

    line 271

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Npm Release Pipeline

Overview

Use this skill to run a safe, repeatable npm release flow for a generic Node.js package.

Favor a strict order: verify release readiness first, publish second, then do Git/GitHub follow-up. Stop on failed preconditions. If a step partially succeeds, report the exact state instead of pretending the whole release is clean.

Default workflow

  1. Identify the package and release target.
  2. Verify remote default branch / release branch state.
  3. Verify version, changelog / release-notes inputs, npm availability, release channel, CI, and working tree safety.
  4. Run local release checks.
  5. Generate or confirm release notes.
  6. Publish to npm with the intended dist-tag/channel.
  7. Verify published version and dist-tags.
  8. Create and push git tag.
  9. Create GitHub Release if requested.
  10. Close or comment on related release issues/epics if requested.
  11. Report final state, including any partial-success cleanup needed.

Release-readiness checklist

Check these before publishing:

  • package.json exists and contains name and version.
  • The intended release version is already committed on the branch you plan to release from.
  • The working tree is clean, unless the user explicitly wants a different flow.
  • The local branch matches the intended remote branch tip.
  • Relevant PRs are merged.
  • Relevant CI checks are green.
  • The intended npm release channel is clear (latest, next, or another tag).
  • Set <channel> to the intended npm release tag (latest, next, or another tag) and verify the target channel does not already point at the release version by checking npm view <package-name>@<channel> version or npm view <package-name> dist-tags.<channel>.
  • If a changelog or release notes process exists, confirm the new version is documented or draftable from merged PRs.
  • If prepublishOnly exists, treat it as a final guardrail, not a substitute for proactive verification.

If any of the above is unclear, ask the smallest clarifying question needed.

Core commands

Use the package's actual scripts and metadata; do not assume every repo has the same tooling.

Inspect package metadata

jq '{name,version,scripts,files,publishConfig}' package.json

Check git state

git status --short --branch
git fetch --tags origin
git rev-parse HEAD
git rev-parse origin/<default-branch>

Check npm auth, remote version, and dist-tags

npm whoami
npm view <package-name> versions --json
npm dist-tag ls <package-name>
npm view <package-name>@<channel> version
# or
npm view <package-name> dist-tags.<channel>

Set <channel> to the intended release tag such as latest, next, or a custom tag before using the channel-specific checks above.

Run prepublish verification

Preferred baseline for npm repos:

npm run build
npm test
npm pack --dry-run

Also inspect package contents when npm pack --dry-run prints the tarball file list. Confirm the built output and only intended files are included.

Publish

For the default stable channel:

npm publish

For an explicit release channel/tag:

npm publish --tag <dist-tag>

Use a non-latest tag such as next for prereleases, staged rollouts, or any release that should not become the default install target.

Then verify both version visibility and tag assignment:

npm view <package-name> version
npm dist-tag ls <package-name>
npm view <package-name>@<dist-tag> version

Tag and push

Use semantic tags unless the repo uses another convention.

git tag -a v<version> -m "release: v<version>"
git push origin v<version>

GitHub follow-up

Examples:

gh release create v<version> --repo <owner/repo> --title "v<version>" --notes-file <notes-file>
gh issue close <number> --repo <owner/repo> --comment "Released in <package-name>@<version>."

Decision rules

When to stop before publish

Stop and report instead of publishing when:

  • local version does not match the intended release version
  • target version is already on npm for the intended channel
  • working tree is dirty in a way that changes release output
  • branch is behind remote release branch
  • required CI is failing or missing
  • npm run build, npm test, or npm pack --dry-run fails
  • package contents look wrong or incomplete
  • npm auth is missing

When partial success happens

Treat these as separate states and report them explicitly:

  • Publish succeeded, tag not pushed
  • Publish succeeded, GitHub Release not created
  • Tag pushed, issue/epic still open
  • GitHub Release created, npm publish failed

For each partial-success state, report:

  1. what succeeded
  2. what failed
  3. whether users can already install the release
  4. the exact next repair step

Package-content validation

During npm pack --dry-run, verify at least:

  • built artifacts expected by the package are present
  • tests, fixtures, secrets, local scratch files, and unrelated source files are not accidentally included unless intentionally published
  • README/LICENSE and other required metadata files are present when expected
  • tarball name and version match package.json

If the repo uses files, .npmignore, or publishConfig, inspect them when package contents look surprising.

Release-notes guidance

Generate release notes before creating a GitHub Release or final release announcement.

Preferred source order:

  1. CHANGELOG.md entry for the target version
  2. merged PR titles/descriptions since the previous tag
  3. issue/epic summary or explicit user-supplied notes

If CHANGELOG.md exists, prefer its version-specific entry as the canonical notes source. If it does not exist or is incomplete, synthesize concise notes from merged PRs and call out that the notes were generated from Git history / PR metadata.

Suggested release-notes template:

## <package-name> v<version>

### Highlights
- <most important user-visible change>
- <second important change>
- <third important change>

### Included changes
- PR #123 — <title>
- PR #124 — <title>
- <other merged change if no PR number is available>

### Notes
- Install: `npm install <package-name>@<version>`
- Channel: `<dist-tag>`
- Migration/compatibility: <none|brief note>

Keep the notes factual and compact. Include only user-relevant changes, migration notes, and the actual install/package name when useful.

Dist-tags and release channels

Check release-channel intent before publishing.

Default guidance:

  • use latest for the default stable release users should get from npm install <package-name>
  • use next (or another explicit tag) for prereleases, canaries, beta lines, or staged rollouts
  • do not assume a prerelease semver automatically implies the correct dist-tag; verify the repo's intended channel

Before publish, check current tags:

npm dist-tag ls <package-name>

After publish, verify that:

  • the new version exists on npm
  • the intended dist-tag points to that version
  • latest was not moved unintentionally when publishing a non-stable release

If channel state looks wrong, stop and report the exact mismatch before doing follow-up steps such as GitHub Release creation or issue closure.

GitHub Release guidance

Create a GitHub Release only when the user asks for it or the repo's release flow clearly requires it.

Use the finalized release notes as the source of truth for the GitHub Release body.

Closing issues and epics

Do not assume every release should close issues automatically.

Before closing release-related issues/epics, confirm that:

  • the code is merged to the intended branch
  • the package is actually published
  • the tag exists remotely
  • any promised release artifact is complete

If closing an issue, leave a short comment stating the released package version.

Repo-specific inputs to gather when needed

Ask only if not already obvious from repo state:

  • default branch name (main, master, or another branch)
  • whether a GitHub Release is required
  • which issue/epic should be closed
  • whether release notes should come from CHANGELOG.md, merged PRs, or custom text
  • whether the publish tag/channel (latest, next, etc.) differs from default npm publish behavior

Output format

Report in this order:

  1. release-readiness verdict
  2. evidence
  3. actions taken
  4. resulting published version / tag / release links
  5. any remaining follow-up

Keep the report short and operational.

Common mistakes

  • Publishing before checking whether the version already exists on npm.
  • Assuming the default branch is main.
  • Relying on prepublishOnly alone and skipping proactive checks.
  • Forgetting to inspect npm pack --dry-run contents.
  • Claiming release completion before verifying npm actually serves the new version.
  • Treating publish, tag, GitHub Release, and epic closure as one atomic step.
  • Closing issues before the package is publicly available.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.