mr-description-creator

A command that creates or updates a merge-request or pull-request description using the GitHub CLI or GitLab CLI. These are code-review records attached to proposed changes.

In plain words
What is it for?
Use it to detect GitHub or GitLab, verify authentication and branch state, gather commit and diff details, and apply a generated description.
Why use it?
It removes repetitive manual work and ensures the description is based on the repository's actual branch history and changes.

Command

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/gantisstorm/essentials-claude-code/mr-description-creator
Clone the repo
git clone --depth 1 https://github.com/GantisStorm/essentials-claude-code
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 757 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 $0.00017 $0.00757
Opus 5 $0.00009 $0.00378
Sonnet 5 $0.00003 $0.00151
Haiku 4.5 $0.00002 $0.00076

Measured 2d ago against content hash 264f2a2f39c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mr-description-creator 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 2d 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.

essentials/commands/mr-description-creator.md · 126 lines

How it starts

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

MR/PR Description Creator

Generate MR/PR descriptions and apply directly using gh (GitHub) or glab (GitLab) CLI.

Requires: gh or glab CLI installed and authenticated.

  • /github-cli <action> — GitHub CLI wrapper
  • /gitlab-cli <action> — GitLab CLI wrapper

Arguments

  • --template "markdown" - Custom template for description
  • (none) - Uses default template

Instructions

Step 1: Detect Platform

git remote get-url origin 2>/dev/null
  • github.com or ghe. → GitHub → use gh
  • gitlab → GitLab → use glab
  • Unclear → Ask user

Step 2: Validate Environment

GitHub:

gh auth status

GitLab:

glab auth status
  • If not installed: Report install link
  • If not authenticated: Report auth command
  • If on main/master: Report error (need feature branch)

Step 3: Determine Action

# GitHub
gh pr view --json number -q '.number' 2>/dev/null

# GitLab
glab mr view --output json 2>/dev/null | jq -r '.iid'
  • MR/PR exists → update
  • No MR/PR → create

Step 4: Gather Git Context

git log main..HEAD --oneline
git diff main...HEAD --stat
git rev-list --count main..HEAD

Step 5: Launch Agent

Launch background agent with gathered context:

Generate MR/PR description:
Platform: <github or gitlab>
CLI: <gh or glab>
Action: <create or update>
Branch: <current> -> <base>
Template: <custom or "default">
Commits: <count>

REQUIRED Task tool parameters:

subagent_type: "essentials:mr-description-creator-default"
run_in_background: true
prompt: "Generate MR/PR description:\nPlatform: <platform>\nCLI: <cli>\nAction: <action>\nBranch: <branch info>\nTemplate: <template>\nCommits: <count>"

Output a status message like "Generating description..." and end your turn. The system wakes you when the agent finishes.

Step 6: Report Result

## MR/PR <CREATED/UPDATED>

**Platform**: <GitHub or GitLab>
**URL**: <url>
**Branch**: <current> -> <base>

View: <gh pr view --web OR glab mr view --web>

Read the full file on GitHub · 126 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. 2d ago First seen · 126 lines · 17 tokens per session scan A 264f2a2f39c1

Subscribe to this mod's changes

mr-description-creator is a command published in the GitHub repository GantisStorm/essentials-claude-code (91 stars, last pushed 6mo ago), licensed Unlicense. It adds 17 tokens to every session and 757 once invoked, about $0.0001 per session on Opus 5. 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-08-30.