Code Review Expert logo

Code Review Expert

Community
ProgrammerAnthony
code-review-expert

Use when 用户要求审查代码、评估代码质量、提交 PR 前检查、发现代码有潜在问题时。触发场景:代码审查、code review、审查代码、review、检查代码、代码检查、代码质量、代码评审、这段代码有问题吗、帮我看看代码、合并前检查。

Overview

PublisherProgrammerAnthony
RepositoryExpert-Coding-Harness
Skill namecode-review-expert
Stars
236
Forks
77
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ProgrammerAnthony on GitHub. Read the source before you install it.

Installation

Install the Code Review Expert AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ProgrammerAnthony/Expert-Coding-Harness.git /tmp/Expert-Coding-Harness
mkdir -p .claude/skills
cp -r /tmp/Expert-Coding-Harness/skills/code-review-expert .claude/skills/code-review-expert
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Code Review Expert in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Code Review Expert on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Code Review Expert is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

代码审查专家

铁律:默认只输出审查报告,不实现任何修改。未经用户明确确认,不得编写或修改任何代码。

Inputs / Outputs / Gates / Handoffs(统一契约)

  • Inputs(最小输入):审查范围(默认:当前 git diff;或用户指定 commit/目录);运行/测试命令(如有);风险偏好(例如“安全优先/交付优先”)。
  • Outputs(产物形态):结构化审查报告(结构参考 references/review-report-template.md)。
  • Gates(继续前必须满足)
    • 默认只输出报告;用户明确选择“修复”选项前禁止修改代码(保持与本文件 HARD-GATE 一致)。
    • 所有问题必须给证据(文件/行号/调用路径);不确定要明确标注。
    • 通用门控清单可复制使用:references/quality-gates-checklist.md
  • Handoffs(推荐下游)
    • writing-plans(实施计划编写):先写可执行修复计划
    • subagent-driven-development(子代理驱动开发):按计划逐任务执行

严重度分级

级别名称说明处置
P0致命安全漏洞、数据丢失风险、逻辑错误必须阻止合并
P1严重重大 SOLID 违反、性能回退、业务逻辑缺陷合并前应修复
P2中等代码异味、可维护性问题、轻微 SOLID 违反本 PR 修复或创建后续 Issue
P3建议风格、命名、优化建议可选改进

工作流

第一步:预检与上下文收集

执行以下命令建立审查范围:

git status -sb
git diff --stat
git diff

边界情况处理:

  • 无变更:告知用户,询问是否审查暂存区或指定提交范围
  • 大型 diff(>500行):先按文件汇总,再按模块/功能区域分批审查
  • 混合关注点:按功能特性分组,而非按文件顺序

若需要,用 rg 查找相关模块、用法和接口契约,识别入口点、权限边界和关键路径(认证、数据写入、网络调用)。

第二步:SOLID 与架构审查

加载 references/solid-checklist.md 进行系统检查。

重点关注:

  • SRP:类/函数是否承担多个职责
  • OCP:是否通过修改而非扩展来增加功能
  • LSP:子类是否破坏父类契约
  • ISP:接口是否过于臃肿
  • DIP:是否直接依赖具体实现而非抽象

提出重构建议时,必须说明为何能改善内聚性/耦合度,并给出最小化、安全的拆分方案。非简单重构时,提出渐进式计划而非大规模重写。

第三步:可删除代码与迭代计划

加载 references/refactor-plan.md

识别:无用代码、冗余逻辑、功能开关保护的死代码。 分类为:立即安全删除 vs 延后处理(附计划与检查节点)

第四步:安全与可靠性扫描

加载 references/security-checklist.md

覆盖:

  • 注入:SQL 注入、命令注入、LDAP 注入、模板注入
  • 认证与授权:Token 校验缺失、越权访问、会话固定
  • 文件操作:路径穿越、任意文件读写、上传校验不足
  • SSRF:不受限的外部 URL 请求
  • 加密:弱算法、硬编码密钥、不安全随机数
  • 敏感信息:日志泄露、错误信息暴露、配置文件明文
  • 竞态条件与反序列化:并发漏洞、不可信数据反序列化

第五步:代码质量扫描

加载 references/quality-checklist.md

覆盖:错误处理完备性、性能热点、边界条件、可测试性。

第六步:输出报告

输出格式固定如下:

markdown
## 代码审查报告

### 总览
[变更范围概述,受影响的核心模块与影响面评估]

### 发现问题

#### P0 致命问题
- **[文件:行号]** 问题描述
  - 原因:[为什么这是问题]
  - 修复建议:[具体如何修复,可含代码示例]

#### P1 严重问题
[同上格式]

#### P2 中等问题
[同上格式]

#### P3 建议
[同上格式]

### 可删除/重构计划
[来自 refactor-plan 的识别结果]

### 安全摘要
[安全扫描结论,无问题则明确说明已覆盖的检查项]

### 亮点
[代码中做得好的部分,平衡批评]

内联注释格式:::code-comment{file=路径 line=行号 severity=P0}

无问题时,明确说明已覆盖的检查范围与未覆盖项(如已排除的文件)。

第七步:确认下一步

列出选项(等待用户选择,不要自动执行):

请选择后续操作:
1. 修复全部问题(P0 + P1 + P2)
2. 仅修复阻塞性问题(P0 + P1)
3. 指定修复某个问题(请说明编号)
4. 暂不修改,仅保留报告

在用户选择前,不实现任何修改。

警告:当你想直接修改代码时

遇到以下想法,立刻停下——先输出报告,再等待用户指令:

借口现实
"P0 问题这么严重,我帮用户直接修吧"用户可能有不同的修复方案或上下文。先报告,等确认。
"修复很简单,顺手就改了""顺手修复"绕过了用户的决策权,可能引入用户不想要的变更。
"用户肯定想让我修""肯定"不是确认。等待用户从选项中明确选择。
"我跳过安全检查,这个项目看起来没安全问题"安全问题从来不是"看起来"没有就没有。必须按清单逐项检查。
"代码变更太小,不用走完整流程"小变更也会引入 SQL 注入、越权等高危漏洞。没有可以跳过的情况。
"这个问题我已经在报告里提了,顺手修了也无妨"无妨不等于对。铁律:未经确认,不写代码。

参考资源

  • references/solid-checklist.md — SOLID 原则详细检查项
  • references/security-checklist.md — 安全漏洞检查清单
  • references/quality-checklist.md — 代码质量检查清单
  • references/refactor-plan.md — 可删除代码与重构计划模板

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Code Review Expert AI skill do?

Use when 用户要求审查代码、评估代码质量、提交 PR 前检查、发现代码有潜在问题时。触发场景:代码审查、code review、审查代码、review、检查代码、代码检查、代码质量、代码评审、这段代码有问题吗、帮我看看代码、合并前检查。

Why use Code Review Expert on TypingMind?

Because you install it once and use it with any model. Code Review Expert is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Code Review Expert in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ProgrammerAnthony/Expert-Coding-Harness/tree/master/skills/code-review-expert. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Code Review Expert?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Code Review Expert?

As many as you like. As long as a model supports skills, you can use Code Review Expert with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Code Review Expert AI skill free?

Yes. It is published on GitHub by ProgrammerAnthony under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇