Get the FREE Ultimate OpenClaw Setup Guide →

last-tag

npx machina-cli add skill umputun/cc-thingz/last-tag --openclaw
Files (1)
SKILL.md
2.7 KB

Last Tag - Commits Since Last Release

Show commits since the last git tag in a formatted table with optional details.

Activation Triggers

  • "last tag", "last-tag", "since last tag"
  • "what changed since last release"
  • "commits since last tag"
  • "what's new", "unreleased changes"

Workflow

Important: Avoid $() command substitution in Bash tool - use sequential steps.

  1. Fetch tags from remote and get the last tag:
git fetch origin --tags

Then get the last tag:

git describe --tags --abbrev=0

Store this value (e.g., v1.2.3) for use in subsequent commands.

  1. Get commits since that tag with format date|author|hash|subject (substitute TAG with actual value):
git log TAG..HEAD --format="%ad|%an|%h|%s" --date=short
  1. Check if all commits have the same author - extract unique authors from step 2 output. If only one unique author name appears in all rows, it's a single author.

  2. Format output:

If single author (count = 1):

Last tag: v1.2.3
Author: John Doe

| Date       | Commit  | Description                    |
|------------|---------|--------------------------------|
| 2025-12-20 | abc1234 | fix: resolve null pointer      |
| 2025-12-19 | def5678 | feat: add user authentication  |

If multiple authors (count > 1):

Last tag: v1.2.3

| Date       | Author   | Commit  | Description                    |
|------------|----------|---------|--------------------------------|
| 2025-12-20 | John Doe | abc1234 | fix: resolve null pointer      |
| 2025-12-19 | Jane Doe | def5678 | feat: add user authentication  |

If no tag exists:

No tags found in repository

If no commits since tag:

Last tag: v1.2.3
No commits since this tag

Interactive Details

After displaying the table, use AskUserQuestion:

question: "Show commit details?"
header: "Details"
options:
  - label: "All commits"
    description: "Show full details for each commit"
  - label: "None"
    description: "Skip details"
  - label: "Specific commit"
    description: "Enter commit hash to inspect"

If "All commits": For each commit, run:

git show --stat --format="Commit: %h%nAuthor: %an <%ae>%nDate: %ad%n%n%s%n%n%b" --date=short HASH

This shows: commit hash, author with email, date, subject, body, and file change stats.

If "None": End.

If "Specific commit" or user enters hash via "Other": Run the same git show command for that commit only.

Source

git clone https://github.com/umputun/cc-thingz/blob/master/plugins/release-tools/skills/last-tag/SKILL.mdView on GitHub

Overview

Shows commits since the most recent git tag in a formatted table. This makes it easy to review unreleased changes and prepare release notes. It adapts the table layout for single vs multiple authors and supports interactive details.

How This Skill Works

The tool fetches remote tags and finds the last tag with git fetch origin --tags and git describe --tags --abbrev=0. It then lists commits since that tag using git log TAG..HEAD --format='%ad|%an|%h|%s' --date=short and formats the results as a table; if there are multiple authors it adds an Author column, otherwise it keeps a simpler table. An AskUserQuestion prompt allows drilling into full commit info.

When to Use It

  • what changed since last release
  • commits since last tag
  • last-tag
  • what's new
  • unreleased changes

Quick Start

  1. Step 1: Fetch remote tags and determine the last tag using git fetch origin --tags and git describe --tags --abbrev=0.
  2. Step 2: List commits since that tag with git log TAG..HEAD --format='%ad|%an|%h|%s' --date=short.
  3. Step 3: Present results in a table and enable AskUserQuestion for details if desired.

Best Practices

  • Fetch the latest remote tags before generating the table to ensure accuracy.
  • Run in a clean workspace to avoid local history altering the tag range.
  • Check whether all commits share a single author to choose the correct table layout.
  • Verify tag existence and handle the 'no commits since tag' case with a friendly message.
  • Use the interactive AskUserQuestion to surface full commit details when needed.

Example Use Cases

  • Last tag: v1.2.3; shows commits since v1.2.3 in a two-column table (Date, Commit, Description) for release notes.
  • Unreleased changes for feature-x; multiple authors are shown in a table with Date, Author, Commit, and Description.
  • No tag exists yet in the repository → output: No tags found in repository.
  • Single-author workflow: the table prefixes with Last tag: v1.2.3 and includes Author for each entry.
  • Interactive drill-down: after the table, choose 'All commits' to run git show for each commit.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers