Automated summary
Creates an annotated, signed git tag named after the next semver version, computed by bumping major, minor, or patch from the latest existing tag.
Strengths
- Checks the default branch and requires a clean working tree before touching anything
- Relies on git's `-v:refname` version sort, so v1.10.0 correctly ranks above v1.9.0
- Skips pre-release tags to anchor the bump on the last stable release and preserves the existing `v` prefix style
- Shows branch, latest tag, bump type, and new tag name and waits for explicit confirmation
Limitations
- The provided instructions cut off at the GPG signing-failure branch, so behavior without a signing key is unspecified
- Assumes a working GPG setup because the tag is always created with `-s`
- Does not push the tag and aborts on feature branches rather than switching branches for you
Use it when you need to cut a new release tag on the default branch with a specific semver increment.
Avoid it when you need to tag an older commit, produce a pre-release such as a release candidate, or tag from a branch other than the default one.
Security analysis
SafeThe skill only uses read-only git commands (tag, describe, for-each-ref, rev-parse, symbolic-ref, remote, status, branch, log, show-ref) plus git fetch and git tag creation. It explicitly excludes git push and never deletes or force-moves tags, aborts on existing tags, and refuses to auto-switch branches. No destructive, exfiltration, or obfuscated behavior is present.
No concerns found
How this analysis is madeExamples
/git-tag/git-tag minorCreate the next major version tag for this repo on mainname: git-tag description: Create a new semver-compliant git tag by bumping major, minor, or patch from the latest existing tag. Defaults to a patch bump and refuses to run unless on the default branch. argument-hint: "[major|minor|patch]" allowed-tools: Read, Glob, Grep, Bash(git tag *), Bash(git describe *), Bash(git for-each-ref *), Bash(git rev-parse *), Bash(git symbolic-ref *), Bash(git remote *), Bash(git fetch *), Bash(git status *), Bash(git branch *), Bash(git log *), Bash(git show-ref *)
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
-
Make sure the working tree is clean and up to date.
- Run
git status --porcelain. If it returns any output, abort and ask the user to commit or stash first. Tagging on top of a dirty tree creates a tag that does not match what gets pushed. - Run
git fetch --tags originso the latest-tag lookup sees tags created by other contributors.
- Run
-
Find the latest semver tag.
- Use
git for-each-ref --sort=-v:refname --format='%(refname:short)' 'refs/tags/v*' 'refs/tags/[0-9]*'to list tags sorted by version order.-v:refnameis git's built-in semver-aware sort, which handlesv1.10.0 > v1.9.0correctly (lexicographic sort would get this wrong). - Take the first entry that matches strict semver:
^v?(\d+)\.(\d+)\.(\d+)$. Pre-release / build-metadata tags (e.g.v1.2.3-rc.1,v1.2.3+build.4) are skipped for bump base selection — bumping from a pre-release is ambiguous, so we anchor to the last stable release. - If no semver tag exists, treat the previous version as
v0.0.0so apatchbump producesv0.0.1,minorproducesv0.1.0, andmajorproducesv1.0.0. Tell the user this is the first tag.
- Use
-
Compute the next version. Apply the standard semver bump rules — when a higher component increments, the lower components reset to zero.
major:X.Y.Z→(X+1).0.0minor:X.Y.Z→X.(Y+1).0patch:X.Y.Z→X.Y.(Z+1)- Preserve the
vprefix style of the latest tag. If the latest tag isv1.2.3, the new tag isvX.Y.Z; if it is1.2.3, the new tag isX.Y.Z. When there is no prior tag, default to thev-prefixed form because it is the more common convention.
-
Confirm with the user before creating the tag. Show: the current branch, the latest tag, the bump type, and the new tag name. Wait for confirmation. This is the last reversible point — once a tag is pushed it is hard to retract cleanly, so a single confirmation prompt here is worth the friction.
-
Create an annotated, signed tag.
- Run
git tag -s -a <new-tag> -m "Release <new-tag>".-amakes it an annotated tag (carries author + date + message, which is what release tooling expects), and-sGPG-signs it so consumers can verify provenance. - If signing fails because the user has no GPG key configured, report the error verbatim and stop. Do not silently fall back to an unsigned tag — the user explicitly opted into signed releases by using this skill, and a downgrade would be surprising.
- Run
-
Do not push automatically. Print the exact command the user can run to publish it (
git push origin <new-tag>) and let them decide. Pushing is irreversible-ish (other clones will fetch it within seconds) and should be an explicit human decision.
Important notes
git pushis intentionally not inallowed-tools. The user runs the push themselves so they get one final chance to review.- Strict semver only: reject pre-release suffixes (
-rc.1,-beta) and build metadata (+sha.abc) in the input validation. They are fine to exist as tags in the repo (we just skip past them when finding the bump base), but this skill does not produce them — keeping the surface small avoids the hairy edge cases around pre-release ordering. - The "default branch" check uses the remote's HEAD, not a hardcoded
main. Some repos still usemaster, some usedevelop, and a few use something custom. Reading fromorigin/HEADkeeps this skill portable. - Never delete or move existing tags. If the computed tag already exists (e.g. someone else tagged concurrently between
fetchandtag), abort and report it — silently re-pointing a tag would rewrite release history.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/git-tag-semver-ms1aw52o/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/git-tag-semver-ms1aw52o' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-tag-semver-ms1aw52o/download' --output '.skill-downloads/git-tag-semver-ms1aw52o/SKILL.md.part' && mv '.skill-downloads/git-tag-semver-ms1aw52o/SKILL.md.part' '.skill-downloads/git-tag-semver-ms1aw52o/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Glob, Grep, Bash(git tag *), Bash(git describe *), Bash(git for-each-ref *), Bash(git rev-parse *), Bash(git symbolic-ref *), Bash(git remote *), Bash(git fetch *), Bash(git status *), Bash(git branch *), Bash(git log *), Bash(git show-ref *)
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/git-tag-semver-ms1aw52o/SKILL.md' && test -s '.skill-downloads/git-tag-semver-ms1aw52o/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/git-tag' && cp -R '.skill-downloads/git-tag-semver-ms1aw52o' '.claude/skills/git-tag'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/git-tag-semver-ms1aw52o'openskills read 'git-tag-semver-ms1aw52o'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/git-tag-semver-ms1aw52o/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.