Skip to content
Back to skills

Code Review

ASecurity

审查当前改动或指定文件的代码,找出 bug、安全隐患、可简化与可复用之处。当用户说"审查代码/review/检查这段代码/看看有没有问题"时使用。

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 6, 2026
ai-agentscode-reviewgit

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add Ducktang123/claude-code-deepseek --skill code-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ducktang123-code-review/badge)](https://www.skillsdirectory.com/skills/ducktang123-code-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-review
description: 审查当前改动或指定文件的代码,找出 bug、安全隐患、可简化与可复用之处。当用户说"审查代码/review/检查这段代码/看看有没有问题"时使用。
---

# 代码审查

对目标代码做一次务实的审查,**只报有把握的问题**,不要堆砌泛泛的建议。

## 步骤
1. 确定审查范围:
   - 如果在 git 仓库且用户没指定文件,先看改动:`git diff`(未提交)或 `git diff HEAD~1`。
   - 否则审查用户指定的文件。
2. 逐项检查并分类:
   - **Bug / 正确性**:逻辑错误、边界条件、空值、并发、资源泄漏。
   - **安全**:注入、越权、硬编码密钥、不安全的反序列化。
   - **可简化 / 可复用**:重复代码、过度复杂、可用现成库或已有函数替代。
   - **效率**:明显的性能问题(N+1、不必要的循环/拷贝)。
3. 输出格式(中文):每条给出 `文件:行号`、问题、为什么是问题、建议改法。
4. 按严重程度排序:先严重 bug,再安全,再清理项。

## 原则
- 没问题就说"没发现明显问题",不要硬找。
- 风格类(命名/缩进)除非影响可读性,否则少提。
- 改法要贴合现有代码风格。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…