AgentSkillsCN

creating-pull-requests

当您需要创建拉取请求、撰写 PR 标题,或为评审准备分支时,可调用此技能。它为 PR 标题提供 Angular 常规提交格式,同时附带 GitHub CLI 命令,并就破坏性变更的标注方式给出了明确指导。

SKILL.md
--- frontmatter
name: creating-pull-requests
description: Use when creating pull requests, writing PR titles, or preparing branches for review. Provides Angular conventional commit format for PR titles, GitHub CLI commands, and guidelines for breaking change notation.
user-invocable: false

Creating Pull Requests

Overview

PR titles follow the same Angular conventional commit format as commits: <type>(<scope>): <description>. Use GitHub CLI (gh) for PR creation. Always write in English.

REQUIRED: Load skill committing-work for commit type reference and format details.

Quick Reference

bash
# Create PR with GitHub CLI
gh pr create --base main --head <branch> --title "<pr-title>" --body "<pr-body>"

# Create PR interactively
gh pr create

# Create draft PR
gh pr create --draft

PR Title Format

Same as commit messages: <type>(<scope>): <description>

  • Breaking changes: Add ! after type/scope (e.g., feat!: remove deprecated API)
  • Language: Always English
  • Length: Under 72 characters

PR Body Template

markdown
## Summary
Brief description of changes and motivation.

## Changes
- Change 1
- Change 2

## Testing
How the changes were tested.

## Breaking Changes (if applicable)
Description of breaking changes and migration path.

Examples

Good PR titles:

  • feat: add user authentication system
  • fix: resolve memory leak in rendering process
  • docs: update API documentation with new endpoints
  • feat(auth): implement transaction validation
  • fix!: patch critical security vulnerability

Common Mistakes

MistakeFix
Vague title: "Updates"Specific: feat: add user search functionality
Past tense: "Fixed bug"Imperative: fix: resolve null pointer exception
No type prefixAlways include type: docs: add setup guide
Non-English titleAlways use English