github-pr-title

v2026.09.24

Craft PR titles using conventional commits format. Use when creating PRs or ensuring consistent PR naming. PR titles MUST follow conventional commits to drive release-please automation and maintain consistent git history.

GitHub
安装命令
npx skhub add laurigates/github-pr-title
Markdown
SKILL.md

GitHub PR Title

Craft clear PR titles using conventional commits format.

CRITICAL: PR titles must follow conventional commit format. This drives release-please version automation and ensures consistent git history when using squash-and-merge.

When to Use This Skill

Use this skill when...Use the alternative when...
Authoring a type(scope): subject PR title that drives release-please automationUse git-pr for the full PR creation workflow (body, labels, reviewers)
Renaming an existing PR title to fix release-please version-bump detectionUse git-commit-workflow to set the same conventions on commit messages
Selecting the right feat, fix, perf, refactor, chore type for a PRUse github-issue-writing for issue titles (different [Type] Component: format)
Validating PR title format before merge to maintain clean git historyUse git-commit to fix already-committed message formats locally

Format

<type>(<scope>): <subject>

See Conventional Commits Standards for comprehensive format guide.

Type Selection

TypeUse CaseVersion Bump
featNew featureMinor
fixBug fixPatch
perfPerformance improvementPatch
refactorCode restructure (no behavior change)None
docsDocumentation onlyNone
testTestsNone
buildBuild/depsNone
ciCI configNone
choreMaintenanceNone

Decision tree: Feature → feat | Bug → fix | Performance → perf | Restructure → refactor | Docs → docs | Everything else → chore

Scope

The scope is required. The Conventional Commits spec lets you omit it; this house convention does not (.claude/rules/conventional-commits.md), and a squash-merge lands the PR title as the commit on main. Use the component or plugin the change touches:

feat(auth): add OAuth support
fix(api): handle null response
docs(readme): update install steps
refactor(core): simplify error handling

Discover repo scopes:

gh pr list --state merged -L 30 --json title | jq -r '.[].title' | grep -oE '\([^)]+\)' | sort | uniq -c | sort -rn

Or from commits:

git log --format='%s' -n 50 | grep -oE '\([^)]+\)' | sort | uniq -c | sort -rn

Subject

  • Imperative mood: "add" not "adds" or "added"
  • Lowercase: Start with lowercase after colon
  • No period: Don't end with punctuation
  • Under 50 chars: Keep concise

Examples:

❌ Bad✅ Good
Added login buttonadd login button
Fixes the bug.fix null pointer in auth
Updateupdate dependencies
Resolved Performance Issuesimprove query performance

Breaking Changes

Append ! before colon:

feat(api)!: remove deprecated endpoints
fix!: require Node.js 18+
refactor(db)!: change schema format

Breaking changes trigger major version bumps.

Reverts

revert: feat(auth): add OAuth support

Quick Reference

ScenarioTemplate
Featurefeat(<scope>): add <what>
Bug fixfix(<scope>): resolve <what>
Performanceperf(<scope>): optimize <what>
Docsdocs(<scope>): update <what>
Refactorrefactor(<scope>): simplify <what>
Depsbuild(deps): bump <pkg> to <ver>
Breakingfeat(<scope>)!: change <what>

Why This Matters

Conventional commit PR titles ensure:

  1. Accurate automation - release-please reads PR titles to determine version bumps
  2. Clean git history - squash-and-merge uses PR title as commit message
  3. Searchable commits - type prefix makes filtering easy
  4. CHANGELOG accuracy - commits are grouped by type in generated changelogs

Agentic Optimizations

ContextCommand
Get commitsgit log origin/main..HEAD --format='%s' -n 10
Changed dirsgit diff origin/main..HEAD --name-only | xargs dirname | sort -u
Update titlegh pr edit N --title "new title"
Discover scopesgh pr list --state merged -L 30 --json title | jq -r '.[].title' | grep -oE '\([^)]+\)' | sort | uniq

Reference

For detailed rules, patterns, and troubleshooting, see Conventional Commits Standards.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

MIT

源路径

git-plugin/skills/github-pr-title

默认分支

main

最新提交

1668324

Tree SHA

b2d4cc3