Mr generator

From hua-bang/pulse-agent · View interactive version

Mr generator is an AI agent skill from the GitHub repository hua-bang/pulse-agent. Automatically generate concise MR titles and descriptions based on current branch diff

How to use this skill

Skill file

MR Generator Skill

This skill generates concise English MR titles and descriptions based on the diff between the current branch and the target branch (default: origin/master). It creates the MR via gh by default, unless preview mode is enabled or --no-create is passed.

Core Capabilities

1. Intelligent diff analysis

2. Automatic title generation

3. Concise description generation

4. Create MR by default

Required Execution Flow

  1. Read diff between current branch and target branch (default: origin/master).
  2. Generate an English MR title and description.
  3. Print the proposed title and description.
  4. If --preview or --no-create is set, stop after printing.
  5. Otherwise, create the MR via gh:

```bash

gh pr create --title "<generated_title>" --body "<generated_body>"

```

Usage

Basic usage

# Generate title/description, then create MR by default
./mr-generate.sh

# Set target branch (default: origin/master)
./mr-generate.sh --target origin/develop

# Preview only (generate, do not create MR)
./mr-generate.sh --preview

# Print only (no MR creation)
./mr-generate.sh --no-create

Workflow integration

# Run after push
git push origin HEAD
./mr-generate.sh

Title Generation Rules

Change type mapping

Module extraction

Description Format

Brief description of changes

- Key change 1
- Key change 2
- Impact or improvement

Example Output

Feature

Title: feat: add user authentication with JWT

Description:

Implement secure user authentication using JWT tokens

- Add login/logout endpoints
- Implement token validation middleware
- Add user registration flow
- Update API documentation

Bug Fix

Title: fix: resolve login validation error

Description:

Resolve email validation issue in user login

- Fix regex pattern for email validation
- Add proper error handling for invalid formats
- Update unit tests for edge cases

Refactor

Title: refactor: simplify API response handling

Description:

Improve API response consistency and error handling

- Standardize response format across endpoints
- Add centralized error handling middleware
- Reduce code duplication in controllers
- Update test assertions
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.