create-pull-request — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited create-pull-request (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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 --versionIf 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 statusIf not authenticated, guide the user to run gh auth login.
git statusIf there are uncommitted changes, ask the user whether to:
git branch --show-currentEnsure 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-decorateReview these commits to understand:
git diff origin/main..HEAD --statThis shows which files changed and helps identify the type of change.
Before creating the PR, you need the following information. Check if it can be inferred from:
fix/issue-123, feature/new-login)If any critical information is missing, use ask_followup_question to ask the user:
#123, fixes #123, or closes #123 in commit messagesIf the issue number is not found:
I couldn't find a related issue number in the commit messages or branch name. What GitHub issue does this PR address? (Enter the issue number, e.g., "123" or "N/A" for small fixes)
Before creating the PR, consider these best practices:
git fetch origin
git rebase origin/main git rebase -i origin/mainOnly suggest this if commits appear messy and the user is comfortable with rebasing.
Ensure all commits are pushed:
git push origin HEADIf the branch was rebased, you may need:
git push origin HEAD --force-with-leaseIMPORTANT: Read and use the PR template at .github/pull_request_template.md. The PR body format must strictly match the template structure. Do not deviate from the template format.
When filling out the template:
#XXXX with the actual issue number, or keep as #XXXX if no issue exists (for small fixes)Use a temporary file for the PR body to avoid shell escaping issues, newline problems, and other command-line flakiness:
/tmp/pr-body.md gh pr create --title "PR_TITLE" --body-file /tmp/pr-body.md --base main rm /tmp/pr-body.mdFor draft PRs:
gh pr create --title "PR_TITLE" --body-file /tmp/pr-body.md --base main --draftWhy use a file? Passing complex markdown with newlines, special characters, and checkboxes directly via --body is error-prone. The --body-file flag handles all content reliably.
After creating the PR:
gh pr edit --add-reviewer USERNAMEgh pr edit --add-label "bug"git push -u origin HEADgh pr viewBefore finalizing, ensure:
gh CLI is installed and authenticated~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.