create-pull-request/SKILL.md
Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, and PR creation using the gh CLI tool.
npx skillsauth add run6270/skill create-pull-requestInstall 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.
This skill guides you through creating a well-structured GitHub pull request that follows project conventions and best practices.
Before proceeding, verify the following:
gh CLI is installedgh --version
If not installed, inform the user:
The GitHub CLI (
gh) is required but not installed. Please install it:
- macOS:
brew install gh- Other: https://cli.github.com/
gh auth status
If not authenticated, guide the user to run gh auth login.
Before creating a PR, check if any skills are available that relate to code review, CI, or testing. These should be invoked first as prerequisites.
Look for skills with descriptions containing:
If such skills exist, invoke them before proceeding with PR creation. For example:
ci-fix skill exists and CI is failing, use it to diagnose and fix issuesweb-design-guidelines skill exists for UI changes, use it to review the changesOnly proceed with PR creation after these prerequisite skills have been satisfied.
git status
If there are uncommitted changes, ask the user whether to:
Before gathering context, check if a PR already exists for the current branch:
gh pr list --head $(git branch --show-current) --json number,title,url
If a PR already exists:
gh pr viewOnly proceed with creating a new PR if no PR exists for this branch.
git branch --show-current
Ensure you're not on main or master. If so, ask the user to create or switch to a feature branch.
git remote show origin | grep "HEAD branch"
This is typically main or master.
git log origin/main..HEAD --oneline --no-decorate
Review these commits to understand:
git diff origin/main..HEAD --stat
This shows which files changed and helps identify the type of change.
Gather the following information from available context (commit messages, branch names, changed files):
Related Issue Number: Look for patterns like #123, fixes #123, or closes #123 in:
fix/issue-123, feature/123-new-login)Description: What problem does this solve? Why were these changes made?
Type of Change: Bug fix, new feature, breaking change, refactor, cosmetic, documentation, or workflow
Test Procedure: How was this tested? What could break?
The PR title should be descriptive and meaningful. Avoid generic titles like:
Instead, create a title that clearly summarizes the changes. Consider these approaches:
Check if the project uses conventional commits by analyzing:
feat:, fix:, docs:, refactor:, test:, chore:feat/, fix/, docs/If conventional commits are detected, use the appropriate prefix for the PR title:
feat: Add user authentication with OAuthfix: Resolve memory leak in data processingdocs: Update API documentation for v2 endpointsrefactor: Simplify error handling logictest: Add integration tests for payment flowchore: Update dependencies to latest versionsInclude issue number if found:
feat: Add user authentication with OAuth (#123)fix(auth): Resolve memory leak in data processing (fixes #456)If not using conventional commits, create a clear, action-oriented title:
Include issue number if found:
Before creating the PR, consider these best practices:
Rebase on latest main (if needed):
git fetch origin
git rebase origin/main
Squash if appropriate: If there are many small "WIP" commits, consider interactive rebase:
git rebase -i origin/main
Only suggest this if commits appear messy and the user is comfortable with rebasing.
Ensure all commits are pushed:
git push origin HEAD
If the branch was rebased, you may need:
git push origin HEAD --force-with-lease
IMPORTANT: Read and use the PR template at .github/pull_request_template.md if it exists. The PR body format should match the template structure.
When filling out the template:
Fixes #123, Closes #456) if found in contextDecide whether to create a draft PR or a regular PR based on the following:
Use --draft flag when:
Use regular PR (no --draft) when:
For a regular PR:
gh pr create --title "PR_TITLE" --body "PR_BODY" --base main
For a draft PR:
gh pr create --title "PR_TITLE" --body "PR_BODY" --base main --draft
After creating the PR:
Immediately open the PR in the browser to verify it was created correctly:
gh pr view --web
This allows you to:
Tests and linting will run automatically. Monitor the checks to ensure they pass.
gh pr edit --add-reviewer USERNAMEgh pr edit --add-label "bug"No commits ahead of main: The branch has no changes to submit
Branch not pushed: Remote doesn't have the branch
git push -u origin HEADPR already exists: A PR for this branch already exists
gh pr viewMerge conflicts: Branch conflicts with base
Before finalizing, ensure:
gh CLI is installed and authenticateddocumentation
Provide a lookup index of dbt models (BigQuery tables) to guide query writing against a data warehouse. Use when you need to query, analyze, or look up data in a dbt-powered data warehouse, or when resolving a vague data question into the right BigQuery tables to query.
development
Evidence-first academic integrity auditing and public-interest science storytelling distilled from the full Bilibili video corpus of 耿同学讲故事 plus public interviews. Use when investigating suspected paper/data/image/academic-identity problems, evaluating biomedical or health-tech claims, drafting official complaint memos, or writing rigorous Chinese public-interest scripts with explicit evidence boundaries.
testing
Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.
tools
[OMX] Configure OMX notifications - unified entry point for all platforms