release-script-conventions
Skill7 starsChanged 2 days agoMITView on GitHub
Release flow: a `scripts/release.sh` that bumps and tags; CI publishes from the tag. TRIGGER when: creating or editing a release/bump script; wiring release automation; bumping the project's own `version`/`appVersion`; a workflow triggered by a `v*`/`chart-*` tag; user asks how to cut, tag or publish a release. SKIP when: reading a version, or bumping a dependency's.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- leroyguillaume/skillsword for word, first seen Nov 22, 2026
Other versions1 project uses a version of this.
Word for word · 1
- leroyguillaume/skills★ 7100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository54 other files it gives its agents.
- adr-conventionsSkill
- api-conventionsSkill
- architecture-conventionsSkill
- argocd-conventionsSkill
- ci-conventionsSkill
- config-conventionsSkill
- contributing-conventionsSkill
- councilSkill
- cryptography-conventionsSkill
- dependency-update-conventionsSkill
- diagram-conventionsSkill
- docker-conventionsSkill
- documentation-conventionsSkill
- frontend-conventionsSkill
- github-actions-conventionsSkill
- github-issue-conventionsSkill
- github-pr-conventionsSkill
- github-repo-settingsSkill
- gitlab-ci-conventionsSkill
- helm-conventionsSkill
- herdr-core-delegationSkill
- herdr-delegationSkill
- herdr-tui-delegationSkill
- kopf-conventionsSkill
- kubernetes-operator-conventionsSkill
- logging-conventionsSkill
- logo-conventionsSkill
- mise-conventionsSkill
- ollama-conventionsSkill
- openssf-conventionsSkill
- pr-conventionsSkill
- pre-commit-conventionsSkill
- project-metadata-conventionsSkill
- python-async-conventionsSkill
- python-conventionsSkill
- readme-conventionsSkill
- release-supply-chain-conventionsSkill
- renovate-ci-conventionsSkill
- rest-conventionsSkill
- rust-build-conventionsSkill
- rust-conventionsSkill
- rust-http-conventionsSkill
- security-policy-conventionsSkill
- signal-handling-conventionsSkill
- sql-conventionsSkill
- starlight-conventionsSkill
- systemd-conventionsSkill
- system-user-conventionsSkill
- task-conventionsSkill
- terraform-conventionsSkill
- topic-splittingSkill
- ui-copy-conventionsSkill
- web-layout-conventionsSkill
- yaml-conventionsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 42
When the repo has a Taskfile.yml (task-conventions), a release task calls the script and adds nothing to it.
- Distinctive: line 75
Use the ecosystem's own tool.
- Distinctive: line 101
Run the generator with the *same* invocation the pre-commit hook uses, so the output is byte-identical and the hook stays green.
- Very specific: line 125
Check all of these before touching anything, and exit 1 with a message naming the fix:
- Distinctive: line 139
When a repo publishes more than one artefact — an application and its Helm chart is the common case — each versions independently:
- Distinctive: line 192
Never bump the project's own version outside this script — not in a normal commit, not "just this once".
- Distinctive: line 197
Never run the script as an agent, even when asked for a release: writing it is not permission to run it, and it commits on the default …
- Distinctive: line 200
Never tag, push or publish a release yourself: that is the user's step, through the script.
- Distinctive: line 202
Never hand-edit a lockfile to match a bumped manifest.
- Distinctive: line 203
Never continue past a dirty tree, a stale branch, or an existing tag.
- Distinctive: line 204
Never cut a release by editing a version field and tagging separately — that is precisely the drift the CI guard rejects.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Release script conventions
Every project that publishes an artefact ships scripts/release.sh
Cutting a release by hand is three separate steps — edit the version, regenerate whatever derives from it, tag with a name that matches — on the one operation that is awkward to undo once it has reached a registry. Three chances to get it wrong, and the failure mode is a published artefact whose metadata lies about what it is.
One script does all of it, in order, or none of it:
- bump the version stored in the repository
- regenerate every file derived from that version
- commit
- tag
- ask before pushing
The script is the only supported way to cut a release. Say so in
CONTRIBUTING.md, and make CI enforce it (see the drift guard below).
The user runs it, never an agent. It commits and tags on the default branch, where an agent never commits, and its push is the publish. An agent writes and maintains the script, and delivers the changes a release will carry as pull requests; when asked for a release, it gives the user the command to run.
task release is the front door
When the repo has a Taskfile.yml (task-conventions), a release task
calls the script and adds nothing to it; CONTRIBUTING.md and the command
handed to the user say task release -- <version>.
release:
desc: Bump, commit and tag a release, then ask before pushing
interactive: true
cmds:
- scripts/release.sh {{.CLI_ARGS}}The logic stays in the script. Never a Task prompt: in its place: task
--yes answers every prompt, which is the escape hatch the question below
must not have. interactive: true hands the terminal to the script, so its
own question still reads from a TTY.
The version lives in two places, and one tool writes both
- The tag is what CI publishes from.
vX.Y.Z→ the image tag, the crate version, the GitHub release. Derive it at build time; never read it out of a file. - The repository still carries the same number, because a manifest whose
version is permanently
0.0.0lies to every tool that reads it — package managers, SBOM generators, dependency scanners, the user running--version.
These two are only safe because a single command writes both in one commit. That is the whole justification for the script existing; without it, two sources of truth is exactly the anti-pattern it looks like.
Where the version lives, per ecosystem
Use the ecosystem's own tool. It updates the lockfile as well, which hand-editing does not.
| Ecosystem | Files | How to write it |
| npm | package.json, package-lock.json | npm version <v> --no-git-tag-version |
| Rust | Cargo.toml, Cargo.lock | cargo set-version <v> (cargo-edit) |
| Python | pyproject.toml, uv.lock | uv version <v> |
| Helm | Chart.yaml (version, appVersion) | sed on the anchored top-level keys (^version:), then re-run helm-docs |
Never hand-edit a lockfile to match a bumped manifest, and never write a
version with an unanchored sed — version: appears inside dependency blocks
too.
Regenerate what derives from the version
Anything generated from the version must be regenerated in the same commit, or the release commit fails its own pre-commit gate:
helm-docschart READMEs — the badges embedversionandappVersion- the
helm install … --version X.Y.Zcommand in the rootREADME.md, on a stable chart release only, since an rc must not become what the README tells people to install - lockfiles — handled by the ecosystem tool above
- any
--helpdump or generated doc that prints the version
Run the generator with the same invocation the pre-commit hook uses, so the output is byte-identical and the hook stays green.
Never push on its own — ask
Pushing the tag is what publishes. That is outward-facing and effectively irreversible once a registry has served it, so it is never automatic:
printf 'push %s and %s to origin? this publishes the release. [y/N] ' "$branch" "$tag"
read -r reply- Default to No. A bare Enter declines.
- No terminal, no push. Guard with
[ -t 0 ]and decline when stdin is not a TTY — a pipe or a CI job must not publish, andreadmust not hang. - Declining is not a failure. Print the exact push command so the user can run it later; the commit and tag stay on their machine.
- No
--push/--yesescape hatch. A flag that skips the question is the question not being asked. Automation that genuinely should publish pushes the tag itself rather than driving this script.
Refuse rather than guess
Check all of these before touching anything, and exit 1 with a message naming
the fix:
- the version argument is semver, and given explicitly — never infer a bump from commit messages or auto-increment a component
- the working tree is clean
- the branch is the default branch
- the branch is not behind origin (
git fetchfirst, thengit rev-list --count HEAD..origin/<branch>) - the tag does not already exist
- for a chart, the
appVersionbeing pinned refers to a real released tag
Separate lifecycles get separate tag namespaces
When a repo publishes more than one artefact — an application and its Helm chart is the common case — each versions independently:
vX.Y.Z→ the applicationchart-X.Y.Z→ the chart, selected with a--chartflag
For a chart, default appVersion to the most recent v* tag so a chart release
targets the newest application release, and expose --app-version to pin a
different one. version comes from the chart's own tag; the two never share a
number.
CI must guard the drift
Two sources of truth are only safe if disagreement is loud. Every tag-triggered publish workflow re-derives the version from the tag and refuses to run when the committed file disagrees:
- name: derive the version from the tag
id: version
run: |
version="${GITHUB_REF_NAME#v}"
committed="$(jq -r .version package.json)"
if [ "$committed" != "$version" ]; then
echo "package.json says ${committed} but the tag says ${version}." >&2
echo "Cut releases with scripts/release.sh so the two stay in step." >&2
exit 1
fi
echo "version=${version}" >> "$GITHUB_OUTPUT"This is what makes hand-tagging fail fast instead of publishing a mislabelled
artefact. For every chart tag, rc included, the guard checks version in
Chart.yaml; for a stable one, also the --version in the README's
helm install command.
--dry-run
Report the current and target values, the commit subject and the tag, then stop. Change nothing, and never prompt — there is nothing to push.
Shape and quality
#!/usr/bin/env bash,set -euo pipefail, andshellcheckclean — wire the script into theshellcheckpre-commit hook like any other (seepre-commit-conventions).- A
usage()heredoc behind-h/--help, with worked examples. cd "$(git rev-parse --show-toplevel)"so it works from any subdirectory.- Annotated tags (
git tag --annotate), so the tag carries an author and date. - Errors to stderr through a
die()helper; neverexit 0on a failed check.
Never:
- Never bump the project's own version outside this script — not in a normal commit, not "just this once". In a repo that publishes without one, a bump the user asks for is made by hand, and the script proposed as its own change. A chart or package the project consumes is a dependency bump, not this.
- Never run the script as an agent, even when asked for a release: writing it is not permission to run it, and it commits on the default branch. Hand the user the command instead.
- Never tag, push or publish a release yourself: that is the user's step, through the script.
- Never hand-edit a lockfile to match a bumped manifest.
- Never continue past a dirty tree, a stale branch, or an existing tag.
- Never cut a release by editing a version field and tagging separately — that is precisely the drift the CI guard rejects.
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
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.

