npm-publish
Skill61 starsChanged 8 months agoMITView on GitHub
Prepare an npm package for publishing. Handles version bump, CHANGELOG update, typings check, test run, README refresh, package.json audit, and npm pack verification. Use when the user asks to prepare a release, bump version, publish a package, or do release prep.
- Installs packages
- Commits and pushes
6 other projects use a version of this.
Adopted by
Most recently taken up by
- The-Syntax-Slayer/skill-genietheir own version, first seen Oct 9, 2026
- htekdev/vidpipetheir own version, first seen Oct 8, 2026
- Kanevry/session-orchestratortheir own version, first seen Oct 2, 2026
- kvdm-co-pilot/create-cmptheir own version, first seen Sep 30, 2026
- Fei2-Labs/skill-genietheir own version, first seen Sep 24, 2026
- jasoncrawford/claude-skillstheir own version, first seen Apr 25, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- htekdev/vidpipe★ 229same name
- Kanevry/session-orchestrator★ 53same name
- Fei2-Labs/skill-genie★ 12same name
- jasoncrawford/claude-skills★ 1same name
- The-Syntax-Slayer/skill-genie★ 1same name
- kvdm-co-pilot/create-cmp★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- data-structuresSkill
- error-handlingSkill
- js-conventionsSkill
- js-data-structuresSkill
- js-gofSkill
- metautil-data-structuresSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 14 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Ask the user (with the agent's question tool if it has one, otherwise in chat):
- Very specific: line 17
Confirm changelog entries: ask if the [Unreleased] section in CHANGELOG is complete, or if the user wants to draft entries from recent …
- Distinctive: line 19
If the user already specified intent (e.g.
- Very specific: line 32
If npm test fails, stop and fix issues before continuing.
- Very specific: line 46
Update "version" in package.json by editing the file directly (not npm version: the changelog is managed manually).
- Very specific: line 61
Read the full CHANGELOG.md.
- Distinctive: line 78
Create the new version section with today's date (ISO 8601):
- Distinctive: line 98
Keep all existing links intact below.
- Very specific: line 102
If .d.ts files exist:
- Very specific: line 104
Run npx tsc (or the project's types script) — must pass with no errors
- Very specific: line 105
Verify the .d.ts public API surface matches the actual exports:
- Very specific: line 106
Read the main JS entry point's module.exports or export statements
- Very specific: line 107
Read the .d.ts file
- Very specific: line 110
If the release includes API changes, update the .d.ts accordingly
- Distinctive: line 118
Usage examples: do they match the current API?
- Distinctive: line 119
Badges: do version badge URLs point to the correct package name?
- Distinctive: line 120
Configuration tables: do option names, types, and defaults match the source code?
- Distinctive: line 121
API reference: if the README has an API section, verify it against actual exports
- Distinctive: line 123
Only edit if something is factually wrong or outdated.
- Distinctive: line 129
Check these fields are correct:
- Distinctive: line 148
Test files, configs, CI files are excluded
- Distinctive: line 149
No unexpected large files
- Distinctive: line 155
Run the full test suite one more time after all edits:
- Distinctive: line 161
Must exit 0. If it fails, fix and re-run.
- Very specific: line 183
Do NOT run npm publish or git push automatically — always let the user do it or explicitly confirm.
- Very specific: line 187
After all steps run to refresh package-lock.json:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
npm Publish Preparation
Systematic workflow for preparing an npm package for a new release. Every step must pass before proceeding to the next.
Step 0: Gather Release Intent
Ask the user (with the agent's question tool if it has one, otherwise in chat):
- Version bump type: patch / minor / major / explicit version / prerelease tag
- Prerelease label (if any): e.g.
alpha,beta,rc,prerelease - Confirm changelog entries: ask if the
[Unreleased]section in CHANGELOG is complete, or if the user wants to draft entries from recent commits
If the user already specified intent (e.g. "prepare 4.1.0 release"), skip the question and proceed.
Step 1: Pre-flight Checks
Run:
npm i # install deps
npm test # must exit 0 (lint + types + tests)Then in parallel: npm outdated and npm audit (report to user).
If npm test fails, stop and fix issues before continuing.
Step 2: Version Bump
Read current version from package.json
Compute the new version based on user intent and semver rules:
- patch:
1.2.3->1.2.4 - minor:
1.2.3->1.3.0 - major:
1.2.3->2.0.0 - prerelease:
1.2.3->1.2.4-<label>.0, or1.2.4-beta.0->1.2.4-beta.1 - Removing prerelease tag:
4.0.3-prerelease->4.0.3(just strip the suffix)
Update "version" in package.json by editing the file directly (not npm version: the changelog is managed manually).
Step 3: Update CHANGELOG.md
The changelog uses:
- Sections:
## [Unreleased]at top;## [Version] - YYYY-MM-DDfor releases (date in ISO 8601) - Order: newest first; every version gets an entry
- Types of changes:
Added,Changed,Deprecated,Removed,Fixed,Security. Group same-type changes under each - Entries: bullet lists; past tense; capitalise first letter; human-readable, curated (no raw git diffs)
- Links: footnote-style link block at bottom:
[unreleased]: ...,[version]: ...(GitHub compare URLs) - Principles: changelog is for humans; omit empty sections; call out breaking changes and deprecations clearly
3a: Detect changelog structure
Read the full CHANGELOG.md. Identify:
- The
[Unreleased]section - The previous version heading (to derive the comparison base)
- The links block at the bottom of the file
- The GitHub repo URL from the existing links
3b: Create the new version entry
Always draft entries from git log since the last tag (fallback to HEAD~20 if no tags):
git log $(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~20")..HEAD --onelineConvert commits into changelog bullets: group by type (Added, Changed, Fixed, Removed, Deprecated, Security), past tense, capitalise. Merge with any existing [Unreleased] content if the user added manual entries.
Create the new version section with today's date (ISO 8601):
## [Unreleased][unreleased]
## [NEW_VERSION][] - YYYY-MM-DD
- Entry description
- Another entry3c: Update comparison links
At the bottom of CHANGELOG.md, update the [unreleased] link and add the new version link:
[unreleased]: https://github.com/OWNER/REPO/compare/vNEW_VERSION...HEAD
[NEW_VERSION]: https://github.com/OWNER/REPO/compare/vPREVIOUS_VERSION...vNEW_VERSIONKeep all existing links intact below.
Step 4: TypeScript Declarations
If .d.ts files exist:
- Run
npx tsc(or the project'stypesscript) — must pass with no errors - Verify the
.d.tspublic API surface matches the actual exports:- Read the main JS entry point's
module.exportsorexportstatements - Read the
.d.tsfile - Confirm every exported class, function, type, and method is declared
- Confirm no private/internal fields leak into the declarations
- Read the main JS entry point's
- If the release includes API changes, update the
.d.tsaccordingly
Step 5: README & License Review
Update year in LICENSE and README.md (copyright line) to the current year if changed.
Scan README.md for staleness:
- Usage examples: do they match the current API? Especially constructor options, method signatures
- Badges: do version badge URLs point to the correct package name?
- Configuration tables: do option names, types, and defaults match the source code?
- API reference: if the README has an API section, verify it against actual exports
Only edit if something is factually wrong or outdated. Don't rewrite style or add unsolicited content.
Step 6: Package Audit
6a: Verify package.json fields
Check these fields are correct:
"main"/"module"/"exports"— points to existing files"types"— points to the.d.tsfile"files"— includes all necessary files, excludes test/config files; cross-check with.npmignoreif present"engines"— matches the CI matrix (.github/workflows/)"keywords"— no typos, relevant terms"license","repository","homepage"— valid
6b: Dry-run pack
npm pack --dry-runReview the file list:
- Source files are included
- Type definitions are included
- Test files, configs, CI files are excluded
- No unexpected large files
Report the packed size to the user.
Step 7: Final Verification
Run the full test suite one more time after all edits:
npm testMust exit 0. If it fails, fix and re-run.
Step 8: Summary & Next Steps
Present a summary to the user:
Release preparation complete:
Package: <name>
Version: <old> -> <new>
Tests: ✓ passing
Types: ✓ valid
Packed: <N> files, <size>Then list remaining manual steps:
git add -A && git commit -m "Release vX.Y.Z"(or ask the user if they want you to commit)git tag vX.Y.Zgit push && git push --tagsnpm publish(ornpm publish --tag <label>for prereleases)
Do NOT run npm publish or git push automatically — always let the user do it or explicitly confirm.
Step 9: Reinstall Dependencies
After all steps run to refresh package-lock.json:
npm iDoes 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
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.

