Code Review and Quality Assessment
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_e40a4360/code-review-and-quality.
About this skill
The Problem It Solves
Code review often degrades into a shallow pass-fail check: comments lack priority, authors cannot tell which feedback is mandatory, and large changes become hard to evaluate. AI-generated code is especially risky because it can look plausible while hiding edge-case, security, or performance problems. This skill turns review into a concrete quality gate. The goal is not perfect code, but a change that reliably improves overall code health without breaking conventions or introducing hidden debt.
How It Works
The skill evaluates changes across five axes:
- Correctness: whether behavior matches the requirement, and whether edge cases, error paths, race conditions, and state consistency are handled.
- Readability and simplicity: whether naming, control flow, module organization, and abstraction depth are understandable without the author explaining them.
- Architecture: whether module boundaries, dependency direction, duplication, and coupling fit the system design.
- Security: whether input validation, secrets handling, authorization, parameterized queries, output encoding, and untrusted external data are addressed.
- Performance: whether changes introduce
N+1queries, unbounded loops, blocking operations, missing pagination, or large allocations in hot paths.
The workflow starts by understanding intent, then reviews tests before implementation, then walks through the code using the five axes. Feedback is labeled by severity so authors can distinguish required fixes from optional suggestions. For example, Critical: blocks merge, Nit: is optional style feedback, and Optional: or Consider: is a suggestion. The skill also emphasizes small, focused changes, clear change descriptions, dependency discipline, dead-code hygiene, and a final verification checklist covering resolved critical issues, passing tests, successful build, and documented verification.
Boundaries and Caveats
This skill is best used before merging a PR, after implementing a feature, after refactoring, after bug fixes, and when reviewing code produced by another engineer or model. It is a review process and decision framework, not a substitute for project-specific architecture rules, security policies, or benchmark-driven performance requirements. When disagreement occurs, technical facts, style guides, and engineering principles should take precedence over personal preference. If the author has full context and disagrees with a suggestion, the review should focus on the code, not the person.
Use Cases
- Review a PR before merge by flagging required fixes and optional suggestions across correctness, security, and performance.
- After implementing a feature, check edge cases, error paths, and test coverage to decide readiness.
- Evaluate model-generated code against the requirement, authorization checks, SQL parameterization, and N+1 risks.
- After refactoring, list orphaned code and new dependencies, confirm before deletion to avoid silent changes.
Best For
- Backend engineers who need a consistent PR review checklist and severity-labeled feedback before merge.
- Software engineers maintaining AI workflows who need to evaluate model-generated code for correctness and security.
- Engineering leads who want review discussion to become an executable checklist and merge standard.
- Engineers doing refactors and bug fixes who need to check regression tests, dead code, and dependency changes.
Related Skills
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.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.