From dev-skills
Use when the user asks to generate, write, draft, refresh, retitle, or align a GitHub Pull Request title or description for the current branch — including phrasings like "write the PR description", "update the PR", "summarize this branch for review", "match our PR template", or "regenerate the body". Analyzes `git diff` against the base branch (final state, not commit history) so added-then-removed work is omitted and fabrication is avoided. Skip for changelogs, release notes, issue comment summaries, or open-ended code review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-skills:pr-genThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate or update a GitHub PR title and description from the **final state** of
Generate or update a GitHub PR title and description from the final state of
the current branch (git diff "$base"...HEAD), not from commit history.
HEAD, not history. If a change was added then removed, it does
not exist — do not mention it.git show HEAD:<path> | grep … for every
feature, file, symbol, or test you plan to reference..github/PULL_REQUEST_TEMPLATE.md or
CONTRIBUTING.md exist, follow them exactly — they win over this skill's
templates.HEAD.branch=$(git branch --show-current)
base=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main)
pr=$(gh pr view --json number,state 2>/dev/null)
If a PR exists and its state is not OPEN, stop and ask the user whether to
(1) create a new PR, (2) edit the closed/merged one anyway, or (3) cancel.
Re-check the state again immediately before gh pr edit (TOCTOU window).
git diff "$base"...HEAD --stat
git diff "$base"...HEAD --name-only | cut -d/ -f1 | sort -u
git log "$base"..HEAD --oneline # context only — not the source of truth
For every feature, file, or symbol you plan to mention:
git show HEAD:<path> | grep -n '<symbol-or-feature>'
for f in .github/PULL_REQUEST_TEMPLATE.md .github/pull_request_template.md \
PULL_REQUEST_TEMPLATE.md CONTRIBUTING.md; do
[ -f "$f" ] && { echo "# $f"; cat "$f"; }
done
A repo template wins on structure. CONTRIBUTING.md may add required sections
(performance repro steps, spec updates, security statements, …).
Pick exactly one: bugfix, feature, refactor, infra, docs.
If classified bugfix, the branch MUST contain all of:
git diff "$base"...HEAD -- '**/*test*' '**/tests/**' '**/*_test.*' '**/*.spec.*'
If anything required is missing, stop and list the gaps. Do not generate.
| Classification | Template |
|---|---|
| bugfix | assets/templates/bugfix.md |
| feature, refactor, docs | assets/templates/feature.md |
| large infra only | assets/templates/infrastructure.md |
Read only the template you picked. The bugfix template is prescriptive (four required sections, in order); the feature and infrastructure templates are defaults — drop sections that don't apply rather than padding them.
Default shape: <type>(<scope>): <imperative summary> (e.g.
fix(auth): restore retry-safe WOTS keypair generation,
feat(api): add idempotent webhook delivery).
Under 72 characters; imperative mood; describes the outcome, not the process.
If the repo's existing PRs and CONTRIBUTING.md use a different convention
(plain prose, ticket-prefix, etc.), match it. Load
references/title-patterns.md only when the
repo lacks an established convention and you need fallback shapes.
[file.ts](src/file.ts) or
[file.ts:42](src/file.ts#L42).git show HEAD:… confirmed.## Background / ## Implementation Details unless something is
genuinely non-obvious — link the issue or design doc instead.Co-Authored-By: footers; that
belongs in commit metadata, not PR bodies.If you need worked examples of how to verify scope and link files, load references/analysis-workflow.md.
Re-check PR state, then:
gh pr edit "$pr_number" \
--title "$title" \
--body "$(cat <<'EOF'
<description>
EOF
)"
gh pr view "$pr_number"
If no PR exists, use gh pr create --base "$base" with the same --title and
--body.
git log $base..HEAD shows commits, including ones whose changes were later
reverted. Use git diff $base...HEAD for what's actually shipping.gh pr view outside a PR-linked branch exits non-zero — capture stderr or
|| echo … so the script keeps going..github/PULL_REQUEST_TEMPLATE.md may be lowercase, uppercase, plural
(pull_request_template/), or live in docs/. Check all four.HEAD.Co-Authored-By: footers in the body.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub sebastianelvis/dev-skills --plugin dev-skills