Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

code-review代码审查

Agent Skill

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

总安装

682

周安装

29

GitHub Stars

公开资料未说明

下载量

239
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/diskd-ai/code-review --skill code-review

简介

code-review 执行精准的行级代码审查,区分变更审查与全量代码库扫描两种模式。

  • 支持本地 git diff 与 GitHub PR 两种输入源,输出带行号引用的改进建议。
  • 自动识别潜在 bug、安全漏洞与风格违规,但无法完全替代人工逻辑验证。
  • 依赖准确的文件访问权限,私有仓库需提前配置 SSH key 或 token 认证。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Code Review

Perform a structured code review. Produce actionable findings with exact file+line citations.

Determine Review Mode

  1. Change review (PR, diff, CL): review only code introduced by the change. Go to "Change Review Workflow."
  2. Codebase review (full repo, specific files/modules): review the code as-is. Go to "Codebase Review Workflow."

Change Review Workflow

1. Establish what to review

Obtain access to the post-change files for accurate line citations.

  • Local checkout: use git diff (unstaged/staged) or a commit range
  • GitHub PR: use gh to clone/checkout the PR branch (see references/github-gh.md)
  • GitLab MR: use glab to clone/checkout the MR branch (see references/gitlab-glab.md)
  • If only a diff snippet is provided: ask for a branch/commit or full file contents

2. Scope the change

Constrain the review to code introduced by the change:

git diff --name-only          # changed files (working tree)
git diff --stat               # change size per file (working tree)
python scripts/diff_changed_ranges.py --json  # changed line ranges per file (working tree)

# PR/MR branch: diff vs base branch (use base from `gh pr view` / `glab mr view`)
git diff --name-only origin/main...HEAD
git diff --stat origin/main...HEAD
python scripts/diff_changed_ranges.py --range origin/main...HEAD --json

3. Broad assessment

Read the CL/PR description and skim all changed files. Ask: "Does this change make sense as a whole?"

  • If the change should not proceed at all, provide immediate feedback with reasoning
  • If the overall design is wrong, flag it before reviewing details

4. Critical components

Identify the most significant files (largest logical changes) and review those first. This provides context for smaller modifications.

If fundamental design issues emerge, communicate immediately -- major restructuring may invalidate subsequent code.

5. Systematic review

Review remaining files in logical order. Read tests before implementation when it helps clarify intent. Apply the review checklist (step 6 below).

Rules:

  • Do not comment on pre-existing issues unless the change makes them newly reachable
  • Prefer blocker/high-severity items over nits
  • Review every line of human-written code

6. Verdict

  • Approve if the CL improves overall code health, even if imperfect
  • Request changes if the CL degrades code health or has blocking issues
  • Technical facts override personal preference; accept the author's valid approach when multiple exist

Codebase Review Workflow

1. Establish scope

Determine what to review:

  • Entire repo: scan project structure, identify key modules
  • Specific files/modules: focus on the requested scope
  • Specific concern (e.g., "review security," "review architecture"): focus the checklist on that area

2. Understand the architecture

  • Read project structure, entry points, and dependency graph
  • Identify layers (domain, infrastructure, API, etc.)
  • Note the tech stack, patterns, and conventions in use

3. Systematic review

Walk through the code module by module. Apply the review checklist below, focusing on all areas or the specific concern requested.

4. Summary

Provide an overall assessment of code health with prioritized findings.


Review Checklist

For each file/hunk under review, evaluate against these areas (see references/what-to-look-for.md for full details):

AreaKey questions
DesignRight architecture? Belongs here? Proper separation of concerns?
FunctionalityDoes what's intended? Edge cases handled?
ComplexitySimplest correct solution? Over-engineered?
SecurityInjection, XSS, secrets, auth, IDOR, input validation?
PerformanceN+1, missing indexes, re-renders, memory leaks, blocking async, caching?
Code QualityDRY, SRP, deep nesting, magic values, error handling, type coverage?
TestsPresent, correct, edge cases, no flaky patterns, mocked at boundaries?
NamingDescriptive, follows conventions?
CommentsExplain why, not what?
StyleFollows style guide? Consistent?
DocsUpdated if behavior changed? Breaking changes documented?

Verify Citations

Before writing each finding, verify exact line numbers:

python scripts/print_lines.py <file> <startLine> <endLine>

Use citation format: path/to/file.ts#L10-L42

Write Comments

Follow comment best practices (see references/review-comments.md for full guide):

  • Comment on the code, never the developer
  • Explain why the issue matters
  • Use severity labels: Blocker, High, Nit:, Optional:, FYI:
  • One issue per comment
  • Acknowledge good work

Produce the Review

Fill the template from assets/review_template.md. Each finding must include:

  • Severity (Blocker / High / Medium / Low)
  • Actionable fix direction
  • Exact file#Lx-Ly citation

End with:

  • Verdict: approve, request changes, or comment only
  • 1-2 sentence justification
  • Confidence: 0.0 to 1.0

Reference Files

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.66%
按下载量换算88

Claude

27.63%
按下载量换算66

Cursor

17.99%
按下载量换算43

Gemini CLI

9.56%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills