git-tag
git-tag
Create a new git tag whose name is the next semver version after the latest existing tag.
When to use
- When the user asks to create a release tag, version tag, or git tag
- When the user wants to bump the major / minor / patch version
- When the user runs
/git-tag
Argument
The argument selects which component to increment. Only major, minor, or patch are accepted. If the argument is omitted, default to patch. Anything else must be rejected with a clear error message — never silently fall back.
Instructions
- Verify the working tree is on the default branch. This is a hard requirement: tags published from feature branches confuse downstream consumers, so abort early if it is not satisfied.
- Determine the default branch with
git symbolic-ref refs/remotes/origin/HEAD(typically resolves toorigin/mainororigin/master). Iforigin/HEADis not set, fall back togit remote show originand parse theHEAD branchline. - Compare against
git rev-parse --abbrev-ref HEAD. If they differ, stop and tell the user which branch they are on and which one they need to switch to. Do not switch branches automatically — the user may have uncommitted work.
- Determine the default branch with
More from guni1192/agent-skills
create-pr
Create a pull request by branching from the default branch, committing changes with a signed commit, and pushing.
8pasta
Perform PASTA (Process for Attack Simulation and Threat Analysis) threat modeling by guiding through 7 stages interactively.
7docker-init
Initialize Dockerfile and .dockerignore for the current project by detecting language, framework, and package manager.
7designdoc
Write a design document following Google's design doc practices. Guides through structured sections interactively to produce a comprehensive design doc.
5