MCPInstall

woocommerce-git-draft-pr

Create a high-quality draft PR for the current branch. Use when the user says "create a PR", "draft PR", "open a PR", "make a PR", "push and create PR", or "submit PR".

Installs
114
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/woocommerce/woocommerce --skill woocommerce-git-draft-pr
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads woocommerce-git-draft-pr automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Create Draft PR

Create a concise, reviewer-friendly draft PR from the current branch.

Dynamic Context

  • Current branch: !git branch --show-current
  • Commits: !git log trunk..HEAD --format="%h %s" --reverse 2>/dev/null || echo "No commits ahead of trunk"
  • Diff stat: !git diff trunk...HEAD --stat 2>/dev/null
  • Uncommitted changes: !git status --short
  • Existing changelogs: !git diff trunk...HEAD --name-only -- '*/changelog/*' 2>/dev/null
  • PR template: !cat .github/PULL_REQUEST_TEMPLATE.md

Procedure

1. Preflight and Analyze

Verify from dynamic context: not on trunk (stop if so), commits exist ahead of trunk (stop if none), no uncommitted changes (stop if dirty).

Base branch: use release/* if the branch was created from one, otherwise trunk.

From the dynamic context above (read full diffs only if the stat summary is ambiguous), determine:

  • Change type: Fix, Add, Update, Dev, Tweak, Performance, or Enhancement
  • Significance: Patch (most common), Minor (new features), Major (breaking — rare)
  • Bug fix? Look for issue refs in commits/branch name (e.g., #12345, fix/issue-12345)
  • UI changes? Changes in client/, templates/, CSS/SCSS, JSX/TSX
  • Plugin-affecting? Code shipped to users = yes. CI/CD, workflows, tooling, docs = no. This drives the Milestone and Changelog decisions in Step 3.

2. Gather Context

Extract issue/PR refs from commits and branch name:

  • Issue ref: use what's in commits/branch if present; otherwise omit Closes # (Linear refs are internal — only reference GitHub issues in PRs).
  • Bug-fix origin PR: if a bug fix and no PR ref is in the diff/commits, search history (git log -S on touched lines) to find the introducing PR; omit Bug introduced in PR #XXXX. if not found.
  • Motivation: infer from diff and commit messages. Use the strongest summary you can; don't block on missing context.

3. Generate PR Title + Body

Title (under 70 chars, verb-first — the repo convention):

  • Fix <what was broken>, Add <what>, or other verb (Restore, Bump, Prepare, etc.)
  • Optional area prefix: [Email Editor] Fix double margin-top in flex layout
  • No fix:/feat: prefixes. No Linear ticket refs — Linear is internal, PRs are public.

Body — fill in .github/PULL_REQUEST_TEMPLATE.md (loaded in dynamic context above) section by section, in order. The template's HTML comments describe what each section is for — follow them as the per-section instructions. Repo-specific rules that the template doesn't carry, layered on top:

  • Changes proposed: 2-3 sentences. Lead with WHY, then WHAT. No filler ("This PR addresses..."). Drop the Closes # . line if you don't have a GitHub issue ref. Drop the Bug introduced in PR # . line if not a bug fix or origin PR unknown.
  • Milestone: tick the auto-assign box only for plugin-affecting changes. The section itself stays — the template marks it do-not-remove.
  • Changelog entry:
    • Plugin-affecting, no changelog files in the diff → tick Automatically create with Significance, Type, and a user-facing Message.
    • Plugin-affecting with changelog files already in the diff → tick does not require with the Comment "Created manually."
    • Not plugin-affecting → tick does not require with a Comment explaining why (e.g., "Internal tooling, not shipped to merchants").

After filling, keep the template's HTML comments (<!-- -->) — they support PR automation and GitHub tests. Remove only unfilled placeholder lines that are actual visible placeholders (e.g., Closes # ., Bug introduced in PR # .).

4. Preview

State the generated title and body before executing.

5. Push and Create

git push -u origin $(git branch --show-current)
gh pr create --draft --title "<title>" --base <base-branch> --body "$(cat <<'PRBODY'
<full PR body>
PRBODY
)"

Output the PR URL. If UI changes need screenshots, remind the user.

Constraints

  • No Co-Authored-By lines or self-attribution
  • Never commit code — pushing is fine
  • Preserve the PR template section headings and HTML comments exactly; the Milestone section is required in every PR body, ticked or not — its <!-- milestone-target-selection --> markers drive PR automation
  • Changelog checkboxes must match CI automation format

FAQ

What does the woocommerce-git-draft-pr skill do?

Create a high-quality draft PR for the current branch. Use when the user says "create a PR", "draft PR", "open a PR", "make a PR", "push and create PR", or "submit PR".

How do I install woocommerce-git-draft-pr?

Run npx skills add https://github.com/woocommerce/woocommerce --skill woocommerce-git-draft-pr in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/woocommerce-git-draft-pr/ (personal) or .claude/skills/woocommerce-git-draft-pr/ (project).

Which AI agents can use woocommerce-git-draft-pr?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is woocommerce-git-draft-pr safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains woocommerce-git-draft-pr?

It is published by woocommerce in woocommerce/woocommerce. It has 114 recorded installs.

More from woocommerce/woocommerce

View all →

woocommerce-backend-dev

woocommerce/woocommerce

Add or modify WooCommerce backend PHP code following project conventions. Use when creating new classes, methods, hooks, or modifying existing backend code. MUST be invoked before writing any PHP unit tests.

Backend & APIs2.3K installs

woocommerce-code-review

woocommerce/woocommerce

Review WooCommerce code changes for coding standards compliance. Use when reviewing code locally, performing automated PR reviews, or checking code quality.

woocommerce-performance

woocommerce/woocommerce

Open the skill to read its SKILL.md instructions.

woocommerce-dev-cycle

woocommerce/woocommerce

Open the skill to read its SKILL.md instructions.

290 installs

woocommerce-copy-guidelines

woocommerce/woocommerce

Open the skill to read its SKILL.md instructions.

Marketing & SEO250 installs

woocommerce-store-api

woocommerce/woocommerce

Open the skill to read its SKILL.md instructions.

Backend & APIs230 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.