workflow-pr-sync

Creates or updates GitHub pull requests with auto-generated titles and descriptions from branch diffs.

138|5|Updated Sep 19, 2024
One-click install
npx skills add https://github.com/macalbert/envilder --skill workflow-pr-sync-macalbert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow-pr-sync
Source: https://github.com/macalbert/envilder/tree/main/.github/skills/workflow-pr-sync
Command: npx skills add https://github.com/macalbert/envilder --skill workflow-pr-sync-macalbert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing consistent, well-structured pull request titles and descriptions is repetitive and error-prone, especially when branches contain merge commits or changes already in main. This Skill automates PR creation and updates using the GitHub CLI, generating titles and bodies from the actual final diff against the base branch. ## Core Features & Use Cases - Automated PR Creation and Update: Detects whether a PR already exists for the current branch and either creates a new one or updates the existing title and body via gh CLI. - Diff-Based Description Generation: Uses the three-dot merge-base diff (git diff <base>...HEAD) as the source of truth, so the PR body reflects what actually changes rather than individual commits. - Mandatory PR Template: Enforces a four-section body (Summary, Changes, Testing, Related) with conventional-commit-style titles. - Use Case: After finishing a feature branch, run the Skill to open a PR against main with a compliant title and structured description, then re-run it after new commits to sync the description. ## Quick Start Ask the assistant to create or update a pull request for the current branch against main using the workflow-pr-sync skill.

Frequently Asked Questions about workflow-pr-sync

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

FAQPage Schema
How do I create a GitHub pull request from the command line?

Use the gh CLI with gh pr create --base main --title "<title>" --body-file .pr-body.md. Writing the body to a temp file and passing it with --body-file avoids shell escaping issues that corrupt markdown when using inline --body.

How do I update an existing pull request description with gh CLI?

Run gh pr edit --title "<title>" --body-file .pr-body.md to replace the title and body of the PR for the current branch. Check whether a PR exists first with gh pr view --json number,title,url.

Why does my PR body show corrupted characters from PowerShell?

PowerShell treats backticks as escape characters and misreads UTF-8 bytes as Windows-1252, corrupting arrows, em-dashes, and code spans in here-strings. Write the body with a file creation tool instead and stick to plain ASCII characters.

What is the difference between two-dot and three-dot git diff for PRs?

The three-dot diff (git diff base...HEAD) compares against the merge base, showing only what the branch actually changes. This is the correct source for PR descriptions because commit lists may include merge commits or changes already in main.

What happens if the gh CLI is not installed?

The Skill outputs the generated PR title and body so you can create the pull request manually through the GitHub web interface. No PR is created automatically without the gh CLI available.