Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

code-quality-review代码质量审查

Agent Skill

code-quality-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

238

周安装

10

GitHub Stars

265

下载量

83
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-quality-review(代码质量审查)
来源仓库:https://github.com/rsmdt/the-startup
仓库路径:skills/code-quality-review
安装命令:
npx skills add https://github.com/rsmdt/the-startup --skill code-quality-review
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rsmdt/the-startup --skill code-quality-review

简介

code-quality-review 建立六维审查模型:正确性、性能、可读性等,提供建设性反馈框架。

  • 适用于 Pull Request 评审、技术债务优先级排序与开发者能力培养。
  • 每项评价均附带具体问题与改进建议,避免模糊指责与主观判断。
  • 支持建立团队评审标准与自动化规则,提升审查效率与一致性。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Code Quality Review Methodology

Systematic patterns for reviewing code and providing constructive, actionable feedback that improves both code quality and developer skills.

When to Activate

  • Reviewing pull requests or merge requests
  • Assessing overall codebase quality
  • Identifying and prioritizing technical debt
  • Mentoring developers through code review
  • Establishing code review standards for teams
  • Auditing code for security or compliance

Review Dimensions

Every code review should evaluate these six dimensions:

1. Correctness

Does the code work as intended?

CheckQuestions
FunctionalityDoes it solve the stated problem?
Edge CasesAre boundary conditions handled?
Error HandlingAre failures gracefully managed?
Data ValidationAre inputs validated at boundaries?
Null SafetyAre null/undefined cases covered?

2. Design

Is the code well-structured?

CheckQuestions
Single ResponsibilityDoes each function/class do one thing?
Abstraction LevelIs complexity hidden appropriately?
CouplingAre dependencies minimized?
CohesionDo related things stay together?
ExtensibilityCan it be modified without major changes?

3. Readability

Can others understand this code?

CheckQuestions
NamingDo names reveal intent?
CommentsIs the "why" explained, not the "what"?
FormattingIs style consistent?
ComplexityIs cyclomatic complexity reasonable (<10)?
FlowIs control flow straightforward?

4. Security

Is the code secure?

CheckQuestions
Input ValidationAre all inputs sanitized?
AuthenticationAre auth checks present where needed?
AuthorizationAre permissions verified?
Data ExposureIs sensitive data protected?
DependenciesAre there known vulnerabilities?

5. Performance

Is the code efficient?

CheckQuestions
AlgorithmicIs time complexity appropriate?
MemoryAre allocations reasonable?
I/OAre database/network calls optimized?
CachingIs caching used where beneficial?
ConcurrencyAre race conditions avoided?

6. Testability

Can this code be tested?

CheckQuestions
Test CoverageAre critical paths tested?
Test QualityDo tests verify behavior, not implementation?
MockingAre external dependencies mockable?
DeterminismAre tests reliable and repeatable?
Edge CasesAre boundary conditions tested?

Anti-Pattern Catalog

Common code smells and their remediation:

Method-Level Anti-Patterns

Anti-PatternDetection SignsRemediation
Long Method>20 lines, multiple responsibilitiesExtract Method
Long Parameter List>3-4 parametersIntroduce Parameter Object
Duplicate CodeCopy-paste patternsExtract Method, Template Method
Complex ConditionalsNested if/else, switch statementsDecompose Conditional, Strategy Pattern
Magic NumbersHardcoded values without contextExtract Constant
Dead CodeUnreachable or unused codeDelete it

Class-Level Anti-Patterns

Anti-PatternDetection SignsRemediation
God Object>500 lines, many responsibilitiesExtract Class
Data ClassOnly getters/setters, no behaviorMove behavior to class
Feature EnvyMethod uses another class's data extensivelyMove Method
Inappropriate IntimacyClasses know too much about each otherMove Method, Extract Class
Refused BequestSubclass doesn't use inherited behaviorReplace Inheritance with Delegation
Lazy ClassDoes too little to justify existenceInline Class

Architecture-Level Anti-Patterns

Anti-PatternDetection SignsRemediation
Circular DependenciesA depends on B depends on ADependency Inversion
Shotgun SurgeryOne change requires many file editsMove Method, Extract Class
Leaky AbstractionImplementation details exposedEncapsulate
Premature OptimizationComplex code for unproven performanceSimplify, measure first
Over-EngineeringAbstractions for hypothetical requirementsYAGNI - simplify

Review Prioritization

Focus review effort where it matters most:

Priority 1: Critical (Must Fix)

  • Security vulnerabilities (injection, auth bypass)
  • Data loss or corruption risks
  • Breaking changes to public APIs
  • Production stability risks

Priority 2: High (Should Fix)

  • Logic errors affecting functionality
  • Performance issues in hot paths
  • Missing error handling for likely failures
  • Violation of architectural principles

Priority 3: Medium (Consider Fixing)

  • Code duplication
  • Missing tests for new code
  • Naming that reduces clarity
  • Overly complex conditionals

Priority 4: Low (Nice to Have)

  • Style inconsistencies
  • Minor optimization opportunities
  • Documentation improvements
  • Refactoring suggestions

Constructive Feedback Patterns

The Feedback Formula

[Observation] + [Why it matters] + [Suggestion] + [Example if helpful]

Good Feedback Examples

# Instead of:
"This is wrong"

# Say:
"This query runs inside a loop (line 45), which could cause N+1
performance issues as the dataset grows. Consider using a batch
query before the loop:

users = User.query.filter(User.id.in_(user_ids)).all() user_map = {u.id: u for u in users}


"
# Instead of:
"Use better names"

# Say:
"The variable `d` on line 23 would be clearer as `daysSinceLastLogin` -
it helps readers understand the business logic without tracing back
to the assignment."

Feedback Tone Guide

AvoidPrefer
"You should...""Consider..." or "What about..."
"This is wrong""This might cause issues because..."
"Why didn't you...""Have you considered..."
"Obviously...""One approach is..."
"Always/Never do X""In this context, X would help because..."

Positive Observations

Include what's done well:

"Nice use of the Strategy pattern here - it makes adding new
payment methods straightforward."

"Good error handling - the retry logic with exponential backoff
is exactly what we need for this flaky API."

"Clean separation of concerns between the validation and persistence logic."

Review Checklists

Quick Review Checklist (< 100 lines)

  • Code compiles and tests pass
  • Logic appears correct for stated purpose
  • No obvious security issues
  • Naming is clear
  • No magic numbers or strings

Standard Review Checklist (100-500 lines)

All of the above, plus:

  • Design follows project patterns
  • Error handling is appropriate
  • Tests cover new functionality
  • No significant duplication
  • Performance is reasonable

Deep Review Checklist (> 500 lines or critical)

All of the above, plus:

  • Architecture aligns with system design
  • Security implications considered
  • Backward compatibility maintained
  • Documentation updated
  • Migration/rollback plan if needed

Review Workflow

Before Reviewing

  1. Understand the context (ticket, discussion, requirements)
  2. Check if CI passes (don't review failing code)
  3. Estimate review complexity and allocate time

During Review

  1. First pass: Understand the overall change
  2. Second pass: Check correctness and design
  3. Third pass: Look for edge cases and security
  4. Document findings as you go

After Review

  1. Summarize overall impression
  2. Clearly indicate approval status
  3. Distinguish blocking vs non-blocking feedback
  4. Offer to discuss complex suggestions

Review Metrics

Track review effectiveness:

MetricTargetWhat It Indicates
Review Turnaround< 24 hoursTeam velocity
Comments per Review3-10Engagement level
Defects FoundDecreasing trendQuality improvement
Review Time< 60 min for typical PRRight-sized changes
Approval Rate70-90% first submissionClear standards

Anti-Patterns in Reviewing

Avoid these review behaviors:

Anti-PatternDescriptionBetter Approach
NitpickingFocusing on style over substanceUse linters for style
Drive-by ReviewQuick approval without depthAllocate proper time
GatekeepingBlocking for personal preferencesFocus on objective criteria
Ghost ReviewApproval without commentsAdd at least one observation
Review BombingOverwhelming with commentsPrioritize and limit to top issues
Delayed ReviewLetting PRs sit for daysCommit to turnaround time

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.78%
按下载量换算26

windsurf

20.67%
按下载量换算17

OpenCode

19.56%
按下载量换算16

Codex

13.48%
按下载量换算11

Gemini CLI

8.29%
按下载量换算7

trae

3.45%
按下载量换算3

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills