Create pull requests using GitHub CLI with proper templates and formatting
45
33%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./plugins/git/skills/create-pr/SKILL.mdThis 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.mdAuthenticate with GitHub:
gh auth loginBefore creating a PR, check for uncommitted changes:
git status to check for uncommitted changes (staged, unstaged, or untracked files)commit skill first:
Skill: commitFirst, 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 mainFor 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 mainLanguage: 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> --squashTo 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 maindedca19
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.