Agent skill

Local Diff Review

by YYH211 in YYH211/Claude-meta-skill

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

MITAuto-check passedDevelopment

Install Local Diff Review

skills CLI
$ npx skills add YYH211/Claude-meta-skill --skill local-diff-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install YYH211/Claude-meta-skill local-diff-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/YYH211/Claude-meta-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/local-diff-review .claude/skills/local-diff-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
local-diff-review
GitHub stars
282
Token cost
~407 tokens
SKILL.md length
104 words
Files
3
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 3 steps: 变更概览 → 问题清单 → 总体结论
  • Tasks that involve Pull requests
  • SKILL.md covers 核心原则, 审查标准来源(必须遵循), 使用场景 and 信息收集流程, plus 4 more sections
  • Calls git

What it does

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

Its SKILL.md is about 410 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `code-quality-standards.md` and `common-issues-checklist.md`).

It sits in Development, covering Pull requests. It works with Git. The repository describes itself as: A curated collection of reusable skills for Claude Code. Enhance Claude's capabilities with ready-to-use skill modules including comprehensive guides, templates, and best… The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/local-diff-review”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 变更概览
  2. 问题清单
  3. 总体结论

What it can do on your machine

Read from SKILL.md and the folder at commit ba6f50c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Local Diff Review loads about 407 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 104 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~407

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from YYH211/Claude-meta-skill at commit ba6f50c, republished under its MIT licence (© YYH211). 104 words, ~407 tokens.

Download SKILL.mdSave it as .claude/skills/local-diff-review/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
local-diff-review
description
基于本地 git diff 的代码审查技能。用于在提交 PR 前先做自检评审,严格复用 pr-review 的三维度标准(代码质量标准、FastGPT 风格规范、常见问题清单),支持审查未暂存改动、已暂存改动、某次提交、或当前分支相对基线分支的全部改动。

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 的改动。”

© YYH211, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in local-diff-review of YYH211/Claude-meta-skill.

  • SKILL.md
  • code-quality-standards.md
  • common-issues-checklist.md

Open the folder on GitHubat commit ba6f50c

Compare with similar skills

Local Diff Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Local Diff Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local Diff Review this skillYYH211/Claude-meta-skill282—~407Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review45k—~3.1kAutomated safety check: PassApache-2.0
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    45k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed

More from YYH211/Claude-meta-skill

All 8 skills in this repo
  • Software Copyright Writer

    YYH211/Claude-meta-skill

    根据真实代码仓库、官网页面、运行界面、模块范围和目标软著数量,分析软件著作权(软著)申报方向,拆分可申报主题,检查 Logo、版权、备案、截图和源码等材料约束,生成 3w-4w 字正文、局部代码片段、源码原文、网页截图证据和 .docx 文档。Use when Claude needs to prepare or split legitimate software copyright…

    282 GitHub stars~2.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Daily AI News

    YYH211/Claude-meta-skill

    Aggregates and summarizes the latest AI news from multiple sources including AI news websites and web search.

    282 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Fastgpt Workflow Generator

    YYH211/Claude-meta-skill

    Generates production-ready FastGPT workflow JSON from natural language requirements.

    282 GitHub stars~5.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Dry Refactoring

    YYH211/Claude-meta-skill

    Guides systematic code refactoring following the DRY (Don't Repeat Yourself) principle.

    282 GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Frontend Design

    YYH211/Claude-meta-skill

    Creates unique, production-grade frontend interfaces with exceptional design quality.

    282 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Prompt Optimize

    YYH211/Claude-meta-skill

    Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue.

    282 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Works with

Categories

Questions about Local Diff Review

What does Local Diff Review do?

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

When should I use Local Diff Review?

Local Diff Review fits situations like: tasks that involve Pull requests.

How do I install Local Diff Review in Claude Code?

Run `npx skills add YYH211/Claude-meta-skill --skill local-diff-review -a claude-code`. Or copy the skill folder (local-diff-review in YYH211/Claude-meta-skill) into .claude/skills/local-diff-review in your project. Claude Code loads it when a task matches its description.

How do I install Local Diff Review in Codex?

Run `npx skills add YYH211/Claude-meta-skill --skill local-diff-review -a codex`. Or copy the skill folder (local-diff-review in YYH211/Claude-meta-skill) into .agents/skills/local-diff-review in your project. Codex loads it when a task matches its description.

Can I use Local Diff Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add YYH211/Claude-meta-skill --skill local-diff-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/local-diff-review, .gemini/skills/local-diff-review, .github/skills/local-diff-review and .opencode/skills/local-diff-review in your project.

What does Local Diff Review need to run?

Going by SKILL.md and its folder, Local Diff Review needs the command-line tools its instructions call (git).

Does Local Diff Review access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Local Diff Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Local Diff Review use?

Local Diff Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Local Diff Review use?

About 407 tokens (SKILL.md is roughly 1.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Local Diff Review?

Skills that share tags, products or a category with Local Diff Review: Finishing a Development Branch (obra/superpowers, 297k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Open Code Review CLI (alibaba/open-code-review, 45k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local Diff Review?

YYH211 (a GitHub user) maintains it in YYH211/Claude-meta-skill, which has 282 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on May 15, 2026.

Source: YYH211/Claude-meta-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.