Token导航 LogoToken导航

Agent Skill · 研究检索

code-review(代码审查)

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

code-review 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 38,175。

总安装 1,599周安装 68GitHub Stars 68下载 560核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

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

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

code-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于需要根据关键词或任务场景从来源线索中筛选信息的场景。通过 npx skills add 命令安装,需结合原始 README 核验具体用法。

安装前建议确认权限范围、维护状态及是否会触发联网或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/code-review

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/luongnv89/skills --skill code-review;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

code-review 怎么安装?

在终端执行 npx skills add https://github.com/luongnv89/skills --skill code-review。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

code-review 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

code-review 需要什么权限?

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

code-review 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

code-review 用的人多吗?

公开数据是累计安装 1,599 次,近一周安装 68 次,下载 560 次,GitHub 68 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

code-review 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
code-review

代码审查 · 本页

1,59968需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Code Review

Review code for quality issues, code smells, and pragmatic programming violations.

When to Use

Use this skill when the user asks for a code review, PR review, audit, security check, or "review my changes". Trigger on phrases like "review this code", "audit this repo", "check this PR for issues", or "find bugs in these files". Do not trigger for performance profiling, writing new features from scratch, or test-case generation.

Quick Start

First, run the Repo Sync workflow below. Then complete the Environment Check to pick a mode (PR/diff vs full audit). Next, follow the Instructions phases (checklist scan -> findings synthesis -> validation). Finally, emit the Output Format report and verify Acceptance Criteria.

Overview

The skill orchestrates parallel reviewer subagents over batched files, then runs a validator pass. Each phase has explicit steps below. Read only the section you need; the rest is reference material.

Repo Sync Before Edits (mandatory)

Before creating/updating/deleting files in an existing repository, sync the current branch with remote:

branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"

If the working tree is not clean, stash first, sync, then restore:

git stash push -u -m "pre-sync"
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash pop

If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.

Environment Check

Before proceeding with code review:

  1. Verify Agent tool availability: Check if /Agent subagent system is available
  2. Codebase scope: Determine if full audit or PR/diff review
  3. Context budget: Estimate file count and total lines to review

- Small PR/diff: <50 files, <5000 lines → run inline (fast path) - Medium audit: 50-200 files, 5K-50K lines → use batch processing - Large audit: >200 files, >50K lines → sample entry points and hot paths

Subagent Architecture

Pattern: B (Parallel Workers) + C (Review Loop)

For full codebase audits and large PRs, use parallel subagent architecture:

┌─────────────────────────────────┐
│  Main SKILL (Orchestrator)      │
│  - Parse scope (PR/audit)       │
│  - Batch files into groups      │
│  - Check Agent availability     │
└──────────────┬──────────────────┘
               │
       ┌───────┴───────┬───────────┬─────────────┐
       │               │           │             │
       v               v           v             v
   ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐
   │ Reviewer 1 │ │ Reviewer 2 │ │ Reviewer 3 │ │ Reviewer N │
   │   Batch 1  │ │   Batch 2  │ │   Batch 3  │ │  Batch N   │
   │   5-10     │ │   5-10     │ │   5-10     │ │   5-10     │
   │   files    │ │   files    │ │   files    │ │   files    │
   │ (parallel) │ │ (parallel) │ │ (parallel) │ │ (parallel) │
   └─────┬──────┘ └─────┬──────┘ └─────┬──────┘ └─────┬──────┘
         │              │              │              │
         │              └──────────────┴──────────────┘
         │                             │
         └─────────────────────────────┘
                     │
        ┌────────────v────────────────┐
        │  Report Assembler           │
        │  - Merge all findings       │
        │  - Deduplicate issues       │
        │  - Rank by severity         │
        │  - Generate CODE_REVIEW.md  │
        └────────────┬────────────────┘
                     │
             ┌───────v────────┐
             │  Reviewer      │
             │  Validator     │
             │  - Fresh eyes  │
             │  - Verify      │
             │  - Completeness│
             └────────────────┘
Agent Files
  • agents/file-reviewer.md — Review a batch of 5-10 files against the full checklist

- Returns structured JSON with findings, severity levels, and fix suggestions - Run in parallel on multiple batches - Input: file list, checklist config, language context - Output: JSON with findings array

  • agents/report-assembler.md — Merge all batch results into one report

- Deduplicates findings by (file, line, smell) - Ranks by severity (critical → major → minor → info) - Identifies cross-file patterns (duplicate code, shotgun surgery) - Generates final CODE_REVIEW.md - Input: array of JSON outputs from file-reviewer - Output: Markdown report + validation JSON

  • agents/reviewer.md — Fresh-context validation pass

- Verifies accuracy of all findings - Catches false positives and severity miscategorizations - Identifies missed issues - Returns validation report with corrections - Input: CODE_REVIEW.md + original source files - Output: Validation JSON + updated CODE_REVIEW.md if corrections needed

Mode Selection & Degradation

Mode 1: Small PR/Diff (Fast Path - Inline)

  • Changed files: <50
  • Total lines changed: <5000
  • Process: Run complete review inline in SKILL.md
  • No subagents needed
  • Output: CODE_REVIEW.md in seconds

Mode 2: Medium Audit (Batched with Subagents)

  • Files: 50-200
  • Total lines: 5K-50K
  • Process:

1. Batch files into groups of 5-10 2. Launch parallel file-reviewer agents 3. Collect JSON outputs 4. Merge with report-assembler 5. Validate with reviewer

  • Output: CODE_REVIEW.md with comprehensive findings

Mode 3: Large Audit (Sampled with Subagents)

  • Files: >200
  • Total lines: >50K
  • Process:

1. Identify and scan entry points (main, index, app files) 2. Scan business logic hotspots (most frequently modified) 3. Sample distributed files across codebase 4. Use parallel batching as in Mode 2 5. Full validation pass

  • Output: CODE_REVIEW.md with sampled findings + note about sampling strategy

Graceful Degradation

If Agent tool unavailable:

  • Fall back to inline execution in main SKILL.md
  • Use sequential file processing instead of parallel batches
  • Return CODE_REVIEW.md without validation pass
  • Log message: "Subagent architecture unavailable; running inline review"

Risk Mitigation

Missed cross-file smells: Report-assembler cross-file analysis partially mitigates by identifying:

  • Duplicate code patterns
  • Shotgun surgery risks
  • Architectural coupling

Context overflow: Batching 5-10 files per agent keeps context manageable while maintaining review quality.

False positives: Reviewer agent catches most false positives through fresh-context validation before final report.

Review Modes

Mode 1: PR/Diff Review

# Get changed files
git diff --name-only <base>..HEAD
git diff <base>..HEAD

Focus only on changed lines and their immediate context.

Mode 2: Full Codebase Audit

Scan all source files, prioritizing:

  1. Entry points (main, index, app)
  2. Core business logic
  3. Frequently modified files (git log --format='%H' | head -100 | xargs -I{} git diff-tree --no-commit-id --name-only -r {} | sort | uniq -c | sort -rn)

Review Checklist

1. Code Smells (Critical)

Read references/code-smells.md when a code smell is identified that requires the full catalog for classification.

Bloaters - Code that grows too large

  • Long Method (>20 lines)
  • Large Class (>200 lines)
  • Long Parameter List (>3 params)
  • Primitive Obsession

Object-Orientation Abusers

  • Switch Statements (replace with polymorphism)
  • Refused Bequest
  • Alternative Classes with Different Interfaces

Change Preventers

  • Divergent Change (one class, many reasons to change)
  • Shotgun Surgery (one change, many classes affected)
  • Parallel Inheritance Hierarchies

Dispensables

  • Dead Code
  • Duplicate Code
  • Lazy Class
  • Speculative Generality

Couplers

  • Feature Envy
  • Inappropriate Intimacy
  • Message Chains
  • Middle Man

2. Pragmatic Programmer Principles

DRY (Don't Repeat Yourself)

  • Duplicated logic or knowledge
  • Copy-paste code
  • Repeated magic values

Orthogonality

  • Components that should be independent but aren't
  • Changes rippling across unrelated modules

Reversibility

  • Hard-coded decisions that should be configurable
  • Vendor lock-in without abstraction

Tracer Bullets

  • Is the code testable end-to-end?
  • Are there integration points?

Good Enough Software

  • Over-engineering for unlikely scenarios
  • Premature optimization

Broken Windows

  • Commented-out code
  • TODO/FIXME without tickets
  • Inconsistent formatting

3. Security & Safety

  • Input validation
  • SQL injection risks
  • XSS vulnerabilities
  • Hardcoded secrets
  • Unsafe deserialization

4. Maintainability

  • Unclear naming
  • Missing or outdated comments
  • Complex conditionals
  • Deep nesting (>3 levels)
  • Missing error handling

Output Format

Generate CODE_REVIEW.md:

# Code Review Report

**Date**: YYYY-MM-DD
**Scope**: [PR #123 | Full Audit]
**Files Reviewed**: N

## Summary

| Severity | Count |
|----------|-------|
| Critical | X |
| Major    | X |
| Minor    | X |
| Info     | X |

## Critical Issues

### [Category]: Issue Title
**File**: `path/to/file.ts:42`
**Smell**: [Code smell name]

Description of the issue.

**Before**:

// problematic code


**Suggested Fix**:

// improved code


## Major Issues

...

## Minor Issues

...

## Recommendations

1. Priority fixes
2. Refactoring suggestions
3. Architecture improvements

Expected Output

A CODE_REVIEW.md file with findings grouped by severity. Example:

# Code Review Report

**Date**: 2024-01-15
**Scope**: PR #42 — auth module refactor
**Files Reviewed**: 8

## Summary

| Severity | Count |
|----------|-------|
| Critical | 1     |
| Major    | 3     |
| Minor    | 5     |
| Info     | 2     |

## Critical Issues

### [Security]: Hardcoded API Secret
**File**: `src/auth/client.ts:17`
**Smell**: Hardcoded secrets

API key is embedded directly in source code and will be committed to version control.

**Before**:

const API_KEY = "sk-prod-abc123xyz";


**Suggested Fix**:

const API_KEY = process.env.API_KEY; if (!API_KEY) throw new Error("API_KEY env var is required");


## Recommendations

1. Move all secrets to environment variables immediately
2. Add `.env` to `.gitignore` and document required vars in README
3. Consider extracting the 240-line `UserService` class into smaller focused services

Acceptance Criteria

A run passes when all of the following are true:

  • [ ] CODE_REVIEW.md exists in the repo root with # Code Review Report as the first heading.
  • [ ] Report includes a ## Summary table with rows for Critical, Major, Minor, and Info severities.
  • [ ] Every reported finding cites a path/to/file.ext:line reference and a code smell or category label.
  • [ ] Critical findings include both a "Before" and "Suggested Fix" code block when a code change is proposed.
  • [ ] Mode used (Mode 1/2/3) is recorded in the report header along with the file count.
  • [ ] No merge-conflict markers (<<<<<<<, =======, >>>>>>>) are silently dropped — they appear as Critical findings if present in the source.

Edge Cases

  • Empty or whitespace-only diff: Report scope as zero files reviewed; skip review and inform the user.
  • Binary files or generated code: Skip minified/generated files (e.g., dist/, *.min.js, package-lock.json) and note them as excluded in the report header.
  • Single-language vs. polyglot repos: Apply language-appropriate checks for each file; don't flag Python idioms as issues in JS files.
  • No issues found: Produce a report with all-zero severity counts and a brief "LGTM" summary — don't fabricate findings.
  • Files exceeding context limits: Fall back to mode 3 (sampling) and note which files were sampled vs. fully reviewed.
  • Merge conflict markers: Flag any <<<<<<< / ======= / >>>>>>> as a Critical issue — never silently ignore them.

Step Completion Reports

After completing each major step, output a status report in this format:


◆ [Step Name] ([step N of M] — [context]) ·································································· [Check 1]: √ pass [Check 2]: √ pass (note if relevant) [Check 3]: × fail — [reason] [Check 4]: √ pass [Criteria]: √ N/M met

---

Result: PASS | FAIL | PARTIAL

Adapt the check names to match what the step actually validates. Use √ for pass, × for fail, and — to add brief context. The "Criteria" line summarizes how many acceptance criteria were met. The "Result" line gives the overall verdict.

Skill-specific checks per phase

Phase: Scope Assessment — checks: Scope assessment, File count estimated

Phase: Review Execution — checks: Code smell detection, Security scan

Phase: Report Generation — checks: Report generation, Severity classification

Phase: Validation Pass — checks: Validation pass, False positive check

Severity Levels

LevelDescriptionAction
CriticalSecurity risks, bugs, data loss potentialMust fix before merge
MajorCode smells, maintainability blockersShould fix soon
MinorStyle, minor improvementsNice to have
InfoSuggestions, alternativesOptional

Resources

平台分布

Codex

37.97%
按下载量换算213

Claude

32.12%
按下载量换算180

Cursor

18.82%
按下载量换算105

Gemini CLI

8.37%
按下载量换算47

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills