Back to blog
Guide

How to Automate PR Creation with Repository Templates Using pr-creator

Skill Gallery TeamJanuary 31, 20264 min read

Creating Pull Requests that follow repository PR templates takes effort. Filling checklists and linking issues are common points of omission.

This article explains how to efficiently create template-compliant PRs using the pr-creator skill from Gemini CLI.

What This Skill Does

pr-creator automates PR creation following repository PR templates:

  • Auto-detection and loading of .github/pull_request_template.md
  • Description generation preserving template heading structure
  • Conventional Commits title format (feat(scope):, fix(core):, etc.)
  • Preflight checking via npm run preflight
  • PR creation via gh pr create with --body-file

Suited for developers maintaining consistent PR quality and teams enforcing template compliance.

Installation

Prerequisites

  • Gemini CLI installed
  • GitHub CLI (gh) installed
  • Repository with PR templates

Install Command

gemini skills install github.com/google-gemini/gemini-cli/tree/main/.gemini/skills/pr-creator

Usage

Basic Usage

Create a PR

pr-creator follows this workflow:

  1. Check current branch (create new if on main)
  2. Detect and load PR template
  3. Draft description following template structure
  4. Run npm run preflight check
  5. Create PR via gh pr create --body-file

PR Title Format

Uses Conventional Commits:

feat(ui): add new button component
fix(core): resolve memory leak in event handler

Template Compliance

All template headings (##) are preserved. Checklist items are only marked when actually completed. Related issues are linked when applicable.

Important Considerations

Do Not Work on main

If on main, pr-creator prompts for a new branch. Avoid creating PRs directly from main.

Preflight Command Assumed

npm run preflight is executed. Projects without this script may encounter errors.

No Incomplete Checkmarks

Checklist items in PR templates are only checked when tasks are actually completed. Accuracy is prioritized.

Summary

pr-creator automates template-compliant PR creation with Conventional Commits titles. It helps standardize PR quality and enforce template adherence.

pr-creator Skill Details

pr-creatorgemini-clipull-requestgithubconventional-commits

Related posts