Code Review: Structured CR Based on Requirement Documents and Branch Diffs

Introduction

A common practice before merging is to conduct a code review, usually by manually scanning the diff and cross-referencing requirement or design documents to ensure business alignment. However, documents are often located in Confluence, Word, or outside the repository (e.g., in ./review/), while diffs reside in Git. Switching back and forth between these sources makes it easy to overlook issues related to boundary conditions, concurrency, or security. The following introduces the “Code Review” Skill on SkillHub: once triggered via natural language within an Agent, it proactively reads design documents, compares the differences between the current branch and Master, and outputs a review report based on fixed dimensions.

What is this

“Code Review” is an Agent Skill listed on SkillHub by community publisher user_c19c8ed5. Its coordinates are @user_c19c8ed5/awesome-code-review, current version 1.0.0, categorized under dev-programming, and sourced from the community. The page tags indicate requires_api_key=false, meaning installing this Skill does not rely on any additional API Key.

It is designed for scenarios requiring “deep code reviews with unified report structures.” Rather than merely listing changed files, it combines requirement documents found in the repository’s ./review/ directory with Git diffs between the current branch and Master. It provides structured conclusions from the perspectives of business logic, architecture and security, and concurrency and performance, explicitly referencing the review standards of the Alibaba Java Coding Guidelines (as stated in the Skill description).

Core Features

The following capabilities are derived from the official SkillHub introduction and page descriptions; details not appearing in the source material are not expanded upon here.

  1. Trigger Method
    Activated when the user expresses intent to “code review,” “CR,” review code, analyze branch differences, or view changes.

  2. Read Design / Requirement Documents
    Proactively loads documents from ./review/ in the project root directory, supporting formats such as .docx and .md (subject to the introduction).

  3. Git Branch Comparison
    Analyzes the differences between the current branch and Master as input for the review.

  4. Deep Review Dimensions
    Promises coverage in the introduction of: business logic, architecture and security, concurrency and performance; review standards align with the Alibaba Java Coding Guidelines.

  5. Output Format
    Generates a structured review report, facilitating archiving or pasting into MR/PR discussions.

Installation and Activation

SkillHub provides two common installation paths: delegating the installation instructions to an AI to execute, or using the skillhub CLI to install to the current Agent’s skills directory. During installation, you must use --dir to point to the skills directory recognized by your current client; otherwise, defaulting to ./skills/ may result in the Agent failing to load the skill.

Method 1: Delegate Prompt to AI

Send the following sentence to an AI that supports the SkillHub installation flow (installation steps are subject to official documentation):

Please install `@user_c19c8ed5/awesome-code-review` according to https://skillhub.cn/install/skillhub.md.

Method 2: skillhub CLI

First, confirm if the CLI is installed on your local machine (excerpted from SkillHub Installation Documentation):

command -v skillhub && skillhub --version

If not installed, follow the official documentation to perform a full installation or install only the CLI. Once installed, install this Skill, replacing --dir with the path for your current environment. For example, the common directory for Cursor is ~/.cursor/skills/:

skillhub install @user_c19c8ed5/awesome-code-review --dir ~/.cursor/skills/

The same documentation lists paths for Claude Code (~/.claude/skills/), Codex (~/.codex/skills/ or .agents/skills/ under the project), etc. Other clients should map accordingly based on the “Common AI Client Skills Paths” in the documentation. If the Agent does not immediately recognize the new Skill after installation, restart or refresh the skill list as required by your client.

Typical Usage

There is no separate “one-click example repository” in the materials, but the workflow described in the introduction can be reproduced step-by-step.

  1. Prepare Requirement Documents
    Create a review/ directory in the repository root and place relevant .md or .docx requirement and design specifications for the current change.

  2. Develop on a Feature Branch
    Ensure a local Git repository has a Master baseline branch, and that you are currently working on the feature branch pending review.

  3. Initiate Review in Agent
    Simply describe your intent in natural language, for example:

    Please perform a code CR on the current branch, compare it with Master, and output a structured review report based on the requirement documents in the review directory.
  1. Read the Report
    Based on the items regarding business logic, architecture security, and concurrency performance in the report, return to the code to modify or supplement tests, and repeat the review as needed.

Use Cases and Notes

Who is it for

  • Java or backend teams following the Alibaba Java Coding Guidelines who want an additional layer of “document + diff” linked checking before MRs.
  • Developers working daily in environments supporting Skills (like Cursor, Claude Code, Codex) who wish to trigger CRs using a unified set of instructions.

Notes on Usage

  • Review quality depends on the completeness of ./review/ documents and whether the Git comparison against Master reflects the actual merge scope; missing documents or incorrect branch baselines may lead to irrelevant or empty conclusions.
  • The Skill is sourced from the community. Specific check items and report templates are subject to the installed SKILL.md; this article only summarizes the public descriptions on the SkillHub page.
  • SkillHub page statistics (as of crawling): Rating 100000, Downloads 2130; if inconsistent with other numbers reposted by third parties, SkillHub takes precedence.

Conclusion

“Code Review” connects the requirement document directory, Master branch diffs, and structured reports into a single Agent workflow, making it suitable for conducting a methodical round of CR before merging. Refer to SkillHub for installation and coordinates:

  • Skill Page: https://www.skillhub.cn/skills/user_c19c8ed5/awesome-code-review
  • API Entry: https://api.skillhub.cn/user_c19c8ed5/awesome-code-review
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye