code-review-expert by sanyuan0704/code-review-expert
npx skills add https://github.com/sanyuan0704/code-review-expert --skill code-review-expert对当前的 git 变更执行结构化审查,重点关注 SOLID 原则、架构、可移除候选项和安全风险。默认仅输出审查结果,除非用户要求实施变更。
| 级别 | 名称 | 描述 | 操作 |
|---|---|---|---|
| P0 | 严重 | 安全漏洞、数据丢失风险、正确性错误 | 必须阻止合并 |
| P1 | 高 | 逻辑错误、严重违反 SOLID 原则、性能回归 | 应在合并前修复 |
| P2 | 中 | 代码异味、可维护性问题、轻微违反 SOLID 原则 | 在此 PR 中修复或创建后续任务 |
| P3 | 低 | 风格、命名、微小建议 | 可选改进 |
git status -sb、 和 来确定变更范围。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
git diff --statgit diffrg 或 grep 来查找相关模块、用法和契约。边界情况:
git diff 为空,则通知用户并询问他们是否要审查暂存的变更或特定的提交范围。references/solid-checklist.md 以获取具体的提示。references/removal-plan.md 以获取模板。references/security-checklist.md 以获取覆盖范围。references/code-quality-checklist.md 以获取覆盖范围。按以下结构组织你的审查:
## 代码审查总结
**已审查文件**:X 个文件,Y 行更改
**总体评估**:[APPROVE / REQUEST_CHANGES / COMMENT]
---
## 发现的问题
### P0 - 严重
(无或列表)
### P1 - 高
1. **[文件:行号]** 简要标题
- 问题描述
- 建议的修复方案
### P2 - 中
2. (跨章节继续编号)
- ...
### P3 - 低
...
---
## 移除/迭代计划
(如果适用)
## 额外建议
(可选改进,非阻塞性)
行内评论 :对于特定文件的发现,请使用此格式:
::code-comment{file="path/to/file.ts" line="42" severity="P1"}
问题描述和建议的修复方案。
::
干净的审查 :如果未发现问题,请明确说明:
展示发现的问题后,询问用户如何继续:
---
## 后续步骤
我发现了 X 个问题(P0: _, P1: _, P2: _, P3: _)。
**您希望如何进行?**
1. **全部修复** - 我将实施所有建议的修复方案
2. **仅修复 P0/P1** - 处理严重和高优先级问题
3. **修复特定项** - 告诉我需要修复哪些问题
4. **无需更改** - 审查完成,无需实施任何更改
请选择一个选项或提供具体指示。
重要 :在用户明确确认之前,请勿实施任何更改。这是一个审查优先的工作流程。
| 文件 | 用途 |
|---|---|
solid-checklist.md | SOLID 异味提示和重构启发式方法 |
security-checklist.md | Web/应用安全和运行时风险检查清单 |
code-quality-checklist.md | 错误处理、性能、边界条件 |
removal-plan.md | 删除候选项和后续计划的模板 |
每周安装量
4.4K
仓库
GitHub 星标
2.9K
首次出现
Feb 4, 2026
安全审计
安装于
opencode3.9K
codex3.9K
gemini-cli3.8K
github-copilot3.8K
kimi-cli3.7K
amp3.6K
Perform a structured review of the current git changes with focus on SOLID, architecture, removal candidates, and security risks. Default to review-only output unless the user asks to implement changes.
| Level | Name | Description | Action |
|---|---|---|---|
| P0 | Critical | Security vulnerability, data loss risk, correctness bug | Must block merge |
| P1 | High | Logic error, significant SOLID violation, performance regression | Should fix before merge |
| P2 | Medium | Code smell, maintainability concern, minor SOLID violation | Fix in this PR or create follow-up |
| P3 | Low | Style, naming, minor suggestion | Optional improvement |
git status -sb, git diff --stat, and git diff to scope changes.rg or grep to find related modules, usages, and contracts.Edge cases:
git diff is empty, inform user and ask if they want to review staged changes or a specific commit range.references/solid-checklist.md for specific prompts.references/removal-plan.md for template.references/security-checklist.md for coverage.references/code-quality-checklist.md for coverage.Structure your review as follows:
## Code Review Summary
**Files reviewed**: X files, Y lines changed
**Overall assessment**: [APPROVE / REQUEST_CHANGES / COMMENT]
---
## Findings
### P0 - Critical
(none or list)
### P1 - High
1. **[file:line]** Brief title
- Description of issue
- Suggested fix
### P2 - Medium
2. (continue numbering across sections)
- ...
### P3 - Low
...
---
## Removal/Iteration Plan
(if applicable)
## Additional Suggestions
(optional improvements, not blocking)
Inline comments : Use this format for file-specific findings:
::code-comment{file="path/to/file.ts" line="42" severity="P1"}
Description of the issue and suggested fix.
::
Clean review : If no issues found, explicitly state:
After presenting findings, ask user how to proceed:
---
## Next Steps
I found X issues (P0: _, P1: _, P2: _, P3: _).
**How would you like to proceed?**
1. **Fix all** - I'll implement all suggested fixes
2. **Fix P0/P1 only** - Address critical and high priority issues
3. **Fix specific items** - Tell me which issues to fix
4. **No changes** - Review complete, no implementation needed
Please choose an option or provide specific instructions.
Important : Do NOT implement any changes until user explicitly confirms. This is a review-first workflow.
| File | Purpose |
|---|---|
solid-checklist.md | SOLID smell prompts and refactor heuristics |
security-checklist.md | Web/app security and runtime risk checklist |
code-quality-checklist.md | Error handling, performance, boundary conditions |
removal-plan.md | Template for deletion candidates and follow-up plan |
Weekly Installs
4.4K
Repository
GitHub Stars
2.9K
First Seen
Feb 4, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode3.9K
codex3.9K
gemini-cli3.8K
github-copilot3.8K
kimi-cli3.7K
amp3.6K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装