Create pull requests using GitHub CLI with proper templates and formatting
Creates GitHub pull requests using CLI with proper templates and conventional commit formatting.
/plugin marketplace add NeoLabHQ/context-engineering-kit/plugin install git@context-engineering-kitNone required - interactive guide for PR creationThis guide explains how to create pull requests using GitHub CLI in our project.
Important: All PR titles and descriptions should be written in English.
Check if gh is installed, if not follow this instruction to install it:
Install GitHub CLI if you haven't already:
# macOS
brew install gh
# Windows
winget install --id GitHub.cli
# Linux
# Follow instructions at https://github.com/cli/cli/blob/trunk/docs/install_linux.md
Authenticate with GitHub:
gh auth login
Before creating a PR, check for uncommitted changes:
git status to check for uncommitted changes (staged, unstaged, or untracked files)git:commit command first:
Skill: git:commit
First, prepare your PR description following the template in @.github/pull_request_template.md
Use the gh pr create --draft command to create a new pull request:
# Basic command structure
gh pr create --draft --title "✨(scope): Your descriptive title" --body "Your PR description" --base main
For more complex PR descriptions with proper formatting, use the --body-file option with the exact PR template structure:
# Create PR with proper template structure
gh pr create --draft --title "✨(scope): Your descriptive title" --body-file .github/pull_request_template.md --base main
Language: Always use English for PR titles and descriptions
PR Title Format: Use conventional commit format with emojis
:sparkles:)✨(supabase): Add staging remote configuration🐛(auth): Fix login redirect issue📝(readme): Update installation instructionsDescription Template: Always use our PR template structure from @.github/pull_request_template.md:
Template Accuracy: Ensure your PR description precisely follows the template structure:
pr_agent:summary and pr_agent:walkthrough)Draft PRs: Start as draft when the work is in progress
--draft flag in the commandgh pr readyAlways include all template sections, even if some are marked as "N/A" or "None"
Here are some additional useful GitHub CLI commands for managing PRs:
# List your open pull requests
gh pr list --author "@me"
# Check PR status
gh pr status
# View a specific PR
gh pr view <PR-NUMBER>
# Check out a PR branch locally
gh pr checkout <PR-NUMBER>
# Convert a draft PR to ready for review
gh pr ready <PR-NUMBER>
# Add reviewers to a PR
gh pr edit <PR-NUMBER> --add-reviewer username1,username2
# Merge a PR
gh pr merge <PR-NUMBER> --squash
To simplify PR creation with consistent descriptions, you can create a template file:
pr-template.md with your PR templategh pr create --draft --title "feat(scope): Your title" --body-file pr-template.md --base main
/create-prCreate a new branch, commit changes, and submit a pull request with automatic commit splitting