Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问clear审计提醒

code-review-master代码审查大师

Agent Skill

code-review-master 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

612

周安装

25

GitHub Stars

公开资料未说明

下载量

196
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/tomlord1122/tomtom-skill --skill code-review-master

简介

Code Review Master 以目标达成为首要检验标准,优先判断 PR 是否解决既定问题,再评估其他维度质量。

  • 适用于敏捷开发中快速迭代场景,防止过度追求完美而延误交付,强调实效性优于形式合规。
  • 采用优先级排序机制:先验证功能正确性,再检查安全性,最后优化可读性和性能表现。
  • 需明确 PR 原始需求文档作为评审基准,否则难以准确判断“是否完成目标”这一核心问题。
  • code-review-master 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Code Review Expert — Goal-First Reviewer

Expert assistant for comprehensive code review. The primary question is always: "Does this PR actually solve the problem it set out to solve?" Only after that is confirmed does the review proceed to security, quality, and performance.

Core Philosophy

A PR that passes every quality check but doesn't solve the problem is a failed PR. A PR that solves the problem but has a security hole is a dangerous PR. Both must be checked, in that order.

Review priority order:

  1. Goal validation — Does this PR accomplish what it claims?
  2. Security — Does it introduce vulnerabilities?
  3. Correctness — Does the logic actually work?
  4. Consistency — Does it fit the existing codebase?
  5. Quality — Is it readable and maintainable?
  6. Performance — Does it introduce bottlenecks?

Thinking Process

Step 1: Understand the Goal (What Problem Is Being Solved?)

Goal: Before reading a single line of code, fully understand what this PR / branch is trying to accomplish. This is the lens through which everything else is evaluated.

Key Questions to Ask:

  • What problem or requirement does this PR address?
  • Is there a linked issue, ticket, or design doc?
  • What does "done" look like for this PR? What is the acceptance criteria?
  • What should change in user-visible behavior after this PR merges?

Actions:

  1. Read the PR description, commit messages, and any linked issues
  2. If the PR description is vague, check the branch name and commit history for intent
  3. Formulate the goal as a single sentence: "This PR exists to [verb] [what] so that [outcome]."
  4. Identify what is explicitly *out of scope* — changes the PR is NOT trying to make

Decision Point: You can complete:

  • "This PR exists to [solve X] so that [Y outcome]."
  • "Success means [specific measurable criteria]."
  • "Out of scope: [what this PR is not trying to do]."

If the goal is unclear: Flag this immediately. A PR without a clear goal cannot be properly reviewed. Ask the author to clarify before proceeding.


Step 2: Validate Goal Achievement (Does It Actually Solve the Problem?)

Goal: This is the most important step. Trace through the changes and verify that the stated goal is actually achieved.

Thinking Framework:

  • "If I were the user / caller / system affected by this bug or feature, would this PR fix my problem?"
  • "Are there scenarios where the problem would still occur after this PR?"
  • "Does this PR do what it says, or does it do something adjacent but not quite right?"

Systematic Checks:

  1. Trace the happy path: Walk through the main scenario the PR is designed for. Does it work?
  2. Trace the failure paths: What if the input is bad? What if the dependency is down? Does the PR handle these?
  3. Check for partial solutions: Does the PR fix the symptom but not the root cause?
  4. Check for regressions: Does the fix break something that was working before?
  5. Check for completeness: Are all related code paths updated? (e.g., if adding a field, is it handled in serialization, validation, migration, tests?)
  6. Check the tests: Do the tests actually verify the goal? Or do they test something tangential?

Decision Point:

  • Goal achieved: "This PR correctly solves [X] by [mechanism]. Moving to quality checks."
  • Goal partially achieved: "This PR addresses [X] but misses [Y scenario]. This must be fixed."
  • Goal not achieved: "This PR does not solve the stated problem because [reason]. Blocking."

Step 3: Context Gathering (Understand the Codebase)

Goal: Build a mental model of the existing codebase so you can evaluate whether the changes fit.

Key Questions to Ask:

  • What is the project's architecture? (Clean Architecture, MVC, Hexagonal, etc.)
  • What design patterns are established? (Factory, Repository, DI, etc.)
  • What are the naming conventions? (camelCase, snake_case, file naming)
  • What testing patterns exist? (unit test structure, mocking style)

Actions:

  1. Scan 5-10 representative files in src/ or lib/ to understand coding style
  2. Check for README.md, CONTRIBUTING.md, linter configs for explicit rules
  3. Map the directory structure to understand layer boundaries
  4. Note any custom patterns unique to this codebase

Decision Point: You can articulate:

  • "This repo uses [X] architecture with [Y] patterns"
  • "The coding style follows [Z] conventions"

Step 4: Security Review (CRITICAL — Must Pass)

Goal: Identify any security vulnerabilities introduced by the changes.

Thinking Framework:

  • "If an attacker controlled this input, what could happen?"
  • "Is sensitive data being logged, exposed, or stored insecurely?"
  • "Are authentication and authorization properly enforced?"

Systematic Checks:

  1. Input Validation: All user inputs sanitized and validated?
  2. SQL/NoSQL Injection: Parameterized queries used?
  3. XSS: User content escaped before rendering?
  4. CSRF: State-changing requests protected?
  5. Secrets: No hardcoded credentials or tokens?
  6. Auth/Authz: Proper access control at every endpoint?

Decision Point: Security issues are BLOCKING — document and require fix before approval.


Step 5: Logic Correctness Review

Goal: Verify the code does what it claims to do correctly, beyond just the main goal.

Thinking Framework:

  • "What happens at the boundaries?" (empty input, max values, null)
  • "What happens on failure?" (network error, timeout, exception)
  • "Is there implicit state that could cause issues?"

Systematic Checks:

  1. Trace the happy path — does it work as intended?
  2. Identify all edge cases — are they handled?
  3. Check error handling — are errors caught and handled appropriately?
  4. Verify async operations — are race conditions possible?

Step 6: Consistency Review (Repo Standards)

Goal: Ensure new code integrates seamlessly with the existing codebase.

Thinking Framework:

  • "Would someone reading this code expect it to look like this based on the rest of the codebase?"
  • "Does this follow established patterns or introduce new conventions without justification?"

Systematic Checks:

  1. Naming: Does it follow existing conventions?
  2. Patterns: Does it use established design patterns correctly?
  3. Architecture: Does it respect layer boundaries? (e.g., domain not importing infrastructure)
  4. Error Handling: Is it consistent with repo style?
  5. Testing: Does it follow existing test patterns?

Flag inconsistencies with:

  • "Existing pattern: [X]"
  • "This code does: [Y]"
  • "Suggestion: [how to align]"

Step 7: Quality & Maintainability Review

Goal: Ensure code is readable, maintainable, and follows best practices.

Thinking Framework:

  • "Will someone unfamiliar with this code understand it in 6 months?"
  • "Is this code easy to modify, extend, or delete?"

Systematic Checks:

  1. Naming clarity and self-documentation
  2. Function length and complexity (< 50 lines, cyclomatic complexity < 10)
  3. DRY principle adherence
  4. Single Responsibility Principle
  5. Appropriate abstraction level

Step 8: Performance Review

Goal: Identify potential performance bottlenecks introduced by the changes.

Thinking Framework:

  • "How does this scale with data size?"
  • "Are there unnecessary operations or allocations?"

Systematic Checks:

  1. N+1 query problems
  2. Memory leak risks
  3. Unnecessary computations in loops
  4. Missing async/parallel opportunities
  5. Inefficient data structures

Step 9: Synthesize and Communicate

Goal: Provide clear, actionable, and constructive feedback.

Output Structure:

## Goal Assessment
**PR Goal:** [One sentence — what this PR is trying to solve]
**Verdict:** [Achieved / Partially achieved / Not achieved]
**Reasoning:** [Why — specific evidence from the code]

## Repository Context
- **Architecture**: [e.g., Clean Architecture, MVC]
- **Patterns**: [e.g., Repository, Factory, DI]
- **Style**: [e.g., camelCase, ESLint]

## Critical Issues (Must Fix)
- [ ] **[GOAL]** Issue description (file:line)
  - The PR does not solve [X] because [Y]
- [ ] **[SECURITY]** Issue description (file:line)
  - Impact: [description]
  - Fix: [suggestion]

## Important Issues (Should Fix)
- [ ] **[CORRECTNESS]** Issue description (file:line)
- [ ] **[CONSISTENCY]** Issue description (file:line)
  - Existing Pattern: [X]
  - Violation: [Y]
  - Suggestion: [Z]

## Minor Suggestions (Nice to Have)
- [ ] **[QUALITY]** Issue description (file:line)
- [ ] **[PERFORMANCE]** Issue description (file:line)

## Highlights
- [Positive observations — what the PR does well]

Communication Principles:

  • Goal verdict comes first. The author needs to know immediately if the PR is on track.
  • Be specific. Always include file:line references.
  • Suggest, don't just criticize. Every issue should have a fix suggestion.
  • Acknowledge good work. Positive reinforcement for well-written code.

Usage

Fetch PR Diff

bash /mnt/skills/user/code-review-master/scripts/pr-diff.sh <pr-number> [repo] [format]

Arguments:

  • pr-number - Pull request number (required)
  • repo - Repository in owner/repo format (default: from git remote)
  • format - Output format: markdown, json, plain (default: markdown)

Examples:

bash /mnt/skills/user/code-review-master/scripts/pr-diff.sh 123
bash /mnt/skills/user/code-review-master/scripts/pr-diff.sh 123 owner/repo markdown
bash /mnt/skills/user/code-review-master/scripts/pr-diff.sh 456 owner/repo json

Requirements: gh CLI installed and authenticated

Present Results to User

When providing code reviews:

  1. Start with the goal verdict — does this PR solve the stated problem?
  2. Prioritize security issues second
  3. Provide specific file:line references
  4. Include fix suggestions, not just problems
  5. Acknowledge good practices
  6. Be constructive and educational

Troubleshooting

"PR has no description"

  • Check commit messages and branch name for intent
  • Flag this as a process issue: "This PR lacks a description. Based on the code changes, it appears to [X]. Please confirm."

"Too many issues to address"

  • Prioritize: Goal > Security > Bugs > Quality > Style
  • Focus on the most impactful changes
  • Suggest incremental improvement plan

"Unclear if issue is valid"

  • Ask for clarification about intent
  • Explain the potential problem
  • Offer alternatives rather than mandates

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

展示第三方安全扫描或审计结果

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

平台分布

Claude Code

24.94%
按下载量换算49

OpenCode

24.74%
按下载量换算48

windsurf

19.08%
按下载量换算37

Antigravity

12.82%
按下载量换算25

github-copilot

8.06%
按下载量换算16

Codex

3.3%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills