# Auto Code Review

> 用户显式触发的跨模型代码审查工作流。仅当用户明确说 `/auto-review`、`使用 auto-code-review`、`启动跨模型代码审查`，或明确要求“审查并修复”时使用；普通代码生成、修改完成或含糊的“看看代码”不自动触发。默认只读审查，只有用户明确要求 `--fix` 或“审查并修复”才允许主 agent 修改代码。

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

## Install

```sh
agentstack add skill-i-stack-ai-coding-kit-auto-code-review
```

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

## About

# Auto Code Review

## 强制入口

命中本 skill 时，必须完整阅读 [references/auto_code_review.md](references/auto_code_review.md) 并按其中条款执行。

- 不得以 preamble、Cursor 规则摘要或其它二次摘要代替详规全文。
- 未获得当前请求中的显式授权时，不得探测 reviewer CLI、调用 reviewer 或创建审查归档。
- 运行前置依赖（不随 skill 同步包分发，需宿主环境另行提供）：`env/review.json`（模板 `env/review.json.example`）、项目内 `.auto-review-config.json`、以及 `AUTO_REVIEW_*` 环境变量。配置加载优先级与字段含义见 `AGENT-BRIEF.md` 与 `docs/auto-code-review.md`。

## 八条核心规则

- [ACR-001] **显式授权门**：只有用户明确触发本 skill 才进入审查；代码修改完成本身不是触发条件。配置只能控制能力是否可用，不能代表当前请求已授权。
- [ACR-002] **范围可追溯**：优先审查当前请求中可精确追踪的变更；无法证明范围时，先让用户选择 staged 或 worktree，不得把 `git diff HEAD` 冒充为“本轮修改”。
- [ACR-003] **reviewer 只读**：reviewer 始终只读运行，只输出审查意见，不修改文件。
- [ACR-004] **写权限分层**：默认 `review-only`，主 agent 只仲裁并报告；只有用户明确指定 `--fix` 或“审查并修复”时，主 agent 才可修复并再次审查。
- [ACR-005] **MAX_ROUNDS=3**：`review-only` 只运行一轮；`review-and-fix` 最多运行 3 轮。未收敛时输出 deadlock，不假装通过。
- [ACR-006] **授权后闭环**：显式启动后，执行 recall → review → archive → sync → merge；归档写入 `.plan-reviews/`，且仅属于已授权的审查会话。
- [ACR-007] **可配置 reviewer**：允许配置 reviewer、轮次和单模型降级；`AUTO_REVIEW_ENABLED=false` 是能力级禁用开关，`true` 不构成用户授权。
- [ACR-008] **单模型降级需显式允许**：默认不做同模型自审；只有配置明确允许时才降级，并在日志中标注可信度降低。

## 模式

- `/auto-review`：只读审查，不修改工作区。
- `/auto-review --fix`：审查、由主 agent 修复已采纳问题、再次审查。
- 普通实现请求：不触发本 skill。

## 与相邻 skill 的分工

| Skill | 分工 |
|---|---|
| `plan-grill` | 盘问并锁定 PLAN.md（Act 1） |
| `cross-model-review` | 显式审查 PLAN.md（Act 2） |
| **auto-code-review** | 用户显式启动的代码实现审查（Act 3） |
| `engineering-discipline` | 约束主 agent 的工程改动 |
| `epistemic-integrity` | 约束审查结论的证据与置信度 |

## 工作流

```text
实施完成 → 用户显式触发 → 选择范围/模式 → reviewer 只读审查
                                      ├─ review-only：报告并归档
                                      └─ review-and-fix：修复 → 再审查 → 归档
```

## Source & license

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

- **Author:** [i-stack](https://github.com/i-stack)
- **Source:** [i-stack/ai-coding-kit](https://github.com/i-stack/ai-coding-kit)
- **License:** MIT

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-i-stack-ai-coding-kit-auto-code-review
- Seller: https://agentstack.voostack.com/s/i-stack
- 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%.
