pr-change-analysis

Analyzes GitHub PR or local branch diffs for requirement scope, code quality, and style consistency.

29.5k|7.3k|Updated Feb 23, 2023
One-click install
npx skills add https://github.com/labring/FastGPT --skill pr-change-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-change-analysis
Source: https://github.com/labring/FastGPT/tree/main/.agents/skills/system/pr-change-analysis
Command: npx skills add https://github.com/labring/FastGPT --skill pr-change-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewers often struggle to quickly understand what a pull request or local branch actually changed, whether the changes exceed the stated requirement, and whether the code matches project conventions. This Skill reconstructs the requirement and implementation boundaries from the real diff, then flags scope creep, quality risks, and style inconsistencies.

Core Features & Use Cases

  • Requirement Reconstruction: Reads the actual diff against upstream/main to explain what changed, why it matters, and which modules are affected, rather than just restating the PR title.
  • Scope & Quality Review: Classifies changes as reasonable expansion, suspicious overreach, or high-risk overreach, and identifies missing tests, hardcoded logic, and untestable code placement.
  • Style Consistency Check: Compares changes against neighboring implementations, including FastGPT-specific rules like static i18n keys and parseApiInput contract boundaries.
  • Use Case: A reviewer receives a large FastGPT PR mixing a feature with unrelated refactoring. Invoke this Skill to get a structured Chinese report separating real behavior changes from noise, with file paths and line numbers for each issue.

Quick Start

Ask the assistant to use $pr-change-analysis to analyze a specific PR URL or the current local branch against upstream/main and produce a structured review report.

Frequently Asked Questions about pr-change-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a GitHub PR diff against the main branch?

Provide the PR URL or number, and the Skill uses gh pr view and gh pr checkout to fetch it, then compares upstream/main...HEAD as the review baseline. It reports requirement changes, scope, quality, and style issues with file paths.

How to analyze local branch changes before creating a pull request?

Run the Skill on your current branch without giving a PR. It fetches upstream main and uses git diff upstream/main...HEAD plus commit logs to build the same structured review report as for a PR.

Does this Skill automatically submit reviews or modify code?

No. It performs read-only inspection only and never submits reviews, approves, requests changes, pushes code, or modifies the working tree unless you explicitly ask for GitHub write operations.

What happens if I have uncommitted changes when checking out a PR?

The Skill runs git status --short before switching branches. If uncommitted changes exist, it explains the risk and lets you decide, never stashing, resetting, or overwriting your work on its own.

What are the limitations of diff-based PR analysis?

The analysis is grounded in the checked-out diff, so it cannot execute the code or verify runtime behavior. Test coverage gaps and unverified paths are explicitly listed as blind spots in the final report.