.ai/skills/woocommerce-git-draft-pr/SKILL.md
Create a concise, reviewer-friendly draft PR from the current branch.
git branch --show-currentgit log trunk..HEAD --format="%h %s" --reverse 2>/dev/null || echo "No commits ahead of trunk"git diff trunk...HEAD --stat 2>/dev/nullgit status --shortgit diff trunk...HEAD --name-only -- '*/changelog/*' 2>/dev/nullcat .github/PULL_REQUEST_TEMPLATE.mdVerify 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:
#12345, fix/issue-12345)client/, templates/, CSS/SCSS, JSX/TSXExtract issue/PR refs from commits and branch name:
Closes # (Linear refs are internal — only reference GitHub issues in PRs).git log -S on touched lines) to find the introducing PR; omit Bug introduced in PR #XXXX. if not found.Title (under 70 chars, verb-first — the repo convention):
Fix <what was broken>, Add <what>, or other verb (Restore, Bump, Prepare, etc.)[Email Editor] Fix double margin-top in flex layoutfix:/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:
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.Automatically create with Significance, Type, and a user-facing Message.does not require with the Comment "Created manually."does not require with a Comment explaining why (e.g., "Internal tooling, not shipped to merchants").Feature Highlight for user-visible features merchants will notice, or Developer Advisory for changes affecting extension/theme developers (hook signatures, deprecations, REST API field changes). Otherwise leave both unchecked.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 # .).
State the generated title and body before executing.
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.