Skip to content

Commit b783a2a

Browse files
committed
chore: improve release skill
1 parent 7a60cbe commit b783a2a

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.claude/skills/release/SKILL.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
name: release
3-
description: Draft a new release by updating CHANGELOG.md and bumping the version in package.json
3+
description: Draft a new release by bumping the version and updating the changelog. Use when changes are committed and ready to ship.
44
disable-model-invocation: true
5+
allowed-tools: Bash(git *), Bash(jq *), Read, Edit, Write, AskUserQuestion
56
---
67

78
# Release
@@ -17,14 +18,13 @@ Draft a new release by updating CHANGELOG.md and bumping the version in package.
1718

1819
### 1. Pre-flight checks
1920

20-
Run these checks before proceeding:
21-
2221
- **Branch check:** Verify the current branch is `main`. If not, stop and tell the user.
2322
- **Clean work tree:** Run `git status` to check for uncommitted changes. If the work tree is dirty, ask the user to confirm they want to ignore the changes before continuing.
23+
- **Pull latest:** Run `git pull` to ensure the local branch is up to date with the remote.
2424

2525
### 2. Determine the current and next version
2626

27-
- Read the current version from `package.json`.
27+
- Read the current version from `package.json` using `jq -r .version package.json`.
2828
- List all git tags matching `v*` sorted by version descending. The latest tag is the current release.
2929
- Gather all commits from the latest tag to HEAD using `git log <latest-tag>..HEAD`. Use the full log (not `--oneline`) so commit bodies are available for writing better descriptions.
3030
- If there are no new commits since the last tag, stop and tell the user there is nothing to release.
@@ -36,24 +36,25 @@ This project is pre-v1. Apply these rules based on the actual nature of the chan
3636
- **Minor bump** (0.x.0): if any commit introduces new functionality or contains `BREAKING CHANGE`
3737
- **Patch bump** (0.x.y): for everything else (bug fixes, docs, CI, refactors, etc.)
3838

39-
Parse the current version from package.json, apply the bump, and determine the new version string.
40-
4139
### 4. Update CHANGELOG.md
4240

43-
If CHANGELOG.md does not exist, create it. If it does, read it first, then prepend the new release section.
41+
Read CHANGELOG.md first, then prepend the new release section. If it does not exist, create it.
4442

4543
The format for each release section:
4644

4745
```markdown
4846
## vX.Y.Z
4947

5048
### Features
49+
5150
- description (commit-hash)
5251

5352
### Bug Fixes
53+
5454
- description (commit-hash)
5555

5656
### Improvements
57+
5758
- description (commit-hash)
5859
```
5960

@@ -63,7 +64,7 @@ Group commits into these categories. Use the conventional commit prefix as a sta
6364
- Bug Fixes — actual bug fixes
6465
- Improvements — everything else (docs, CI, refactors, chores, etc.)
6566

66-
Omit any category section that has no entries. Exclude version bump commits (e.g. `chore: bump version to vX.Y.Z`). Use the short commit hash (7 chars) in parentheses. Strip the conventional commit prefix from the description — just use the human-readable part. Rephrase descriptions where necessary to be more understandable, capitalised, and properly formatted (e.g. use backticks for command names, file names, and config values).
67+
Omit any category section that has no entries. Exclude version bump and release commits (e.g. `chore: bump version to vX.Y.Z`, `chore: release vX.Y.Z`). Use the short commit hash (7 chars) in parentheses. Strip the conventional commit prefix from the description — just use the human-readable part. Rephrase descriptions where necessary to be more understandable, capitalised, and properly formatted (e.g. use backticks for command names, file names, and config values).
6768

6869
The file should have a top-level `# Changelog` heading, followed by release sections in reverse chronological order (newest first).
6970

@@ -75,5 +76,5 @@ Update the `"version"` field in package.json to the new version string (without
7576

7677
- Stage CHANGELOG.md and package.json with `git add`.
7778
- Show the user the staged diff with `git diff --cached`.
78-
- Tell the user the version bump (e.g. `0.2.2 → 0.3.0`) and ask for confirmation before committing.
79+
- Use the `AskUserQuestion` tool to confirm the release, showing the version bump (e.g. `0.2.2 → 0.3.0`).
7980
- Once confirmed, commit with message `chore: release vX.Y.Z` and push to `main`.

0 commit comments

Comments
 (0)