local-diff-review

local-diff-review is a skill for Claude Code, Codex from YYH211/Claude-meta-skill. It costs 90 tokens per session (929 once invoked), scanned A, original, MIT.

A local review guide for checking changes in a Git repository before opening a pull request, which is a request for others to review and merge code.

In plain words
What is it for?
Use it to inspect a local Git diff, group findings by file and severity, check quality and common issues, and decide whether more tests or fixes are needed.
Why use it?
It provides a structured way to find risks in unstaged, staged, committed, or branch-level changes before they reach reviewers. It also keeps the review focused on concrete problems and fixes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect a local Git diff, group findings by file and severity, check quality and common issues, and decide whether more tests or fixes are needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yyh211/claude-meta-skill/local-diff-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add YYH211/Claude-meta-skill --skill local-diff-review
Clone the repo
git clone --depth 1 https://github.com/YYH211/Claude-meta-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for local-diff-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/yyh211/claude-meta-skill/local-diff-review/github.svg)](https://agentmods.dev/skills/yyh211/claude-meta-skill/local-diff-review)
Your own site
<a href="https://agentmods.dev/skills/yyh211/claude-meta-skill/local-diff-review"><img src="https://agentmods.dev/badge/skills/yyh211/claude-meta-skill/local-diff-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for local-diff-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/yyh211/claude-meta-skill/local-diff-review"><img src="https://agentmods.dev/badge/skills/yyh211/claude-meta-skill/local-diff-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00090 $0.00929
Opus 5 $0.00045 $0.00464
Sonnet 5 $0.00018 $0.00186
Haiku 4.5 $0.00009 $0.00093

Measured 9d ago against content hash 90244ba0e78c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

local-diff-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

local-diff-review/SKILL.md · 97 lines

What it actually says

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

核心原则

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

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

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

使用场景

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

信息收集流程

先收集仓库状态:

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

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

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

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 97 lines · 90 tokens per session scan A 90244ba0e78c

Subscribe to this mod's changes

local-diff-review is a skill published in the GitHub repository YYH211/Claude-meta-skill (277 stars, last pushed 3mo ago), licensed MIT. It adds 90 tokens to every session and 929 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens

engram-branch-pr

PR creation workflow for Engram following the issue-first enforcement system. Trigger: When creating a pull request, opening a PR, or preparing changes for review.

Gentleman-Programming/engram · 37 tokens

verify-behavior

Verify or reproduce visible product behavior by driving the real UI with pi-computer-use's checked tools, requiring verified expect postconditions and durable state evidence for meaningful UI flows. Use when triage needs visual reproduction, implementation needs behavioral proof, review needs interactive confirmation…

nicknisi/dotfiles · 68 tokens

github-contributor

End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating…

daymade/claude-code-skills · 133 tokens

revdiff

Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in agterm/tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…

umputun/revdiff · 248 tokens

write-pr

Reference standards for writing pull request titles and descriptions in the tldraw repository, plus the pre-flight comment sweep over the diff. Use as supporting guidance when another skill or workflow needs PR content standards, not as the user-facing create/update PR workflow.

tldraw/tldraw · 53 tokens