Skip to content
Back to skills

Create Pr

ASecurity

Create a pull request (GitHub) or merge request (GitLab) from the current branch

  • 844 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
toolstestinggit

Works with

  • cli

Security analysis

A100/100

Scanned September 30, 2026

npx -y skills add desplega-ai/agent-swarm --skill create-pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Pr?

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

Security grade badge for Create Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/desplega-ai-create-pr/badge)](https://www.skillsdirectory.com/skills/desplega-ai-create-pr)

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: create-pr
description: Create a pull request (GitHub) or merge request (GitLab) from the current branch
---

# Create Pull Request / Merge Request

Create a PR (GitHub) or MR (GitLab) from the current branch with an auto-generated title and description.

**Provider detection:** Check the remote URL:
- If `github.com` → use `gh` CLI
- If `gitlab.com` or `gitlab.` → use `glab` CLI

## Arguments

- `base-branch` (optional): Branch to merge into (defaults to `main` or repo default)

## Prerequisites

You should be working in a repository cloned to `/workspace/personal/<repo-name>`.

## Workflow

1. **Verify state** — confirm you're in a git repo, not on main/master, and have commits to push.
2. **Run PR checks (MANDATORY)** — Run ALL checks listed in the "PR Checks" section of your Repository Guidelines. Run each command/task sequentially. If ANY check fails, fix the issue and re-run until all pass. If no guidelines are defined, check the project's CLAUDE.md for a pre-PR checklist and run those. Do NOT proceed until all checks pass.
3. **Push the branch** — `git push -u origin HEAD`
4. **Gather context** — review commit messages and changed files since diverging from base.
5. **Generate title and description.** Follow the conventions of the repository you are working in, not a fixed format:
   - **Title**: Concise summary (conventional commit style if the repo uses it)
   - **Description**: If the repo has a PR/MR template, use its headings as the structure and fill every section. GitHub looks for `pull_request_template.md` in `.github/`, `docs/`, or the repo root (plus an optional `PULL_REQUEST_TEMPLATE/` directory). GitLab uses `.gitlab/merge_request_templates/`. Also follow any PR rules in the repo's `CLAUDE.md`, `AGENTS.md`, or `CONTRIBUTING.md`. If the repo defines none, include: summary of changes, notable items, testing done, related issues.
6. **Create the PR/MR** using `gh pr create` or `glab mr create`. `gh pr create --body` does not apply the repo template, so write the filled description to a file and pass it with `--body-file <file>`.
7. **Check CI status** — After creating the PR, wait ~30 seconds, then check CI with `gh pr checks <pr-number>` (GitHub) or `glab mr view --json pipelines` (GitLab). If any check is failing, investigate the failure, fix it, push the fix, and re-check. Repeat until CI is green.
8. **Report** the PR/MR URL and CI status.

## Tips

- Link related issues using `Fixes #123` or `Closes #123` in the description
- Keep PRs focused — one logical change per PR
- If the branch has many commits, summarize the overall change rather than listing each commit

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.