Detect the base branch via
git remote show origin | grep 'HEAD branch'. Run in parallel:git diff <base> --name-onlyandgit diff <base>to understand changesgit log <base>..HEAD --onelineto see commit historygit statusto check for uncommitted changesgit log @{u}..HEAD --oneline 2>/dev/nullto check if the branch needs pushing- Check for
.github/PULL_REQUEST_TEMPLATE.mdor.github/PULL_REQUEST_TEMPLATE/directory
If there are uncommitted changes, ask the user whether to commit them first or proceed without them.
If the branch needs pushing, push it with
git push -u origin HEAD. Never force-push. Never push to the main/master branch.Review all changes (all commits since base) and draft:
- A short PR title (under 70 characters)
- A brief description (2-4 sentences or 3-5 bullets max) covering what changed and why. Skip restating the title, low-value details, and obvious implementation notes.
Build the PR body:
- If a PR template exists: Fill in the description/summary section. Preserve all other sections and placeholders from the template.
- If no template: Use a simple body with a
## Summarysection. Keep it tight — no filler headings, no "Test plan" unless there's something non-obvious to call out.
Create the PR using
gh pr createwith a HEREDOC for the body:gh pr create --title "the pr title" --body "$(cat <<'EOF' <body content here> EOF )"Output the PR URL when done.
Pr Open
Open a GitHub PR for the current branch. Generates a title and description from the diff, and respects the repo's PULL_REQUEST_TEMPLATE if one exists.
Pr Open by driangle · e47f397
npx skillmds@latest add driangle/pr-open File contents
---name: pr-opendescription: Open a GitHub PR for the current branch. Generates a title and description from the diff, and respects the repo's PULL_REQUEST_TEMPLATE if one exists.---1. Detect the base branch via `git remote show origin | grep 'HEAD branch'`. Run in parallel: - `git diff <base> --name-only` and `git diff <base>` to understand changes - `git log <base>..HEAD --oneline` to see commit history - `git status` to check for uncommitted changes - `git log @{u}..HEAD --oneline 2>/dev/null` to check if the branch needs pushing - Check for `.github/PULL_REQUEST_TEMPLATE.md` or `.github/PULL_REQUEST_TEMPLATE/` directory2. If there are uncommitted changes, ask the user whether to commit them first or proceed without them.3. If the branch needs pushing, push it with `git push -u origin HEAD`. **Never force-push. Never push to the main/master branch.**4. Review all changes (all commits since base) and draft: - A short PR title (under 70 characters) - A brief description (2-4 sentences or 3-5 bullets max) covering what changed and why. Skip restating the title, low-value details, and obvious implementation notes.5. Build the PR body: - **If a PR template exists:** Fill in the description/summary section. Preserve all other sections and placeholders from the template. - **If no template:** Use a simple body with a `## Summary` section. Keep it tight — no filler headings, no "Test plan" unless there's something non-obvious to call out.6. Create the PR using `gh pr create` with a HEREDOC for the body: ``` gh pr create --title "the pr title" --body "$(cat <<'EOF' <body content here> EOF )" ```7. Output the PR URL when done.
driangle/ai-powers/tree/main/plugins/pr-workflow/pr-open commit e47f39790c
Frequently asked questions
Run npx skillmds@latest add driangle/pr-open in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Open a GitHub PR for the current branch. Generates a title and description from the diff, and respects the repo's PULL_REQUEST_TEMPLATE if one exists. It is listed under Productivity on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
driangle (@driangle) published this skill. Their other Agent Skills are listed on their SkillMD profile.