# Code Review

> 当用户想审查代码、检查代码质量、提交前 review、找 bug 时使用 — 从安全性、可读性、潜在 bug 三个维度审查代码

- **Type:** Skill
- **Install:** `agentstack add skill-lightpointventures-claude-code-starter-code-review`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [lightpointventures](https://agentstack.voostack.com/s/lightpointventures)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [lightpointventures](https://github.com/lightpointventures)
- **Source:** https://github.com/lightpointventures/claude-code-starter/tree/main/skills/code-review
- **Website:** https://github.com/lighthouse-strategy/claude-code-starter

## Install

```sh
agentstack add skill-lightpointventures-claude-code-starter-code-review
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 代码审查

审查当前未提交的代码更改，帮用户在提交前发现问题。

## 步骤

### 1. 获取更改内容

运行 `git diff` 和 `git diff --staged` 获取所有未提交的更改。

如果没有任何更改，告诉用户「没有需要审查的代码更改」并结束。

### 2. 逐文件审查

对每个改动的文件，从以下三个维度检查：

**安全性**
- 是否有硬编码的密钥、密码、token
- 是否有 SQL 注入、XSS 等安全漏洞
- 是否有不安全的文件操作或命令执行
- 用户输入是否经过验证

**可读性**
- 变量和函数命名是否清晰
- 逻辑是否容易理解
- 是否有过于复杂的嵌套或过长的函数
- 是否与项目现有风格一致

**潜在 Bug**
- 边界条件是否处理（空值、空列表、超出范围）
- 错误处理是否完整（try/catch 是否合理）
- 是否有逻辑错误（条件判断、循环终止条件）
- 是否可能影响现有功能

### 3. 输出审查报告

用中文输出简洁的审查报告，格式如下：

```
## 审查结果

### 需要修复
- [文件名:行号] 问题描述 + 建议的修复方式

### 建议改进
- [文件名:行号] 改进描述

### 没问题
- 列出审查通过的文件
```

规则：
- 只报告真正有价值的问题，不要吹毛求疵
- 每个问题给出具体的修复建议，不要只说「这里有问题」
- 如果代码没有问题，直接说「代码看起来没问题，可以提交」
- 不要建议添加注释、文档或与改动无关的重构

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [lightpointventures](https://github.com/lightpointventures)
- **Source:** [lightpointventures/claude-code-starter](https://github.com/lightpointventures/claude-code-starter)
- **License:** MIT
- **Homepage:** https://github.com/lighthouse-strategy/claude-code-starter

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-lightpointventures-claude-code-starter-code-review
- Seller: https://agentstack.voostack.com/s/lightpointventures
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
