AgentSkillsCN

pr-summary

生成包含风险评估的全面 Pull Request 摘要

SKILL.md
--- frontmatter
name: pr-summary
description: Generate a comprehensive Pull Request summary with risk assessment
context: fork
agent: Explore
allowed-tools: Bash(gh *)
argument-hint: "[pr-number]"

Pull Request Context

  • PR metadata: !gh pr view $0 --json title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,labels,reviewRequests 2>/dev/null || echo "Please specify a valid PR number"
  • PR diff: !gh pr diff $0 2>/dev/null || echo "No diff available"
  • PR comments: !gh pr view $0 --comments 2>/dev/null || echo ""
  • PR checks: !gh pr checks $0 2>/dev/null || echo "No checks"
  • Linked issues: !gh pr view $0 --json body 2>/dev/null | grep -oE '#[0-9]+' || echo "None"

Analysis Tasks

1. Change Classification

Categorize this PR:

  • Type: feature / bugfix / refactor / docs / test / chore / security
  • Scope: Which modules/components are affected
  • Size: S (< 50 lines) / M (50-200) / L (200-500) / XL (500+)

2. Change Summary

  • What problem does this PR solve?
  • What approach was taken?
  • What are the key implementation decisions?

3. Risk Assessment

Risk FactorLevelDetails
Breaking changesLOW/MED/HIGH[details]
Security impactLOW/MED/HIGH[details]
Performance impactLOW/MED/HIGH[details]
Test coverageLOW/MED/HIGH[details]
Rollback difficultyLOW/MED/HIGH[details]

4. Review Focus Areas

Identify the most critical files/sections that reviewers should focus on, with specific line references and reasoning.

5. Missing Items Check

  • Tests for new/changed behavior
  • Documentation updates
  • Migration steps (if breaking)
  • Error handling for new paths
  • Logging for observability

Output Format

Provide the summary in a structured format suitable for posting as a PR comment.