agentleFS
ClickHouseClickHouse/pg_stat_ch/.claude/skills/create-new-release/SKILL.md

create-new-release

Skill129 starsChanged 8 months agoApache-2.0View on GitHub

Create and push a new semver release tag. Asks for release type (patch/minor/major), validates commit exists on remote, bumps version, and pushes the tag.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create and push a new semantic version release tag.

    line 8
  2. Distinctive:

    Ask release type: Use AskUserQuestion to ask if this is a patch, minor, or major release.

    line 12
  3. Very specific:

    Read META.json and check that both version and provides.pg_stat_ch.version match the new version (without the v prefix).

    line 30
  4. Distinctive:

    If no remote branch contains HEAD, abort with an error asking the user to push their commits first.

    line 37
  5. Distinctive:

    If current commit is not on remote: "Current commit is not pushed to remote.

    line 56
  6. Distinctive:

    If tag already exists: "Tag already exists.

    line 57
  7. Distinctive:

    If git operations fail: Report the specific error.

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create New Release

Create and push a new semantic version release tag.

Steps

  1. Ask release type: Use AskUserQuestion to ask if this is a patch, minor, or major release.
  2. Fetch latest tags from remote:
    git fetch --tags origin
  3. Get the latest semver tag (assumes v prefix like v1.2.3):
    git tag --sort=-version:refname -l 'v*' | head -1
  4. Parse and bump version based on user selection:
    • patch: v1.2.3 → v1.2.4
    • minor: v1.2.3 → v1.3.0
    • major: v1.2.3 → v2.0.0
  5. Verify META.json version matches the new tag: Read META.json and check that both version and provides.pg_stat_ch.version match the new version (without the v prefix). If they don't match, abort and tell the user to update META.json first — PGXN uses this file for the release version.
  6. Validate current commit exists on remote:
    git fetch origin
    git branch -r --contains HEAD
    If no remote branch contains HEAD, abort with an error asking the user to push their commits first.
  7. Create and push the tag:
    git tag -a <new_version> -m "Release <new_version>"
    git push origin <new_version>
  8. Report success with the new tag name.

Version Parsing

Parse version from tag like v1.2.3:

  • Extract numbers after v prefix
  • Split by . to get major, minor, patch components
  • Handle edge case: if no tags exist, start at v0.1.0

Error Handling

  • If current commit is not on remote: "Current commit is not pushed to remote. Please push your changes first."
  • If tag already exists: "Tag already exists. Please check existing tags."
  • If git operations fail: Report the specific error.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.