360 Secure SkillHub
360 安全技能中心

Code Review Assistant

这是AI驱动的代码审查助手,核心功能是按结构化检查表,识别代码中的安全漏洞、质量问题、性能瓶颈及规范偏差,分等级输出可落地改进建议。适用于PR评审、代码审计、合规检查、性能优化等场景。需提供代码语言、变更文件、变更目的等上下文,输出结构化审查摘要,含问题分级、修复建议、代码亮点及补充建议。

huajianjiu000
huajianjiu000
热度 46.46
最近更新 2026-05-11 17:44:40
分类:开发依赖:纯提示词应用场景:代码审查 / 调试排错 / 安全

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add code-review-assistant-2
Metadata
name
code-review-assistant
description
AI-powered code review assistant that analyzes pull requests, identifies potential bugs, security issues, code quality problems, and provides actionable improvement suggestions. Use when reviewing PRs, auditing code changes, or ensuring code quality standards.
version
1.0.0
author
muqing
tags
["development","code-review","security","quality"]

Code Review Assistant

Description

An AI-powered code review assistant that analyzes pull requests, identifies potential bugs, security vulnerabilities, code quality issues, and provides actionable improvement suggestions. This skill helps maintain code quality standards and catch issues before they reach production.

When to Use

  • Reviewing pull requests for potential issues
  • Auditing code changes for security vulnerabilities
  • Ensuring code follows best practices and style guides
  • Identifying performance bottlenecks
  • Checking for test coverage gaps
  • Validating code complexity

Review Checklist

Security Issues

  • SQL injection vulnerabilities
  • XSS (Cross-Site Scripting) risks
  • Authentication/authorization flaws
  • Sensitive data exposure
  • Insecure dependencies

Code Quality

  • Code duplication
  • Function/class complexity
  • Naming conventions
  • Comment quality
  • Error handling
  • Resource management

Performance

  • N+1 query problems
  • Unnecessary re-renders
  • Memory leaks
  • Inefficient algorithms
  • Missing caching opportunities

Best Practices

  • Test coverage
  • Documentation completeness
  • API consistency
  • Error handling patterns
  • Type safety

How to Use

  1. When asked to review code, first gather context:

    • The programming language and framework
    • The files/functions changed
    • The purpose of the changes
  2. Analyze the code systematically using the checklist

  3. Provide structured feedback with severity levels

Output Format

## Code Review Summary

### Overview
[Brief description of what the PR does]

### Issues Found

#### Critical (🔴)
- [Issue with location and fix suggestion]

#### High (🟠)
- [Issue with location and fix suggestion]

#### Medium (🟡)
- [Issue with location and fix suggestion]

#### Low (🟢)
- [Minor suggestions]

### Positive Aspects
- [What was done well]

### Recommendations
- [Additional suggestions]