skills/pr-creator/SKILL.md
Create GitHub pull requests from code changes via API or generate PR content in chat. Use when user wants to create/open/submit PR, mentions pull request/PR/merge request/code review, or asks to show/generate/display/output PR content in chat (give me PR, PR to chat, send PR to chat, etc).
npx skillsauth add perdolique/workflow pr-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CRITICAL: Always write all PR content (title, description, comments) in English only, regardless of the conversation language or user's preferred language. This is a strict, non-negotiable requirement that applies in all modes.
Style Reference:
Before drafting the PR description, read references/pr-examples.md and follow the Engaging (do this) examples.
Style completeness rule: Dry changelog notes are invalid PR descriptions. Avoid terse lines like Modified validation logic, Updated tests, or Fixed edge case unless they are expanded with concrete context and the requested expressive style.
Before creating the PR or outputting PR content, verify that the description:
Identify which mode to use based on user's request:
Use when user wants to see/copy PR content WITHOUT creating it on GitHub:
Use when user wants to actually create PR:
Default for ambiguous requests: Use Mode 1 (generate in chat) to show user what will be created first.
Follow this workflow systematically when creating PRs:
Which scenario applies?
Scenario A: Creating PR for existing branch with commits
Scenario B: User has uncommitted/unstaged local changes
Most PR requests are Scenario A — analyzing an existing feature branch.
First, determine what branch you're working with:
# Refresh remote refs first so the base comparison uses the latest remote state
git fetch origin --prune
# Get current branch name
git branch --show-current
# Identify the remote default branch ref (preferred)
git symbolic-ref --quiet --short refs/remotes/origin/HEAD
# Fallback: identify the remote default branch name if origin/HEAD is unavailable
git remote show origin | grep "HEAD branch"
Use the remote-tracking base ref for comparisons whenever possible (for example origin/main, not local main). git fetch updates remote refs, but it does not move your local default branch, so comparing against local main/master can miss changes or produce stale diffs.
Common base refs: origin/master, origin/main, origin/develop
Analyze all changes in the entire branch that will be merged, not just:
What you need to obtain:
How to get this information:
Primary approach - Git commands (universal):
# Get full diff between branches using the remote-tracking base ref
git diff <base-ref>...<current-branch>
# Example:
git diff origin/main...feature-branch
# List changed files only:
git diff --name-status origin/main...feature-branch
<base-ref> should usually be the remote default branch ref you discovered in Step 2, such as origin/main.
Alternative - Use available tools in your environment:
Depending on your environment, you may have access to:
The key is obtaining the complete changeset, regardless of the method.
For uncommitted changes: If changes are not yet committed, first check what's uncommitted using:
git status and git diff (for git environments)Troubleshooting "No Changes" Issue:
If you get empty diff or "no changes":
origin/main, not stale local main)git fetch origin --prunegit log --oneline -10git log <base-ref>..<current-branch> to see commitsLANGUAGE: Write all content in English only — title, description, every line.
Based on complete analysis, create:
This workflow ensures PR descriptions accurately reflect the total scope of changes being merged.
If Mode 2 (Create PR on GitHub) - Default action:
assigneeassignees during creation, immediately update the created PR with an issue or PR update tool that supports assigneesreviewer unless the user explicitly asked for reviewers or named specific reviewer logins. reviewers and assignees are different GitHub concepts and are not interchangeable.If Mode 1 (Generate in Chat) - Fallback:
Output the PR content in chat using the format described in "Fallback: Output Format for Chat" section.
Skip GitHub creation if:
Use this format when in Mode 1 (Generate PR Content in Chat):
When outputting PR content to chat instead of creating it on GitHub:
Wrap the complete PR content in a markdown code block:
[PR Title Here]
[Full PR Description Here]
This allows user to easily copy the entire PR content with proper formatting preserved.
Output PR content in a code block, not as rendered markdown.
feat(scope): description)Examples:
Section inclusion rules:
Summary with concrete changes. If you cannot identify at least one substantive change, stop and report that PR content cannot be generated from the available changes.Motivation only when the reason is supported by issue context, commit messages, user context, or a directly observable project need. Do not invent motivation.Related Issues only when actual issue numbers, URLs, or user-provided issue references exist.Breaking Changes only when the branch changes public behavior, APIs, configuration, or data formats that require migration.Performance Impact only when performance is directly affected and you have concrete details.Dependency updates only when dependency or package versions changed.N/A, None, Not applicable, No related issues, or similar filler.Forbidden sections:
Testing, Tests, Testing Notes, Validation, or similarly named testing-only section.Summary as normal branch changes.Summary or another supported section with concrete content.When the branch updates dependencies or package versions, make those changes explicit in the PR description.
- package-name: old-version -> new-versionupdated some dependenciesSummary or in a dedicated Dependency updates subsection when there are many of themExample:
## Summary
Adds dark mode support to the theme package:
- Added dark color palette with semantic tokens
- Updated CSS variables for theme switching
- Added theme toggle component
## Motivation
Users requested dark mode to reduce eye strain and improve accessibility.
## Related Issues
Fixes #42
development
Plan and drive non-trivial coding work from ambiguous request to scoped implementation and verification. Use when the user asks to plan before coding, plan then implement, split work into iterations or PR-sized tasks, tackle a risky multi-file feature, refactor, migration, or recover after failed work. Do not use for simple one-step edits, commit or PR creation, pure framework/domain conventions, or repo-specific roadmap docs where a more specific planning skill applies.
development
TypeScript coding conventions for writing, reviewing, and refactoring typed code. Use when working on `.ts`, `.tsx`, or files that embed TypeScript such as Vue, Astro, or Svelte components. Also use for TypeScript snippets, typed refactors, and review comments about code organization or function structure.
development
Write and maintain Vitest unit tests for TypeScript code. Use when the user needs unit coverage for utilities, services, or stores, or asks for Vitest-based tests with mocks, spies, and assertions.
development
Write and maintain Playwright end-to-end tests for web apps. Use when the user asks for browser or E2E coverage, or for tests covering pages, routes, redirects, navigation, dialogs, authentication, or multi-step user flows, even if they do not explicitly mention Playwright. Also use for API mocking, fixtures, and Playwright-specific assertions.