AgentSkillsCN

pr

当用户请求“创建拉取请求”、“打开 PR”、“/pr”或要求创建 GitHub 拉取请求时,应使用此技能。

SKILL.md
--- frontmatter
name: pr
description: This skill should be used when the user asks to "create a pull request", "open a PR", "/pr", or requests creating GitHub pull requests.
version: 1.0.0

Pull Request

Context

Run in parallel:

  • git status (never -uall)
  • git diff HEAD
  • Branch tracking status
  • git diff [base-branch]...HEAD and git log

Template Locations

  • .github/pull_request_template.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/PULL_REQUEST_TEMPLATE/
  • docs/pull_request_template.md
  • pull_request_template.md

Workflow

  1. Search for PR template
  2. Read template if found
  3. Review ALL commits (not just latest)
  4. Draft title (<70 chars) and body:
    • Use template structure if available
    • Otherwise: Summary + Test plan
  5. In parallel:
    • Create branch if needed
    • Push with -u if needed
    • Create PR with gh pr create using HEREDOC

Rules

  • Use PR template if available
  • Analyze ALL commits
  • Return PR URL
  • Use gh CLI