pr

Create a GitHub pull request for the current branch targeting canary.

1|Updated May 9, 2026
One-click install
npx skills add https://github.com/duwenji/generative-ai-oss-tutorials --skill pr-duwenji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr
Source: https://github.com/duwenji/generative-ai-oss-tutorials/tree/main/sandbox/lobe-chat/.agents/skills/pr
Command: npx skills add https://github.com/duwenji/generative-ai-oss-tutorials --skill pr-duwenji

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, git.

What problem does it solve?

It streamlines opening a GitHub pull request for the current working branch while enforcing a safe branch strategy and avoiding duplicate PRs.

Core Features & Use Cases

  • Branch Strategy Enforcement: Targets the canary branch and avoids PRs directly to main.
  • Context Gathering & Diff Awareness: Detects current branch, uncommitted changes, upstream status, and summarizes changes to form an accurate PR.
  • Workflow Automation with Safety Checks: Pushes the branch when needed and searches for related issues so the PR can link fixes and context.

Quick Start

Ask the assistant: "pr" to create a pull request for your current branch with the correct base, title format, and linked issues.

Frequently Asked Questions about pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitHub pull request from my current branch automatically?

To create a GitHub pull request automatically, the tool gathers your git and remote state, handles uncommitted changes, pushes to origin, and runs gh pr create targeting the canary branch. It also searches for related issues to link in the PR body.

How do I prevent creating a duplicate GitHub pull request for the same branch?

To prevent a duplicate GitHub pull request, the tool performs contextual checks for existing PRs on your current branch before creating a new one. It verifies upstream status and remote state to ensure you do not open redundant pull requests.

Can I create a pull request directly to main from my current git branch?

You cannot create a pull request directly to main from canary or main itself. The workflow enforces a safe branch strategy by targeting the canary branch as the base, creating a feature branch if you have uncommitted changes on main.

What happens to uncommitted changes when I try to create a PR?

When you try to create a PR with uncommitted changes on canary or main, the tool automatically creates a new feature branch to safely preserve your work. It then pushes this feature branch to origin before opening the pull request.

Do I need the GitHub CLI installed to automate pull request creation?

You need both the git and gh CLI tools installed to automate pull request creation. The tool relies on gh pr create to open the pull request and git to collect local repository state, handle branch switches, and push to the remote origin.

How does linking a related issue to a pull request work?

Linking a related issue to a pull request works by searching for related GitHub issues during the creation process. The tool summarizes your code changes and uses an English PR template body to connect the fix with the appropriate issue context.