Skip to content
Back to skills

Auto Mr

ASecurity

Push current branch, create MR/PR, wait for CI pipeline, merge, and clean up branch using auto-mr CLI

  • 16 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
developmentbashgit

Works with

  • cli

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add sgaunet/claude-plugins --skill auto-mr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Auto Mr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Auto Mr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sgaunet-auto-mr/badge)](https://www.skillsdirectory.com/skills/sgaunet-auto-mr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: auto-mr
description: Push current branch, create MR/PR, wait for CI pipeline, merge, and clean up branch using auto-mr CLI
argument-hint: '[--squash] [--no-squash] [--msg "text"] [--labels "label1,label2"] [--list-labels] [--pipeline-timeout "30m"] [--log-level debug|info|warn|error]'
user-invocable: true
---

# auto-mr Skill

Push the current branch, create a MR/PR on GitHub or GitLab, wait for the CI pipeline, merge, and clean up the branch — all via the `auto-mr` CLI.

## CLI Reference

```
Flags:
  --labels string             Comma-separated label names (e.g., "bug,enhancement")
  --list-labels               List all available labels and exit
  -l, --log-level string      Set log level (debug, info, warn, error) [default "info"]
  --msg string                Custom message for MR/PR (overrides commit message selection)
  --no-squash                 Disable squash merge (default: squash enabled)
  --pipeline-timeout string   Pipeline/workflow timeout [default "30m"]
  -v, --version               Print version and exit
```

## Workflow

### Step 1: Pre-flight Checks

**Verify `auto-mr` is installed:**
```bash
auto-mr --version
```
If the command fails, abort with:
> `auto-mr` is not installed. Install it from https://github.com/sgaunet/auto-mr and ensure it is in your PATH.

**Get current branch:**
```bash
git rev-parse --abbrev-ref HEAD
```
If the branch is `main`, `master`, or `develop`, warn the user:
> Warning: you are on a protected branch (`<branch>`). `auto-mr` is intended for feature branches.

**Check for uncommitted changes:**
```bash
git status --porcelain
```
If the working tree is dirty, warn the user:
> Warning: you have uncommitted changes. Consider committing or stashing them before creating a MR/PR.

### Step 2: Label Discovery (early exit)

If `--list-labels` is present in the arguments:
```bash
auto-mr --list-labels
```
Display the output and return. Do not proceed further.

### Step 3: Assemble Command

Base command: `auto-mr`

Append all provided flags verbatim (e.g., `--squash`, `--msg "fix: ..."`, `--labels "bug,help wanted"`).

If a `working_directory` context is provided, prefix with `cd <working_directory> &&`.

### Step 4: Confirm Before Executing

Display a summary to the user:
```
Branch:  <current-branch>
Command: <assembled-command>
```

Ask the user to confirm via `AskUserQuestion`:
> Proceed with the above command? (yes/no)

If the user declines, abort gracefully.

### Step 5: Execute

Run the assembled command. `auto-mr` handles the full flow:
1. Push branch to remote
2. Create MR (GitLab) or PR (GitHub)
3. Wait for CI pipeline/checks
4. Merge when CI passes
5. Delete the remote branch

**On success:** display the output (includes the MR/PR URL).

**On failure:** display the error output, then suggest the manual fallback:
```bash
git push -u origin <branch>
# Then open a MR/PR via the repository web UI
```

## Working Directory

If a `working_directory` context is provided (e.g., a worktree path from `feature-flow-w`), prefix all commands with `cd <working_directory> &&`. Otherwise, use the current directory.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.