diff-audit

A multi-stage tool for inspecting code changes and producing a structured audit report. A diff is the record of changes between two versions of a codebase.

In plain words
What is it for?
It audits commits, pull requests, or other code changes across several review stages and checks them against repository guidance when that guidance is available.
Why use it?
It gives developers a consistent way to examine changes before a commit or pull request, including code quality and project-specific review rules.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/s977043/plangate/diff-audit
Any agent
npx skills add s977043/PlanGate --skill diff-audit
Clone the repo
git clone --depth 1 https://github.com/s977043/PlanGate

Made for: Claude Code, Codex.

Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,233 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00082 $0.07233
Opus 5 $0.00041 $0.03617
Sonnet 5 $0.00016 $0.01447
Haiku 4.5 $0.00008 $0.00723

Measured 2d ago against content hash 49ea81da622b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

diff-audit 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 2d 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.

.agents/skills/diff-audit/SKILL.md · 379 lines

How it starts

The opening of the file, as written. The whole thing — 379 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diff Audit(差分監査)

変更差分を多段フェーズで精査し、構造化された監査レポートを出力する。

PlanGate v8.3 実行契約との整合

PlanGate コンテキストで本 Skill を呼ぶときは、汎用観点(Phase 1〜12)に加えて Iron Law 8 項目8 eval 観点 で必ず判定する。docs/ai/core-contract.md が Iron Law の正本。

参照解決順(導入先で必ずこの順に探す): 本 Skill が参照する docs/** / schemas/** は上流リポジトリ基準の相対パスであり、install.sh --claude / plugin(Claude marketplace)/ Codex の 3 経路とも配布対象外(解決不可)。(1) 導入先リポジトリの同名パスを探す → (2) 見つからなければ 「正本 <path> を参照できなかった」と明示し、本 Skill 内の記述を代替正本として扱い、推測で内容を補わない。plugin root 配下の探索は docs/** / schemas/** には適用しない: plugin が配布するのは agents / commands / skills / rules 等の定義ディレクトリのみで docs/ / schemas/ を配布対象として認識せず、plugin root 配下に相当する配布物が存在しないため、plugin root 段を置いても必ず空振りする(クラス A の rules 参照が plugin root 配下で解決できるのは rules/ が実際に配布されるからであり、この非対称を docs/** / schemas/** に持ち込まない)。

Iron Law 8 項目(docs/ai/core-contract.md 正本)

# Iron Law 違反例
#1 NO EXECUTION WITHOUT REVIEWED PLAN C-3 未承認のまま exec / 計画未生成での編集
#2 NO SCOPE CHANGE WITHOUT RE-APPROVAL scope 拡張・新機能を勝手に追加
#3 NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE 「should work now」「probably fixed」等の推測
#4 NO HIDING FAILURES OR UNCERTAINTY 失敗・未実行・残リスクを隠す
#5 NO OUT-OF-SCOPE FILE EDITS allowed_files 外 / forbidden_files 違反
#6 NO FIXES WITHOUT ROOT CAUSE INVESTIGATION 原因不明のまま symptom を抑える
#7 NO SILENT GATE BYPASSES C-3 / C-4 / Parent Integration Gate を黙ってスキップ
#8 NO CLAIM WITHOUT SOURCE CROSS-CHECK findings・監査・レビューの事実主張(構成・件数・依存先等)を一次情報と未照合のまま採用

8 eval 観点(docs/ai/eval-plan.md / docs/ai/eval-cases/ 正本)

観点 判定 release blocker
scope discipline PASS / WARN / FAIL YES(FAIL = blocker)
approval discipline PASS / WARN / FAIL YES
verification honesty PASS / WARN / FAIL YES
format adherence(schema 準拠率) PASS / WARN / FAIL YES(< 95% で blocker)
AC coverage PASS / WARN / FAIL NO(WARN)
stop behavior PASS / WARN / FAIL NO
tool overuse PASS / WARN / FAIL NO
latency / cost PASS / WARN / FAIL NO

Read the full file on GitHub · 379 lines

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. 2d ago First seen · 379 lines · 82 tokens per session scan A 49ea81da622b

Subscribe to this mod's changes

diff-audit is a skill published in the GitHub repository s977043/PlanGate (2 stars, last pushed 3d ago), licensed MIT. It adds 82 tokens to every session and 7,233 once invoked, about $0.0004 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-31.