Local Diff Review logo

Local Diff Review

Community
YYH211
local-diff-review

基于本地 git diff 的代码审查技能。用于在提交 PR 前先做自检评审,严格复用 pr-review 的三维度标准(代码质量标准、FastGPT 风格规范、常见问题清单),支持审查未暂存改动、已暂存改动、某次提交、或当前分支相对基线分支的全部改动。

Overview

PublisherYYH211
RepositoryClaude-meta-skill
Skill namelocal-diff-review
Stars
285
Forks
28
Bundled files
2
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.

  • 2 bundled files

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

  • Open source

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

Installation

Install the Local Diff Review 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.
    https://github.com/YYH211/Claude-meta-skill/tree/main/local-diff-review
  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/YYH211/Claude-meta-skill.git /tmp/Claude-meta-skill
mkdir -p .claude/skills
cp -r /tmp/Claude-meta-skill/local-diff-review .claude/skills/local-diff-review
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Local Diff Review 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 Local Diff Review 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 Local Diff Review 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.

Local Diff Review(提交前本地评审)

核心原则

  1. 审查标准必须与 pr-review 保持一致,不允许自定义弱化标准。
  2. 先审查再改代码:默认先输出问题清单,只有用户明确要求才改代码。
  3. 结论必须可执行:每个问题都要给出文件路径、行号、风险说明、修复建议。

审查标准来源(必须遵循)

说明:本 skill 的“评审准则”以 pr-review 当前版本为准,以上链接即唯一标准来源。

使用场景

  • 用户希望“先本地 review,再提 PR”。
  • 用户给出“review 我当前改动/本地 diff/暂存区改动/分支差异”。
  • 用户希望获得与 PR review 同等级别的风险分级反馈。

信息收集流程

先收集仓库状态:

bash
git status --short
git branch --show-current
git remote -v

再根据用户意图选择 diff 范围(默认优先问清楚范围):

bash
# 1) 未暂存改动
git diff

# 2) 已暂存改动
git diff --staged

# 3) 工作区全部改动(含暂存+未暂存)
git diff HEAD

# 4) 当前分支相对基线分支(推荐用于“准备提 PR”)
git diff upstream/<base-branch>...HEAD

# 5) 指定提交
git show <commit>

审查步骤

  1. 阅读 diff,按文件分组梳理改动目的。
  2. 依次执行三维度审查(严格按上面 3 份标准文档)。
  3. 标注问题等级:
    • 🔴 严重问题(必须修复)
    • 🟡 建议改进(建议本次修)
    • 🟢 可选优化(可后续处理)
  4. 汇总回归风险:i18n、类型安全、边界行为、兼容性、性能影响。
  5. 给出审查结论:可合并 / 需修改后再审。

输出格式(建议)

1) 变更概览

  • 审查范围(哪一种 diff)
  • 涉及文件数、核心模块

2) 问题清单

每个问题都包含:

  • 文件路径 + 行号
  • 风险等级(🔴/🟡/🟢)
  • 问题描述(为什么是问题)
  • 修复建议(给出可落地方案)

3) 总体结论

  • 是否建议现在提 PR
  • 提 PR 前建议补做的最小验证(如 lint / typecheck / 相关测试)

评审时的行为约束

  1. 不凭空猜测业务意图;证据不足时明确“需用户确认”。
  2. 不把“个人偏好”当成阻塞项。
  3. 不为不存在的调用路径添加过度防御性建议。
  4. 与用户沟通时优先中文、结论清晰、步骤可执行。

常用触发语句(示例)

  • “请按 PR 标准 review 我本地当前改动。”
  • “请 review 我的 git diff --staged,只给问题清单。”
  • “请按 FastGPT 规范审查我当前分支相对 upstream/v4.14.7-dev 的改动。”

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 Local Diff Review AI skill do?

基于本地 git diff 的代码审查技能。用于在提交 PR 前先做自检评审,严格复用 pr-review 的三维度标准(代码质量标准、FastGPT 风格规范、常见问题清单),支持审查未暂存改动、已暂存改动、某次提交、或当前分支相对基线分支的全部改动。

Why use Local Diff Review on TypingMind?

Because you install it once and use it with any model. Local Diff Review 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 Local Diff Review in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/YYH211/Claude-meta-skill/tree/main/local-diff-review. 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 Local Diff Review?

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 Local Diff Review?

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

Is the Local Diff Review AI skill free?

Yes. It is published on GitHub by YYH211 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 👇