Skip to content
Automation
Command

/mr-description-creator

Generate and apply MR/PR description directly via gh or glab CLI (project)

From plugin
essentials-claude-code
9125 skills8 agents25 commands
Install
$ npx -y skills add GantisStorm/essentials-claude-code --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/mr-description-creator

Context preview

What this command does when you run it.

Generate and apply MR/PR description directly via gh or glab CLI (project)

Command definition

mr-description-creator.md
allowed-tools: Task, Bash, Read, Glob, Grep, AskUserQuestion
argument-hint: "[--template 'markdown']"
description: Generate and apply MR/PR description directly via gh or glab CLI (project)
skills: ["github-cli", "gitlab-cli"]
model: opus
context: fork

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.

Related Skills

  • `/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>

Error Handling

| Scenario | Action | |----------|--------| | CLI not installed | Report install link | | Not authenticated | Report auth command | | Can't detect platform | Ask user | | On main/master | Report error | | No commits | Report error |

Example Usage

/mr-description-creator
/mr-description-creator --template "## Summary\n{summary}\n## Changes\n{changes}"
Read more
Ships withessentials-claude-code

Loops, swarms, and teams powered by Claude Code's built-in Task System. Loop, swarm, and team are three execution modes. Loop runs sequentially. Swarm runs parallel subagents. Team spawns full Claude Code instances with shared contracts via Agent Teams.

Get the whole plugin, auto-invoked
Stats
91
Stars
1
Views
9
Forks
Maintained
Maintenance
Unlicense
License
5mo ago
Last commit
7mo ago
Created

Repo: GantisStorm/essentials-claude-code