review-code

2
2
Source

Multi-dimensional code review with structured reports. Analyzes correctness, readability, performance, security, testing, and architecture. Triggers on "review code", "code review", "审查代码", "代码审查".

Install

mkdir -p .claude/skills/review-code && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6582" && unzip -o skill.zip -d .claude/skills/review-code && rm skill.zip

Installs to .claude/skills/review-code

About this skill

Review Code

Multi-dimensional code review skill that analyzes code across 6 key dimensions and generates structured review reports with actionable recommendations.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│  ⚠️ Phase 0: Specification Study (强制前置)                       │
│              → 阅读 specs/review-dimensions.md                   │
│              → 理解审查维度和问题分类标准                          │
└───────────────┬─────────────────────────────────────────────────┘
                ↓
┌─────────────────────────────────────────────────────────────────┐
│           Orchestrator (状态驱动决策)                             │
│           → 读取状态 → 选择审查动作 → 执行 → 更新状态              │
└───────────────┬─────────────────────────────────────────────────┘
                │
    ┌───────────┼───────────┬───────────┬───────────┐
    ↓           ↓           ↓           ↓           ↓
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ Collect │ │ Quick   │ │ Deep    │ │ Report  │ │Complete │
│ Context │ │ Scan    │ │ Review  │ │ Generate│ │         │
└─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘
     ↓           ↓           ↓           ↓
┌─────────────────────────────────────────────────────────────────┐
│                     Review Dimensions                            │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐            │
│  │Correctness│ │Readability│ │Performance│ │ Security │            │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘            │
│  ┌──────────┐ ┌──────────┐                                       │
│  │ Testing  │ │Architecture│                                      │
│  └──────────┘ └──────────┘                                       │
└─────────────────────────────────────────────────────────────────┘

Project Context: Run ccw spec load --category review for review standards, checklists, and approval gates.

Key Design Principles

  1. 多维度审查: 覆盖正确性、可读性、性能、安全性、测试覆盖、架构一致性六大维度
  2. 分层执行: 快速扫描识别高风险区域,深入审查聚焦关键问题
  3. 结构化报告: 按严重程度分类,提供文件位置和修复建议
  4. 状态驱动: 自主模式,根据审查进度动态选择下一步动作

⚠️ Mandatory Prerequisites (强制前置条件)

⛔ 禁止跳过: 在执行任何审查操作之前,必须完整阅读以下文档。

规范文档 (必读)

DocumentPurposePriority
specs/review-dimensions.md审查维度定义和检查点P0 - 最高
specs/issue-classification.md问题分类和严重程度标准P0 - 最高
specs/quality-standards.md审查质量标准P1

模板文件 (生成前必读)

DocumentPurpose
templates/review-report.md审查报告模板
templates/issue-template.md问题记录模板

Execution Flow

┌─────────────────────────────────────────────────────────────────┐
│  Phase 0: Specification Study (强制前置 - 禁止跳过)               │
│  → Read: specs/review-dimensions.md                              │
│  → Read: specs/issue-classification.md                           │
│  → 理解审查标准和问题分类                                          │
├─────────────────────────────────────────────────────────────────┤
│  Action: collect-context                                         │
│  → 收集目标文件/目录                                               │
│  → 识别技术栈和语言                                                │
│  → Output: state.context (files, language, framework)            │
├─────────────────────────────────────────────────────────────────┤
│  Action: quick-scan                                              │
│  → 快速扫描整体结构                                                │
│  → 识别高风险区域                                                  │
│  → Output: state.risk_areas, state.scan_summary                  │
├─────────────────────────────────────────────────────────────────┤
│  Action: deep-review (per dimension)                             │
│  → 逐维度深入审查                                                  │
│  → 记录发现的问题                                                  │
│  → Output: state.findings[]                                      │
├─────────────────────────────────────────────────────────────────┤
│  Action: generate-report                                         │
│  → 汇总所有发现                                                    │
│  → 生成结构化报告                                                  │
│  → Output: review-report.md                                      │
├─────────────────────────────────────────────────────────────────┤
│  Action: complete                                                │
│  → 保存最终状态                                                    │
│  → 输出审查摘要                                                    │
└─────────────────────────────────────────────────────────────────┘

Directory Setup

const timestamp = new Date().toISOString().slice(0,19).replace(/[-:T]/g, '');
const workDir = `.workflow/.scratchpad/review-code-${timestamp}`;

Bash(`mkdir -p "${workDir}"`);
Bash(`mkdir -p "${workDir}/findings"`);

Output Structure

.workflow/.scratchpad/review-code-{timestamp}/
├── state.json                    # 审查状态
├── context.json                  # 目标上下文
├── findings/                     # 问题发现
│   ├── correctness.json
│   ├── readability.json
│   ├── performance.json
│   ├── security.json
│   ├── testing.json
│   └── architecture.json
└── review-report.md              # 最终审查报告

Review Dimensions

DimensionFocus AreasKey Checks
Correctness逻辑正确性边界条件、错误处理、null 检查
Readability代码可读性命名规范、函数长度、注释质量
Performance性能效率算法复杂度、I/O 优化、资源使用
Security安全性注入风险、敏感信息、权限控制
Testing测试覆盖测试充分性、边界覆盖、可维护性
Architecture架构一致性设计模式、分层结构、依赖管理

Issue Severity Levels

LevelPrefixDescriptionAction Required
Critical[C]阻塞性问题,必须立即修复Must fix before merge
High[H]重要问题,需要修复Should fix
Medium[M]建议改进Consider fixing
Low[L]可选优化Nice to have
Info[I]信息性建议For reference

Reference Documents

DocumentPurpose
phases/orchestrator.md审查编排器
phases/state-schema.md状态结构定义
phases/actions/action-collect-context.md收集上下文
phases/actions/action-quick-scan.md快速扫描
phases/actions/action-deep-review.md深入审查
phases/actions/action-generate-report.md生成报告
phases/actions/action-complete.md完成审查
specs/review-dimensions.md审查维度规范
specs/issue-classification.md问题分类标准
specs/quality-standards.md质量标准
templates/review-report.md报告模板
templates/issue-template.md问题模板

copyright-docs

catlog22

Generate software copyright design specification documents compliant with China Copyright Protection Center (CPCC) standards. Creates complete design documents with Mermaid diagrams based on source code analysis. Use for software copyright registration, generating design specification, creating CPCC-compliant documents, or documenting software for intellectual property protection. Triggers on "软件著作权", "设计说明书", "版权登记", "CPCC", "软著申请".

4614

prompt-enhancer

catlog22

Transform vague prompts into actionable specs using intelligent analysis and session memory. Use when user input contains -e or --enhance flag.

11412

project-analyze

catlog22

Multi-phase iterative project analysis with Mermaid diagrams. Generates architecture reports, design reports, method analysis reports. Use when analyzing codebases, understanding project structure, reviewing architecture, exploring design patterns, or documenting system components. Triggers on "analyze project", "architecture report", "design analysis", "code structure", "system overview".

3410

software-manual

catlog22

Generate interactive TiddlyWiki-style HTML software manuals with screenshots, API docs, and multi-level code examples. Use when creating user guides, software documentation, or API references. Triggers on "software manual", "user guide", "generate manual", "create docs".

289

command-guide

catlog22

Workflow command guide for Claude DMS3 (78 commands). Search/browse commands, get next-step recommendations, view documentation, report issues. Triggers "CCW-help", "CCW-issue", "ccw-help", "ccw-issue", "ccw"

986

compact

catlog22

Compact current session memory into structured text for session recovery. Supports custom descriptions and tagging.

134

You might also like

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

2,8672,519

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

3,7921,653

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

2,1481,640

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

2,2621,465

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

2,4591,222

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

1,955968