You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/release/SKILL.md
+67-10Lines changed: 67 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: release
3
-
description: "Plan and publish a GitHub Release in a tag-driven repository. Use when a user asks to cut, prepare, or publish a software release, propose the next vX.Y.Z tag, draft better release notes from PRs and direct commits since the last release, update CHANGELOG.md, create the tag pinned to an exact commit, and watch the publish workflow."
3
+
description: "Plan and publish a GitHub Release in a tag-driven repository. Use when a user asks to cut, prepare, or publish a stable or prerelease, propose the next vX.Y.Z or vX.Y.Z-beta.N tag, draft better release notes from PRs and direct commits since the last release, update CHANGELOG.md when appropriate, create the tag pinned to an exact commit, and watch the publish workflow."
4
4
---
5
5
6
6
# Release
@@ -16,9 +16,12 @@ Use this skill for repos that publish from GitHub Releases and want human-writte
16
16
- Fast-forward the default branch before editing: `git pull --ff-only origin <default-branch>`.
17
17
- Never force-push the default branch.
18
18
- Never use GitHub generated release notes for this workflow.
19
-
- Always create the release tag with a leading `v`, for example `v0.1.0`.
19
+
- Always create the release tag with a leading `v`, for example `v0.1.0` or `v0.2.0-beta.1`.
20
20
- Always pin the release to the exact changelog commit SHA with `gh release create --target <sha>`.
21
21
- If `origin/<default-branch>` moves after planning or before pushing, stop and regenerate the release plan.
22
+
- For prereleases, use a semver prerelease tag that names the npm dist-tag you want, for example `v0.2.0-beta.1` -> npm `beta`.
23
+
- For prereleases, create the GitHub release with `--prerelease`.
24
+
- Prefer leaving `CHANGELOG.md` untouched for prereleases unless the user explicitly wants beta entries there; that keeps later promotion to stable cleaner.
22
25
23
26
## Helper Script
24
27
@@ -28,6 +31,19 @@ Use the bundled planner to gather release facts and raw note inputs:
- counts first-parent commits on the default branch since that release
40
56
- filters leaked release-housekeeping commits such as changelog-only commits
41
-
- proposes the next tag
57
+
- proposes the next stable tag, prerelease tag, or promotion target
42
58
- groups PR-backed changes separately from direct commits on `main`
43
59
- captures contributor mentions for PR-backed items
60
+
- when planning a prerelease, increments tags like `v0.2.0-beta.1`, `v0.2.0-beta.2`, and so on
61
+
- when planning a promotion, pins the plan to the exact prerelease tag commit instead of whatever is now at `origin/<default-branch>`
44
62
45
63
## Approval Prompt
46
64
@@ -49,8 +67,9 @@ Before making any changelog edit, commit, push, tag, or release, show the user:
49
67
- the last release tag
50
68
- the raw and meaningful commit counts since that release
51
69
- the suggested new tag and why
52
-
- whether the change looks like a minor release or a small emergency patch
53
-
- the exact commit SHA currently at `origin/<default-branch>`
70
+
- whether the change looks like a stable minor, a small emergency patch, a prerelease, or a prerelease promotion
71
+
- the exact commit SHA currently targeted by the release plan
72
+
- for prereleases, the npm dist-tag that will be used instead of `latest`
54
73
55
74
If the meaningful commit count is less than `3`, explicitly warn that there are not many changes in this release and ask whether they still want to proceed.
56
75
@@ -60,7 +79,7 @@ If the meaningful commit count is less than `3`, explicitly warn that there are
60
79
- Rewrite each PR-backed item into a clearer user-facing bullet.
61
80
- For direct commits on `main` with no PR, use the commit subject and body as raw input and rewrite those too.
62
81
- Add the PR author mention on the same line for PR-backed entries.
63
-
- Keep the same substance in `CHANGELOG.md` and the GitHub release notes.
82
+
- Keep the same substance in `CHANGELOG.md` and the GitHub release notes for stable releases.
64
83
- Prefer grouped sections such as `Highlights`, `Fixes`, `Performance`, `Docs`, and `Internal` when they fit the release.
65
84
- If `CHANGELOG.md` does not exist, create it with a `# Changelog` header.
66
85
- Insert the new release section at the top, directly under the file header if there is one.
@@ -76,6 +95,9 @@ If the meaningful commit count is less than `3`, explicitly warn that there are
76
95
docs: add changelog for v0.1.0
77
96
```
78
97
98
+
- For prereleases, prefer writing only `.local/release/release-notes.md` and skipping a changelog commit unless the user explicitly wants prerelease changelog entries.
99
+
- For promotion from `vX.Y.Z-beta.N` to `vX.Y.Z`, either tag the same prerelease commit for exact code parity or add only changelog/release-note edits on top before creating the stable tag.
100
+
79
101
## Versioning Heuristic
80
102
81
103
Use the planner's suggestion unless the user overrides it.
@@ -84,6 +106,9 @@ Use the planner's suggestion unless the user overrides it.
84
106
- Use a patch bump only for a small hotfix shortly after the previous release.
85
107
- Treat `v0.9.0` -> `v0.10.0` as the normal next minor bump.
86
108
- Do not jump from `v0.9.0` to `v1.0.0` unless the user explicitly asks.
109
+
- For prereleases, keep the stable base and add a channel suffix such as `v0.2.0-beta.1`.
110
+
- The prerelease channel name becomes the npm dist-tag, so `v0.2.0-beta.1` publishes to `@beta` and does not replace `@latest`.
111
+
- Promotion removes the prerelease suffix: `v0.2.0-beta.2` -> `v0.2.0`.
87
112
88
113
The bundled planner treats a patch release as the default only when all of these are true:
@@ -152,3 +208,4 @@ gh run view "$run_id" --log-failed
152
208
- Mention direct-to-main commits that would otherwise be invisible to GitHub's PR-based notes.
153
209
- If the approval gap was long, rerun the planner immediately before editing `CHANGELOG.md`.
154
210
- If the push to the default branch is rejected, stop and regenerate notes from the new branch tip instead of rebasing blindly.
211
+
- For prerelease promotion, do not mix new product commits into the promotion step. Either tag the exact beta commit or keep follow-up changes limited to changelog/release metadata.
short_description: "Plan and publish a GitHub release with a real changelog"
4
-
default_prompt: "Use $release to prepare a GitHub Release, propose the next vX.Y.Z tag, draft better notes than GitHub's defaults, update CHANGELOG.md, and publish from the exact changelog commit."
4
+
default_prompt: "Use $release to prepare a GitHub release, whether stable or prerelease. Propose the next vX.Y.Z or vX.Y.Z-beta.N tag, draft better notes than GitHub's defaults, update CHANGELOG.md when appropriate, publish from the exact target commit, and preserve an upgrade path from beta to stable on the same code base."
0 commit comments