sync-pr

Create a temporary branch from main, push it, and open a PR across GitHub accounts.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/sukeun1997/claude-config --skill sync-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-pr
Source: https://github.com/sukeun1997/claude-config/tree/main/skills/sync-pr
Command: npx skills add https://github.com/sukeun1997/claude-config --skill sync-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates a cross-account GitHub PR workflow by creating a temporary branch from main on one account, pushing it, opening a PR to the base repository, and returning to the original account.

Core Features & Use Cases

  • Account switching: seamless switch between sukeun1997 and sukeun8 to perform PR-related tasks.
  • Branch management and PR creation: creates a short-lived branch from main, pushes to origin, and opens a PR with a summary derived from the latest commit messages.
  • Return & reporting: switches back to the original account and reports the PR URL, branch, and account state after completion.

Quick Start

Run Sync PR to switch to sukeun1997, create a branch from main, push it to origin, open a PR against main, and switch back to sukeun8.

Frequently Asked Questions about sync-pr

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

FAQPage Schema
How do I automate creating a pull request from a different GitHub account?

Automating cross-account PRs involves switching GitHub credentials via gh auth, creating a temporary branch from main, pushing it, and opening a PR back to the base repository. This Skill handles the full workflow and returns you to the original account.

How does branch naming work when automating a pull request?

Branch naming for automated pull requests is determined from the argument you provide or automatically derived from the latest commit message, ensuring the temporary branch created from main has a relevant contextual name before pushing to origin.

Can I use gh auth to switch accounts for a single pull request and switch back?

Yes, you can use gh auth to switch accounts for a single pull request. This Skill automates the process by switching to a secondary account, creating and pushing the branch, opening the PR, and ensuring a return to the original account with error handling for missing commits.

How is the pull request body generated when automating cross-account workflows?

The pull request title and body are generated by deriving a summary from the latest commit messages. This ensures the PR content accurately reflects the changes pushed to the temporary branch before opening the request against the main branch.

What happens if there are missing commits or the branch already exists during PR automation?

If missing commits or an existing branch are encountered during PR automation, the Skill implements error handling to catch these issues. It prevents the workflow from failing silently and ensures the account state is managed safely after the PR creation attempt.

Do I need to manually switch back to my original GitHub account after the PR is created?

No, you do not need to manually switch back to your original GitHub account. The Skill implements a post-PR return feature that automatically switches back to the original account and reports the PR URL, branch name, and account state after completion.