agentleFS
liatrio-labsliatrio-labs/ai-prompts/skills/create-pull-request/SKILL.md

create-pull-request

Skill4 starsChanged 13 months agoApache-2.0View on GitHub

Generate a reviewer-ready pull request or merge request title and description from branch changes. Use when a user asks to draft PR/MR content, summarize branch deltas against a base branch, or optionally create the PR with gh/glab after approval.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use commit.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always begin your response with all active emoji markers, in the order they were introduced.

    line 14
  2. Distinctive:

    Use positive, reviewer-friendly language with clear structure.

    line 28
  3. Distinctive:

    Verify git repository context.

    line 42
  4. Distinctive:

    If working tree is dirty, tell the user and ask whether to continue with current state.

    line 44
  5. Distinctive:

    Run the collector script:

    line 50
  6. Very specific:

    Read the emitted artifact directory and MANIFEST.txt.

    line 56
  7. Distinctive:

    Verify each section with this sequence:

    line 74
  8. Distinctive:

    Before presenting output, confirm:

    line 85
  9. Very specific:

    all required sections are populated or marked N/A with reason,

    line 87
  10. Distinctive:

    After presenting title/body:

    line 94
  11. Distinctive:

    Ask for explicit user approval to create the PR/MR.

    line 96
  12. Distinctive:

    Verify selected CLI presence and auth status.

    line 98
  13. Distinctive:

    Run creation command using the exact approved title/body.

    line 99
  14. Very specific:

    Use references/pr-creation-commands.md for platform-specific command flow.

    line 102
  15. Distinctive:

    If Phase 6 is executed, include resulting URL.

    line 109

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Pull Request

Overview

Analyze branch changes against a base branch, produce a structured PR/MR title and body with evidence, and optionally create the PR/MR via CLI after explicit user approval.

Context Marker

Always begin your response with all active emoji markers, in the order they were introduced.

Format: "<marker1><marker2><marker3>\n<response>"

The marker for this skill is: 🚀

Role

Act as a senior software engineer and code reviewer who writes concise, evidence-backed PR/MR descriptions.

Core Principles

  • Base conclusions on collected git artifacts.
  • Surface risk early (breaking changes, migrations, configuration updates, manual QA).
  • Use positive, reviewer-friendly language with clear structure.
  • Mark information gaps explicitly instead of speculating.
  • Require explicit user confirmation before any PR/MR creation command.

Runtime Requirements

  • Git CLI: git status, git branch --show-current, git rev-parse, git log, git diff, git remote.
  • Shell utilities: mktemp, cat.
  • Optional creation path: gh for GitHub or glab for GitLab, with valid auth.

Workflow

Phase 1: Environment Validation

  1. Verify git repository context.
  2. Capture current branch and working tree state.
  3. If working tree is dirty, tell the user and ask whether to continue with current state.

Blocking check: complete before collecting artifacts.

Phase 2: Repository Context Collection

  1. Run the collector script:

    BASE_BRANCH="${BASE_BRANCH:-main}" bash scripts/collect_pr_context.sh
  2. Read the emitted artifact directory and MANIFEST.txt.
  3. Analyze artifact files from disk, not by streaming huge diffs to chat.

Blocking check: all required artifacts exist.

Phase 3: Data Analysis

From collected artifacts, identify:

  • key functional changes and rationale,
  • affected files/directories and test coverage signals,
  • risk flags (breaking changes, config/dependency changes, known limitations),
  • missing context requiring explicit user follow-up.

Phase 4: Draft PR/MR Content with Chain-of-Verification

  1. Draft title using Conventional Commit style.
  2. Draft body using the template in references/pr-description-template.md.
  3. Verify each section with this sequence:
    • Initial draft
    • Self-question: "Is this claim verifiable from artifacts?"
    • Fact-check against artifact files
    • Resolve inconsistencies
    • Final validated wording

Blocking check: every section is verifiable or explicitly marked unknown.

Phase 5: Quality Gate

Before presenting output, confirm:

  • all required sections are populated or marked N/A with reason,
  • title format is valid conventional commit style,
  • breaking changes are clearly marked (use ! and/or BREAKING CHANGE: when applicable),
  • risks, testing notes, and follow-ups are explicit and concise.

Phase 6: Optional PR/MR Creation

After presenting title/body:

  1. Ask for explicit user approval to create the PR/MR.
  2. Detect platform from git remote or ask user if ambiguous.
  3. Verify selected CLI presence and auth status.
  4. Run creation command using the exact approved title/body.
  5. Return PR/MR URL on success; otherwise return actionable failure details.

Use references/pr-creation-commands.md for platform-specific command flow.

Output Contract

  • Provide final PR/MR title.
  • Provide final PR/MR body in the expected section structure.
  • Include short risk summary and any missing-information notes.
  • If Phase 6 is executed, include resulting URL.

References

  • PR/MR structure and full example: references/pr-description-template.md
  • Conventional commit titles for PR/MR: references/conventional-commit-pr-titles.md
  • Platform detection and creation commands: references/pr-creation-commands.md
  • Section-level writing guidance: references/writing-guidelines.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.