| name | release-tag |
| description | Create a git tag from the version in package.json. This skill should be used when the user wants to tag a release, create a version tag, or tag the current commit for release. |
Release Tag
Create an annotated git tag based on the version in package.json.
Arguments: <message> (optional — annotation message for the tag)
Instructions
Phase 1: Read Version
- Read
package.json and extract the version field.
- Construct the tag name as
v{version} (e.g., v0.3.0).
Phase 2: Validate
-
Check if the tag already exists:
git tag --list 'v{version}'
If it exists, inform the user and halt. Suggest bumping the version first.
-
Check for uncommitted changes:
git status --porcelain
If there are uncommitted changes, warn the user and ask whether to proceed.
-
Show the user what will be tagged:
git log -1 --oneline
Phase 3: Confirm
Present the tag details and ask the user to confirm:
- Tag:
v{version}
- Commit:
{short hash} {message}
- Message: The annotation message (argument or auto-generated)
If no <message> argument was provided, use:
Release v{version}
Phase 4: Create Tag
Create an annotated tag:
git tag -a v{version} -m "{message}"
Phase 5: Push (Optional)
Ask the user if they want to push the tag:
git push origin v{version}
Only push if the user confirms. Display the result.