merge-release

merge-release is a command for Claude Code from rileyhilliard/rr. It costs 0 tokens per session (1,264 once invoked), scanned A, original, MIT.

An automated Git release procedure that creates a pull request, merges it, adds a version tag, updates the changelog, and creates a GitHub release. It supports patch, minor, and major version changes.

In plain words
What is it for?
Use it to prepare and publish a release from unpushed commits after the required checks pass.
Why use it?
It turns several release steps into one checked workflow and stops when the branch, tests, or working directory are not ready.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the rr plugin — 1 skill, 2 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rileyhilliard/rr/merge-release
Clone the repo
git clone --depth 1 https://github.com/rileyhilliard/rr

Made for: Claude Code.

Or install rr, the plugin that ships this one along with the rest of its 1 skill, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for merge-release

README.md
[![agentmods](https://agentmods.dev/badge/commands/rileyhilliard/rr/merge-release.svg)](https://agentmods.dev/commands/rileyhilliard/rr/merge-release)
Your own site
<a href="https://agentmods.dev/commands/rileyhilliard/rr/merge-release"><img src="https://agentmods.dev/badge/commands/rileyhilliard/rr/merge-release.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01264
Opus 5 $0.00000 $0.00632
Sonnet 5 $0.00000 $0.00253
Haiku 4.5 $0.00000 $0.00126

Measured 4d ago against content hash 7f660cc88bde, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

merge-release scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/merge-release.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Merge and Release

Automates the full release workflow: PR creation, merge, tagging, changelog update, and GitHub release.

Arguments

  • $ARGUMENTS: Optional version bump type (patch|minor|major). Defaults to "patch".

Pre-flight Checks

Before starting, verify:

  1. Working directory state: Check for uncommitted changes

    git status --porcelain
    
    • If changes exist and no recent commit in this conversation, STOP and ask user to commit first
    • If we just made a commit in this conversation, proceed
  2. Branch state: Determine current branch and unpushed commits

    git branch --show-current
    git log origin/main..HEAD --oneline 2>/dev/null || git log origin/$(git branch --show-current)..HEAD --oneline
    
    • If no unpushed commits, STOP and inform user there's nothing to release
  3. Get latest tags for version calculation

    git tag --sort=-v:refname | head -5
    
  4. Verify tests pass (skip if user explicitly says to skip)

    make test
    
    • If tests fail, STOP and report failures

Execution Flow

Step 1: Create and Push PR

If on main with unpushed commits:

# Create feature branch from commit message
BRANCH_NAME=$(git log -1 --format=%s | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-50)
git checkout -b "release/${BRANCH_NAME}"
git push -u origin "release/${BRANCH_NAME}"

Create PR:

# Get commit message for PR title
TITLE=$(git log -1 --format=%s)
gh pr create --title "$TITLE" --body "$(cat <<'EOF'
## Summary
Auto-generated release PR.

## Changes
See commit history for details.
EOF
)"

Step 2: Merge PR

# Get PR number from current branch
PR_NUMBER=$(gh pr view --json number -q .number)
gh pr merge $PR_NUMBER --squash --delete-branch

If merge fails, try rebase:

gh pr merge $PR_NUMBER --rebase --delete-branch

Step 3: Sync Local Main

git checkout main
git fetch origin
git reset --hard origin/main

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 194 lines · 0 tokens per session scan A 7f660cc88bde

Subscribe to this mod's changes

merge-release is a command published in the GitHub repository rileyhilliard/rr (195 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,264 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.