|
| 1 | +--- |
| 2 | +name: pre-release |
| 3 | +description: Prepare this repository for a release. Use when asked to do pre-release checks, summarize changes since a previous tag, update WHATSNEW.md or changelog entries, update CONTRIBUTORS.md, audit command long help or docs for release-visible features, or verify release documentation consistency. |
| 4 | +--- |
| 5 | + |
| 6 | +# Pre-release |
| 7 | + |
| 8 | +Use this skill for repository-local release-prep documentation passes. Ground |
| 9 | +every update in commit history, diffs, and current command behavior. |
| 10 | + |
| 11 | +## Workflow |
| 12 | + |
| 13 | +1. Determine the release range. |
| 14 | + - Use the base tag or version supplied by the user. |
| 15 | + - If no base is supplied, inspect tags with |
| 16 | + `git tag --list 'v*' --sort=-version:refname` and infer the previous |
| 17 | + release tag. |
| 18 | + - Inspect changes with `git log --oneline <base>..HEAD`, |
| 19 | + `git diff --stat <base>..HEAD`, and |
| 20 | + `git diff --name-only <base>..HEAD`. |
| 21 | + |
| 22 | +2. Update release notes when requested. |
| 23 | + - Check whether the changelog file is a symlink before editing it. |
| 24 | + - Preserve the existing changelog style and section order. |
| 25 | + - Add the new version section above the previous release. |
| 26 | + - Focus on user-visible features, behavior changes, bug fixes, migration |
| 27 | + notes, and documented workflows. |
| 28 | + - Mention commands, flags, formats, and caveats exactly as implemented. |
| 29 | + - Avoid internal-only refactors unless they materially affect users, |
| 30 | + maintainers, packaging, or contributors. |
| 31 | + |
| 32 | +3. Update contributors when requested or as part of a full release prep. |
| 33 | + - Compare `git shortlog -sne <base>..HEAD` and |
| 34 | + `git log --format='%aN <%aE>' <base>..HEAD` against `CONTRIBUTORS.md`. |
| 35 | + - Inspect individual commits and merge commits for contribution scope. |
| 36 | + - Infer GitHub handles only from reliable local evidence such as PR branch |
| 37 | + names in merge commits or existing repository metadata. |
| 38 | + - Add concise entries for new contributors and update the displayed total. |
| 39 | + - Do not duplicate existing contributors; extend an existing entry when |
| 40 | + that is clearer. |
| 41 | + |
| 42 | +4. Audit command help and docs for release-visible changes. |
| 43 | + - Search embedded help assets, command definitions, and docs for each |
| 44 | + release-note topic. |
| 45 | + - Update only the help/docs that a user would naturally consult for the |
| 46 | + changed command, flag, format, or workflow. |
| 47 | + - For Go files with inline long help, avoid Markdown backticks inside raw |
| 48 | + string literals unless the literal delimiter allows them. |
| 49 | + - Keep documentation concise and practical: what changed, how to use it, |
| 50 | + and any important tradeoff. |
| 51 | + |
| 52 | +5. Validate. |
| 53 | + - Run `gofmt` on edited Go files. |
| 54 | + - Run targeted tests for touched Go packages when Go files changed. |
| 55 | + - For Markdown-only changes, no full test run is required; say that |
| 56 | + explicitly. |
| 57 | + - Review `git diff --stat`, relevant `git diff`, and `git status --short`. |
| 58 | + - Preserve the user's staged and unstaged state; do not stage files unless |
| 59 | + asked. |
| 60 | + |
| 61 | +## Search Hints |
| 62 | + |
| 63 | +- Changelog: `WHATSNEW.md`, `cmd/**/assets/*changelog*`. |
| 64 | +- Contributors: `CONTRIBUTORS.md`, `git shortlog`, merge commit messages. |
| 65 | +- Embedded command help: `cmd/**/assets/*.md` and `Long:` fields in Go files. |
| 66 | +- User docs: `doc/`, `README.md`, command-specific usage files. |
| 67 | + |
| 68 | +## Final Response |
| 69 | + |
| 70 | +Report: |
| 71 | + |
| 72 | +- The release range inspected. |
| 73 | +- Files changed. |
| 74 | +- Validation commands run and results. |
| 75 | +- Any notable staged vs unstaged state. |
0 commit comments