Code Review
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @user_c19c8ed5/awesome-code-review.
About this skill
The Review Gap
Many code reviews get stuck on naming, formatting, and line-level style, while missing the issues that actually cause production incidents: business logic drift, missing exception compensation, broken state machines, and concurrency or transaction hazards. This skill focuses Git branch changes on three priorities: consistency between implementation and design, correctness and simplicity of logic, and core architecture and concurrency safety. It first reads requirements or design documents from ./review/, then compares changed files against origin/master...HEAD, so the review does not rely only on diff fragments.
How It Works
The workflow includes:
- Environment check: run git fetch origin master --depth=1, git branch --show-current, and git --no-pager diff --name-status origin/master...HEAD to identify the current branch and changed files; when more than 20 files change, it suggests prioritizing core business paths.
- Context loading: scan ./review/ for .md, .docx, and other design documents; use docx-reader or read_docx.py to extract text and images from .docx files, helping clarify flows, state machines, and constraints.
- Deep review: read full method context for complex changes, cross-check whether code matches design documents, whether exception branches are complete, and whether overly complex logic can be simplified.
- Report output: write ./review/review_[branch].md, replacing / in branch names with _; the report covers business summary, risk assessment, core hazards, logic simplification, positive findings, and open questions.
Scope and Caveats
It works best for business code with clear requirements, high-level design, or state machine notes. If no documents are present, the skill should mark the result as code-only inference, which lowers confidence. It deliberately de-emphasizes formatting, naming, and comment style. For changes that depend heavily on runtime environment, external systems, or legacy constraints, tests and operational context are still required.
Use Cases
- Review a branch that changes order state machines or compensation logic against a .md design document.
- Triage a 20+ file change, prioritize core business paths, and produce a risk summary before review.
- Find redundant calls or overdesign in working code and propose simpler implementations with positive notes.
- Archive a uniform MR review report to ./review/review_branch.md with slash branch names normalized.
Best For
- Backend engineers who need MR reviews focused on state machines, exception paths, and transaction consistency.
- Architects who need to spot concurrency, cache, and large-transaction risks before merge.
- Developers taking over legacy modules who need to verify branch changes against design intent.
- Tech leads who need archived reports covering risks, open questions, and positive findings.
Related Skills
Guides Java Spring Boot backend development across REST APIs, data access, security, microservices, testing, deployment, and troubleshooting.
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Restores Lanhu designs to target framework code using schema JSON, design tokens, and image assets.
Automatically detects engineering or competition code, analyzes bugs, vulnerabilities, algorithm complexity, and edge cases, then produces risk-level findings with before/after fixes.