Easy Create Pr
A command template for git workflow workflows. Streamlines development with pre-configured patterns and best practices.
Easy Create Pr
Create well-structured pull requests with automated description generation, reviewer assignment, and issue linking.
When to Use This Command
Run this command when you need to:
- Create a pull request with a properly formatted title, description, and issue references
- Auto-generate a PR description from commit history and diff analysis
- Assign reviewers, apply labels, and link issues in a single command
Consider alternatives when:
- You need to create a draft PR for early feedback on work in progress
- The PR requires a complex custom template specific to your organization
Quick Start
Configuration
name: easy-create-pr type: command category: git-workflow
Example Invocation
claude command:run easy-create-pr --base main --title "feat(auth): Add OAuth2 login" --reviewers alice,bob
Example Output
Branch: feature/oauth2-login -> main
Commits: 4 commits ahead of main
Pre-flight Checks:
[OK] Branch is pushed to remote
[OK] All commits follow conventional format
[OK] CI checks passing on branch
[OK] No merge conflicts with base
Pull Request Created:
Title: feat(auth): Add OAuth2 login
URL: https://github.com/org/repo/pull/142
Description:
Add Google OAuth2 authentication provider with token refresh
and session management. Routes requiring auth are now protected
via middleware.
Refs GH-89
Reviewers: @alice, @bob
Labels: feature, auth
Linked Issues: #89
PR #142 created successfully.
Core Concepts
Pull Request Creation Overview
| Aspect | Details |
|---|---|
| Title Format | Conventional commit style: type(scope): description |
| Description Generation | Summarizes commits and diff into a structured PR body |
| Reviewer Assignment | Assigns reviewers from CODEOWNERS or explicit list |
| Issue Linking | Parses commit footers for issue references and links them |
| Pre-flight Checks | Verifies branch state, CI status, and merge compatibility |
PR Creation Workflow
Create PR Request
|
v
+-------------------+
| Verify Branch |---> Pushed, ahead of base, no conflicts
+-------------------+
|
v
+-------------------+
| Analyze Commits |---> Extract type, scope, description
+-------------------+
|
v
+-------------------+
| Generate Body |---> Summary, changes, issue refs
+-------------------+
|
v
+-------------------+
| Create via gh CLI |---> gh pr create with all metadata
+-------------------+
|
v
+-------------------+
| Assign and Label |---> Reviewers, labels, milestones
+-------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| base | string | main | Base branch to merge into |
| title | string | auto-generate | PR title (generated from branch name or commits if omitted) |
| reviewers | string | none | Comma-separated list of GitHub usernames to request review from |
| draft | boolean | false | Create as a draft pull request |
| labels | string | auto-detect | Comma-separated labels to apply (inferred from commit types) |
Best Practices
-
Explain Why, Not What - The PR description should explain the motivation and context for the change. Reviewers can see what changed in the diff; they need to understand why it changed and what alternatives were considered.
-
Keep PRs Small and Focused - A PR with 50 changed lines gets reviewed in 10 minutes. A PR with 500 changed lines gets skimmed in 10 minutes. Break large features into reviewable increments.
-
Request 1-3 Reviewers Maximum - Too many reviewers leads to diffusion of responsibility where everyone assumes someone else will do the thorough review. Assign the most relevant 1-3 reviewers.
-
Link All Related Issues - Connect the PR to its tracking issue with Fixes #123 or Refs #456. This provides traceability and automatically closes issues when the PR merges.
-
Verify CI Before Requesting Review - Push the branch and wait for CI checks to pass before creating the PR. Requesting review on a PR with failing tests wastes reviewer time and signals unpreparedness.
Common Issues
-
PR Description Is Too Vague - The auto-generated description lacks context because commit messages were uninformative. Write descriptive commit messages or provide an explicit description with the --body flag.
-
Merge Conflicts Appear After Creation - The base branch moved forward while the PR was in review. Rebase the branch on the latest base before requesting re-review to keep the PR mergeable.
-
Wrong Base Branch Selected - The PR targets main when it should target a release or develop branch. Always verify the base branch before creating and use the --base flag to set it explicitly.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.