agentleFS
gofixpointgofixpoint/amika/.agents/skills/create-cli-release-commit/SKILL.md

create-cli-release-commit

Skill301 starsChanged 11 days agoApache-2.0View on GitHub

Create a release commit for a CLI version bump. Reads the version change in install.sh (DEFAULT_VERSION for amika or DEFAULT_AMIKALOG_VERSION for amikalog), generates a changelog from the git log between the old and new <symbol>@v* tags, and creates a commit.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a release commit based on a version change in install.sh.

    line 8
  2. Distinctive:

    Run git diff install.sh (include both staged and unstaged changes).

    line 14
  3. Very specific:

    If neither DEFAULT_VERSION nor DEFAULT_AMIKALOG_VERSION changed in the diff, error out: "No version change found in install.sh".

    line 25
  4. Very specific:

    If both changed, error out: "Both DEFAULT_VERSION and DEFAULT_AMIKALOG_VERSION changed.

    line 26
  5. Very specific:

    Verify both tags exist locally using git rev-parse --verify <tag>.

    line 32
  6. Very specific:

    Run git log --oneline ${SYMBOL}@v${OLD_VERSION}..${SYMBOL}@v${NEW_VERSION} to get the commit log between the two tags.

    line 36
  7. Very specific:

    Prefer the PR-style commit messages (the ones ending with (#NNN)) as they are the squash-merged versions.

    line 40
  8. Distinctive:

    Only after the user approves the commit message:

    line 59
  9. Very specific:

    Create the commit with the approved message, adding structured release trailers via --trailer:

    line 62
  10. Very specific:

    Do NOT include a Co-Authored-By line in the commit message.

    line 75
  11. Very specific:

    If a pull request is opened for this release (now or later), its title must start with the same [release ${SYMBOL}] prefix, e.g.

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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 CLI Release Commit

Create a release commit based on a version change in install.sh. This skill detects which component is being released, extracts the old and new versions, generates a changelog from git history between the corresponding tags, and creates a well-formatted commit.

Procedure

Step 1: Detect the component and extract old and new versions

  1. Run git diff install.sh (include both staged and unstaged changes).
  2. Determine which version variable changed and set SYMBOL and VAR accordingly:
    • A change to DEFAULT_VERSION → SYMBOL=amika, VAR=DEFAULT_VERSION.
    • A change to DEFAULT_AMIKALOG_VERSION → SYMBOL=amikalog, VAR=DEFAULT_AMIKALOG_VERSION.
    • Match VAR exactly (DEFAULT_VERSION must not match DEFAULT_AMIKALOG_VERSION).
  3. Parse the diff to find the old and new values for VAR. Look for lines like:
    -DEFAULT_VERSION="0.5.3"
    +DEFAULT_VERSION="0.6.0"
  4. Error handling:
    • If neither DEFAULT_VERSION nor DEFAULT_AMIKALOG_VERSION changed in the diff, error out: "No version change found in install.sh".
    • If both changed, error out: "Both DEFAULT_VERSION and DEFAULT_AMIKALOG_VERSION changed; release one component at a time".
  5. Record OLD_VERSION (the removed value) and NEW_VERSION (the added value).

Step 2: Validate tags

  1. Construct the tag names: ${SYMBOL}@v${OLD_VERSION} and ${SYMBOL}@v${NEW_VERSION}.
  2. Verify both tags exist locally using git rev-parse --verify <tag>. If a tag is missing, error out and tell the user which tag is missing.

Step 3: Generate changelog

  1. Run git log --oneline ${SYMBOL}@v${OLD_VERSION}..${SYMBOL}@v${NEW_VERSION} to get the commit log between the two tags.
  2. Filter out merge commits and release-tooling commits (e.g., commits that only bump version numbers). Keep substantive changes.
  3. Group the commits into categories if natural groupings emerge, but do not force categorization for a small number of commits. Use your judgment.
  4. Format each entry as a markdown list item: - <concise description> (<short SHA>)
    • Prefer the PR-style commit messages (the ones ending with (#NNN)) as they are the squash-merged versions. If both a squash-merge commit and its constituent commits appear in the log, prefer the squash-merge commit and omit the constituents.

Step 4: Review commit message

  1. Draft the commit message using this format (the subject line starts with [release ${SYMBOL}]):
[release ${SYMBOL}] Bump install.sh ${VAR} to ${NEW_VERSION}

Release ${SYMBOL}@v${NEW_VERSION}.

Changes since ${SYMBOL}@v${OLD_VERSION}:
<changelog entries from step 3>
  1. Present the full draft commit message to the user using AskUserQuestion and ask them to review it. The user may request edits — apply any changes they ask for and re-present if needed.

Step 5: Create commit

Only after the user approves the commit message:

  1. Stage install.sh: git add install.sh
  2. Create the commit with the approved message, adding structured release trailers via --trailer:

    git commit \
      -m "[release ${SYMBOL}] Bump install.sh ${VAR} to ${NEW_VERSION}" \
      -m "Release ${SYMBOL}@v${NEW_VERSION}.
    
    Changes since ${SYMBOL}@v${OLD_VERSION}:
    <changelog entries from step 3>" \
      --trailer "Release-Component: ${SYMBOL}" \
      --trailer "Release-Version: v${NEW_VERSION}"

Do NOT include a Co-Authored-By line in the commit message.

Step 6: Confirm

Display the created commit (hash + full message) so the user can verify.

Step 7: Pull request

If a pull request is opened for this release (now or later), its title must start with the same [release ${SYMBOL}] prefix, e.g. [release ${SYMBOL}] Release ${SYMBOL}@v${NEW_VERSION}. Reuse the changelog from step 3 as the PR body.

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.