gh-pr

star 240

This skill should be used when creating a GitHub pull request via `gh pr create`. Defines PR body format with Why/What/Notes sections and ensures proper assignment.

fredrikaverpil By fredrikaverpil schedule Updated 6/13/2026

name: gh-pr description: >- This skill should be used when creating a GitHub pull request via gh pr create. Defines PR body format with Why/What/Notes sections and ensures proper assignment.

GitHub Pull Request Creation

When creating a pull request, use the gh CLI with the following format and conventions.

  • Always create draft PRs.
  • Keep PR titles, descriptions, and comments concise and clear.
  • Include only useful information. Remove redundancy and over-explanation.
  • Prefer explicitness and clarity over verbosity.
  • Express Why/What/Notes content as concise, to-the-point bullet lists. Avoid prose paragraphs.
  • Include a small, illustrative code snippet whenever it conveys the change faster than prose. This is desired for PRs in general, and especially for bug fixes: a minimal example of the triggering case (and what went wrong) makes the problem concrete for reviewers. Keep it short — just enough to convey the point, not a full reproduction.

PR title format

Write the title as if the whole PR was squashed into a single commit using conventional commits.

PR Body Format

## Why?

[Explain the motivation for this change. What problem does it solve?]

## What?

[Describe what was changed. List the key modifications.]

## Notes

[Optional. Additional context, testing notes, or follow-up items.]

Command Template

gh pr create --draft --assignee @me --title "<title>" --body "$(cat <<'EOF'
## Why?

<motivation>

## What?

<changes>

## Notes

<optional notes>
EOF
)"

File References

Use [file:lineno](url) with SHA-pinned URLs: https://github.com/<owner>/<repo>/blob/<sha>/<path>#L<lineno>

  • SHA: git rev-parse HEAD
  • Repo: gh repo view --json nameWithOwner -q .nameWithOwner

Rules

  1. Always assign PR to @me using --assignee @me
  2. ## Why? - Required. Explain motivation and problem being solved
  3. ## What? - Required. Describe the changes made
  4. ## Notes - Optional. Omit entirely if no notes are needed
  5. Use imperative mood in title (e.g., "Add feature" not "Added feature")
  6. Keep title concise and descriptive
  7. When referencing files, always use [file:lineno](url) format with SHA-pinned URLs

Example

gh pr create --draft --assignee @me --title "Add user authentication" --body "$(cat <<'EOF'
## Why?

Users need secure access to their accounts. Currently there is no
authentication mechanism in place.

## What?

- Add login/logout endpoints
- Implement JWT token generation
- Add password hashing with bcrypt
- Create auth middleware for protected routes

## Notes

Requires `JWT_SECRET` env variable to be set in production.
EOF
)"
Install via CLI
npx skills add https://github.com/fredrikaverpil/dotfiles --skill gh-pr
Repository Details
star Stars 240
call_split Forks 7
navigation Branch main
article Path SKILL.md
More from Creator
fredrikaverpil
fredrikaverpil Explore all skills →