pr

Create draft GitHub pull requests via fork-based git operations and GitHub CLI.

Updated May 5, 2026
One-click install
npx skills add https://github.com/swghosh/ambient-workflows --skill pr-swghosh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr
Source: https://github.com/swghosh/ambient-workflows/tree/main/workflows/dev-team/.claude/skills/pr
Command: npx skills add https://github.com/swghosh/ambient-workflows --skill pr-swghosh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents failed or risky pull request creation by guiding a reliable, fork-based PR workflow that handles auth differences, fork setup, default-branch detection, and draft PR creation.

Core Features & Use Cases

  • Draft PR creation with guardrails: Always creates a draft PR and targets the repository default branch detected from upstream.
  • Auth-aware flow: Detects whether you’re using user auth, GitHub App auth, or no auth and follows the appropriate strategy.
  • Fork-first, cross-repo correctness: Ensures a fork exists, configures the correct fork remote, and pushes to the fork (never directly to upstream).
  • Workflow-file sync protection: Detects when the fork is out of sync (especially .github/workflows/ differences) and attempts to sync to avoid permissions errors.
  • Failure-resistant fallback: When gh pr create fails (common for GitHub Apps), provides a pre-filled GitHub compare URL for manual draft completion.

Quick Start

Tell the Skill to open a draft pull request for the changes currently in your working directory by running: /pr

Frequently Asked Questions about pr

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

FAQPage Schema
How do I create a draft pull request from a fork using git automation?

To create a draft pull request from a fork, the Skill detects your auth context, locates the upstream default branch, and pushes to your fork remote before opening the PR. It enforces pre-flight checks to ensure the fork is correctly configured.

Why does GitHub pull request creation fail when using GitHub App authentication?

GitHub pull request creation often fails with GitHub App authentication due to permission restrictions. When this happens, the Skill provides a pre-filled GitHub compare URL, allowing you to complete the draft PR manually through the browser.

How do I sync my fork before opening a pull request to avoid workflow file errors?

To prevent workflow file errors, the Skill detects out-of-sync forks, specifically checking `.github/workflows/` differences. It attempts to sync your fork automatically before pushing to avoid permissions errors during pull request creation.

Can I open a pull request if my repository uses a non-main default branch?

Yes, you can open a pull request with a non-main default branch because the Skill automatically detects the upstream default branch. It targets this detected branch rather than assuming a standard main branch configuration.

What is the safest way to automate a fork-based pull request workflow?

The safest way to automate a fork-based pull request workflow is by enforcing pre-flight checks and pushing exclusively to the fork remote. The Skill ensures no direct pushes reach upstream and always creates a draft PR for safety.

Does this pull request automation work without user token authentication?

Yes, this pull request automation works without user token authentication by detecting the unavailable auth context and following an appropriate fallback strategy. It adapts its flow to handle user auth, GitHub App auth, or no auth scenarios.