Hoc npm publish

From openreachtech/hora-skills-ort-core · View interactive version

Hoc npm publish is an AI agent skill from the GitHub repository openreachtech/hora-skills-ort-core. How a package release orders the commits it makes about itself. Use this skill when preparing a release, bumping a package's own version, or when work lands after the bump. Reading the tarball before it goes out belongs to the publish audit convention; moving the dependency versions a release takes

How to use this skill

Skill file

npm Publish

Publishing is the one step in a package's life that cannot be undone. A version, once

published, stays fetchable: the registry does not withdraw a publish older than its grace

period, because withdrawing it would break every dependant. The install-scripts convention

draws on that permanence from the consuming side — here it applies to your own release.

So a release is guarded twice.

rather than succeed.

not the repository it was built from. That reading is /hoc-npm-publish-audit.

The version bump is the last commit of the release

The package's own version is bumped only after every change going into that release is

done, in the final commit. Two things depend on it.

is already published, the registry rejects the publish as a collision — so a half-finished

tree cannot get out by accident. Bump the version early and that protection is gone: any

publish from any intermediate state goes through.

has to be updated too, which is the occasion to run the install — once, at the end. The

dependency tree settles in that one run rather than being shaken through the work.

The bump is therefore two commits. The manifest first; then the lockfile, after the one

install.

Update the package version to x.x.x in package.json
Update package-lock.json after npm install

separates a generated artefact from hand-written source. What is specific here is **the

order and the single install between them.**

(/hoc-git-commit) gives a generated file.

means the release is imminent, so do not bump a version to keep a branch tidy.

When the bump turns out not to be last

Work sometimes lands after the bump — a defect noticed late, a branch that was still open.

**Whether to reorder is decided by one thing: has the bump already merged into the release

trunk?**

| The bump | The fix found afterwards |

| :-- | :-- |

| Still on its own branch | Reorder. Merge the fix first, rebase the bump so it closes the line |

| Already merged into the release trunk | Merge it on top. Do not rewrite |

already based on is irreversible, and the ordering is not worth that price.

the rule protects is that nothing unfinished gets published** — not the shape of the log.

A fix merged on top before the publish satisfies that completely.

What the release takes in is settled before this convention starts

This one orders the commits a release makes about itself — its own version, and the

lockfile that follows it. Everything the release carries arrived before that, and how it

arrived is not decided here.

settles what a raise compares against, how each move is written down, and where its single

install sits.

nobody has decided about — belongs to /hoc-npm-vulnerability and /hoc-npm-install-scripts

respectively.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.