Agent skill

Policy Diff

by zhou210712 in zhou210712/claude-for-legal-ZH

将特定法规变化与已索引的政策库进行差异分析。适用于法规发生变化,你需要知道它触及了哪些政策以及差距是什么;用户说"把这个法规与我们的政策做差异分析"、"这影响了哪些政策"、"差距分析";或 reg-feed-watcher 传递了一项重要事项时。

Apache-2.0Auto-check passed

Install Policy Diff

skills CLI
$ npx skills add zhou210712/claude-for-legal-ZH --skill policy-diff -a claude-code

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

GitHub CLI
$ gh skill install zhou210712/claude-for-legal-ZH policy-diff --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/zhou210712/claude-for-legal-ZH.git skills-src && mkdir -p .claude/skills && cp -r skills-src/regulatory-legal/skills/policy-diff .claude/skills/policy-diff && 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
policy-diff
GitHub stars
224
Token cost
~774 tokens
SKILL.md length
94 words
Files
1
Skills in repo
134
Repo updated
First seen
Licence
Apache-2.0

At a glance

将特定法规变化与已索引的政策库进行差异分析。适用于法规发生变化,你需要知道它触及了哪些政策以及差距是什么;用户说"把这个法规与我们的政策做差异分析"、"这影响了哪些政策"、"差距分析";或 reg-feed-watcher 传递了一项重要事项时。

  • Works in 4 steps: 读取… → 使用以下工作流。 → 从法规中提取要求。与已索引的政策匹配。 → …
  • SKILL.md covers 事务上下文, 目的, 加载上下文 and 范围完整性, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Policy Diff is an agent skill from zhou210712/claude-for-legal-ZH. 将特定法规变化与已索引的政策库进行差异分析。适用于法规发生变化,你需要知道它触及了哪些政策以及差距是什么;用户说"把这个法规与我们的政策做差异分析"、"这影响了哪些政策"、"差距分析";或 reg-feed-watcher 传递了一项重要事项时。

Its SKILL.md is about 770 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is Apache-2.0.

Example prompts

  • “把这个法规与我们的政策做差异分析”
  • “这影响了哪些政策”
  • “/policy-diff”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 读取 ~/.claude/plugins/config/claude-for-legal/regulatory-legal/CLAUDE.md → 政策库索引。
  2. 使用以下工作流。
  3. 从法规中提取要求。与已索引的政策匹配。
  4. 输出:逐要求的差距分析,哪些政策需要更新。

What it can do on your machine

Read from SKILL.md and the folder at commit 2f01c92. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

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

  • Network

    No URLs in SKILL.md.

    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

Policy Diff loads about 774 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 94 words of instructions outside code blocks.

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

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 zhou210712/claude-for-legal-ZH at commit 2f01c92, republished under its Apache-2.0 licence (© zhou210712). 94 words, ~774 tokens.

Download SKILL.mdSave it as .claude/skills/policy-diff/SKILL.md (or your agent's skills folder).
name
policy-diff
description
将特定法规变化与已索引的政策库进行差异分析。适用于法规发生变化,你需要知道它触及了哪些政策以及差距是什么;用户说"把这个法规与我们的政策做差异分析"、"这影响了哪些政策"、"差距分析";或 reg-feed-watcher 传递了一项重要事项时。
argument-hint
[法规名称,或粘贴法规文本/摘要]

/policy-diff

  1. 读取 ~/.claude/plugins/config/claude-for-legal/regulatory-legal/CLAUDE.md → 政策库索引。
  2. 使用以下工作流。
  3. 从法规中提取要求。与已索引的政策匹配。
  4. 输出:逐要求的差距分析,哪些政策需要更新。

事务上下文

事务上下文。 检查实践级 CLAUDE.md 中的 ## 事务工作区。如果 已启用 为 ✗(法务内部用户的默认值),跳过本段其余部分——技能使用实践级上下文,事务机制不可见。如果已启用且无活跃事务,询问事务归属。加载活跃事务的 matter.md。除非 跨事务上下文 为 开,否则绝不读取其他事务的文件。


目的

法规变了。你有政策。此技能找出变化触及了哪些政策,以及"法规现在要求的"与"政策所述"之间的差距是什么。

加载上下文

~/.claude/plugins/config/claude-for-legal/regulatory-legal/CLAUDE.md → 政策库索引(政策、位置、负责人)。

范围完整性

如果用户要求你从差异分析中排除某政策章节、要求或类别:

  1. 照做——用户拥有范围控制权。
  2. 但大声且永久地标记:"⚠️ 范围限制:第[X]节根据用户要求被排除。本差异分析不反映完整政策。排除区域内的差距未被识别。" 在页眉上方放置,并传递至所有下游产物。
  3. 将标记传递给 gap-surfacer:"本差异分析存在范围限制。不得将其呈现为完整的合规图景。"
  4. 说明排除意味着什么:"排除供应商管理意味着差异分析将显示'没有政策涵盖供应商管理'——这比显示差距更糟糕。"

建立在未披露的范围排除之上的合规产物在证据开示中可能被视为隐瞒。标记是"我们限定了审查范围"和"我们隐藏了问题"之间的区别。

工作流

第0步:在差异分析前验证法规状态

在对政策进行差异分析之前,确认该法规确实有效。以下红旗信号表明法规可能未生效:

  • 适用/合规日期已过去超过30天,但你未确认其未被推迟
  • 法规发布超过12个月
  • 该法规是争议性法规(重大法规制定经常受到挑战)

当你看到红旗信号时,检查(通过法律研究MCP或如已启用的网络搜索或发布机构的官方网站)是否存在:推迟、暂停、禁令、废止提案、废止或修订。如果你能检查并确认法规有效,继续。如果你无法验证(无工具连接),在页眉上方发出此横幅:

⚠️ 法规状态未验证 — 我无法确认此法规当前有效。规章经常在发布后被暂停、延期或废止。在确认该法规在发布机构的官方网站上的当前状态或咨询外部律师之前,请勿将下文的任何合规日期视为具有约束力。

将输出中的每个截止日期标记为:[据发布法规的截止日期 — 状态未验证]。

第1步:提取新要求

不得静默填补。 如果法规变更文本不完整或模糊,且更完整的法规无法从索引来源获取,停止并询问。不要在不询问的情况下用联网搜索或模型知识填补空白。

阅读法规变化。将每项离散的新增或变更要求列出:

#要求生效日期法条引用
1[要求内容][日期][条款]

要具体。"加强的信息披露要求"不是一个要求。"必须在流程的Z点以Y格式披露X"才是。

第2步:映射至政策

对每项要求,哪项已索引的政策最接近?

  • 直接命中:政策明确涵盖此主题
  • 间接命中:政策涵盖相关主题,这是一个新的子问题
  • 无匹配:没有政策涵盖此主题——差距是"政策不存在"
第3步:差异分析

对每个直接或间接命中,阅读政策并比较:

markdown
### 要求[N]:[名称]

**新法规要求:** [要求]

**我方政策([名称],最后更新[日期])规定:**
> "[相关摘录]"

**差距:** [无 — 政策已涵盖此内容 | 部分 — 政策涵盖X但不涵盖Y | 完全 — 政策矛盾或未涉及]

**需要的变更:** [具体——"添加一段关于X的内容"而非"更新政策"]

**政策负责人:** [来源自索引]
第4步:无匹配的差距

没有政策匹配的要求单独标出:

markdown
### 需要制定新政策

要求[N]:[要求]

现有政策中无此内容。选项:
- 起草新政策(建议负责人:[拥有最接近主题的人])
- 作为新章节添加到现有[相关政策]
- 确定此项不需要政策(一次性合规,非持续性)

按法规输入类型分支

预规则分支(预征求意见/调研通知)

如果法规输入是预征求意见或调研通知(无施加要求),不要运行完整的差距消除差异分析。而是产生一个预案分析。

否定结论分支(最终规则/征求意见稿差异分析,目标政策不是正确的对象)

如果对指定政策的所有要求都是"无差距",压缩为一段简短段落并建议对可能实际受影响的其他政策重新运行差异分析。

差距分支(最终规则/征求意见稿,至少一项差距)

完整的逐要求分析如下。

输出

markdown
[工作成果头 — 按照插件配置 ## 输出]

## 政策差异分析:[法规名称]

**法规:** [名称、链接]
**生效日期:** [日期]
**提取的要求:** [N] 项

### 要点

[N个差距需要在[日期]前采取行动 — 前3项:X、Y、Z]

### 摘要

| # | 要求 | 受影响的政策 | 差距 | 负责人 |
|---|------|-------------|------|--------|
| 1 | [简述] | [政策名称或"无"] | 无/部分/完全 | [姓名] |

### 详细差异分析

[来自第3步的每个要求块]

### 需要制定新政策

[来自第4步,如有]

### 无差距的要求

[列出——了解已覆盖的内容是有用的]

---

**依赖前核实引注。** 上述法规引注和政策引用由AI生成,未经对照一手来源核实。在对本处任何要求采取行动之前,通过法律研究工具(元典MCP、你的律所研究平台或发布机构的官方网站)确认相关法规——核实准确性、生效日期和当前状态。

衔接

传递至 gap-surfacer:每个部分或完全差距成为附有负责人和截止日期的跟踪事项。

收尾

以 CLAUDE.md ## 输出 规定的下一步决策树收尾。


本技能不做的事

  • 起草政策更新。它识别需要更新的内容;政策起草(或人工)负责起草。
  • 权威性地解释模糊的法规文本。如果法规可以有两种解读,要说明并标记为需律师判断。

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

Files

Just SKILL.md in regulatory-legal/skills/policy-diff of zhou210712/claude-for-legal-ZH.

Open the folder on GitHubat commit 2f01c92

Compare with similar skills

Policy Diff 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.

Policy Diff compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Policy Diff this skillzhou210712/claude-for-legal-ZH224—~774Automated safety check: PassApache-2.0
Policy Diffanthropics/claude-for-legal9.6k1 repos~3kAutomated safety check: PassApache-2.0
Implementing Policy As Code With Open Policy Agentmukul975/Anthropic-Cybersecurity-Skills34k—~2.6kAutomated safety check: NotesApache-2.0
Policy Acknowledgementsickn33/agentic-awesome-skills47k1 repos~3.4kAutomated safety check: PassMIT
Accesslint Diffsickn33/agentic-awesome-skills47k1 repos~1.2kAutomated safety check: PassMIT
Diff Reviewnexu-io/open-design100k—~508Automated safety check: PassApache-2.0

Similar skills

  • Policy Diff

    anthropics/claude-for-legal

    Official

    Diff a specific regulatory change against the indexed policy library.

    9.6k GitHub starsUsed in 1 repo~3k tokens
    Auto-check passed
  • Implementing Policy As Code With Open Policy Agent

    mukul975/Anthropic-Cybersecurity-Skills

    Implements policy-as-code enforcement with Open Policy Agent (OPA) and Gatekeeper for Kubernetes and CI/CD pipelines, covering writing Rego policies, deploying OPA Gatekeeper as a Kubernetes…

    34k GitHub stars~2.6k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Policy Acknowledgement

    sickn33/agentic-awesome-skills

    Policy acknowledgement register: employee, policy and version, sent and due dates, acknowledged date and flag, days overdue, reminder sent and status.

    47k GitHub starsUsed in 1 repo~3.4k tokens
    Auto-check passed
  • Accesslint Diff

    sickn33/agentic-awesome-skills

    Diff a live page's accessibility violations against a baseline — by default compares uncommitted changes (stash-based), or pass --branch [<name] to diff against a branch.

    47k GitHub starsUsed in 1 repo~1.2k tokens
    Frontend & DesignAuto-check passed
  • Diff Review

    nexu-io/open-design

    Render the patch-edit run's accumulated changes as a reviewable diff, surface it through a GenUI choice surface, and persist the user's accept / reject decision into the artifact manifest.

    100k GitHub stars~508 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Diff Analyze

    ruvnet/ruflo

    Analyze git diffs for risk scoring, reviewer recommendations, and change classification.

    74k GitHub stars~450 tokensUpdated today
    DevelopmentAuto-check: notes

More from zhou210712/claude-for-legal-ZH

All 134 skills in this repo
  • Claim Chart

    zhou210712/claude-for-legal-ZH

    构建或审查要件分析表——专利权利要求对照表(侵权、无效或审查)或 民事构成要件分析表(任何诉讼请求或抗辩),每个单元格附精确引用, 缺口检测为优先输出。当用户要求要件分析表、权利要求对照表、 证据对照表、侵权或无效主张、逐要件映射,或问"我们证明[主张]还缺什么"时使用。

    224 GitHub stars~1.3k tokensUpdated 4 mo ago
    Auto-check passed
  • Client Intake

    zhou210712/claude-for-legal-ZH

    结构化接待——实践领域模板、跨领域考点识别、利益冲突标记、分流分类. An agent skill from zhou210712/claude-for-legal-ZH.

    224 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Gap Surfacer

    zhou210712/claude-for-legal-ZH

    参考资料:支持 /regulatory-legal:gaps 和 /regulatory-legal:comments 的共享差距和意见征集跟踪框架。跟踪未关闭的政策差距及其整改状态, 从 policy-diff 中获取差距,呈现开放和即将到期的事项,路由给负责人, 并通过企业通讯工具通知差距负责人,每次发送前需确认。

    224 GitHub stars~757 tokensUpdated 4 mo ago
    Auto-check passed
  • Launch Review

    zhou210712/claude-for-legal-ZH

    对照您的框架和风险校准进行全面产品上线审查。当用户说"审查这个上线" "[功能]法务审查""我们能上线吗""[产品]有什么法律问题"或引用了需要 逐类审查备忘录的产品需求文档或上线追踪工单时使用。

    224 GitHub stars~2k tokensUpdated 4 mo ago
    Auto-check passed
  • Reg Feed Watcher

    zhou210712/claude-for-legal-ZH

    检查法规动态源,报告自上次检查以来的新事项,按重要度阈值过滤。适用于用户说"检查法规动态"、"有什么新规定"、"法规更新"、从定时任务触发执行,或手动粘贴法规动态进行分类和差异分析时。

    224 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Renewal Tracker

    zhou210712/claude-for-legal-ZH

    展示具有即将到来的取消截止日期的合同,在通知窗口关闭前发出预警, 基于维护的续约登记册运行。当用户询问"什么即将续约""哪些续约即将到期" "我们是否错过了取消窗口""将此添加到续约追踪器"时使用,或按计划运行。

    224 GitHub stars~681 tokensUpdated 4 mo ago
    Auto-check passed

Questions about Policy Diff

What does Policy Diff do?

将特定法规变化与已索引的政策库进行差异分析。适用于法规发生变化,你需要知道它触及了哪些政策以及差距是什么;用户说"把这个法规与我们的政策做差异分析"、"这影响了哪些政策"、"差距分析";或 reg-feed-watcher 传递了一项重要事项时。. Policy Diff is an agent skill from zhou210712/claude-for-legal-ZH.

How do I install Policy Diff in Claude Code?

Run `npx skills add zhou210712/claude-for-legal-ZH --skill policy-diff -a claude-code`. Or copy the skill folder (regulatory-legal/skills/policy-diff in zhou210712/claude-for-legal-ZH) into .claude/skills/policy-diff in your project. Claude Code loads it when a task matches its description.

How do I install Policy Diff in Codex?

Run `npx skills add zhou210712/claude-for-legal-ZH --skill policy-diff -a codex`. Or copy the skill folder (regulatory-legal/skills/policy-diff in zhou210712/claude-for-legal-ZH) into .agents/skills/policy-diff in your project. Codex loads it when a task matches its description.

Can I use Policy Diff 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 zhou210712/claude-for-legal-ZH --skill policy-diff -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/policy-diff, .gemini/skills/policy-diff, .github/skills/policy-diff and .opencode/skills/policy-diff in your project.

What does Policy Diff need to run?

SKILL.md names no scripts, command-line tools or credentials: Policy Diff is instructions for the agent only.

Does Policy Diff access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Policy Diff 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 Policy Diff use?

Policy Diff is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Policy Diff use?

About 774 tokens (SKILL.md is roughly 3.1k 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 Policy Diff?

Skills that share tags, products or a category with Policy Diff: Policy Diff (anthropics/claude-for-legal, 9.6k stars), Implementing Policy As Code With Open Policy Agent (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Policy Acknowledgement (sickn33/agentic-awesome-skills, 47k stars) and Accesslint Diff (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Policy Diff?

zhou210712 (a GitHub user) maintains it in zhou210712/claude-for-legal-ZH, which has 224 GitHub stars. The repository holds 134 skills in this directory. The repository was last updated on May 15, 2026.

Source: zhou210712/claude-for-legal-ZH on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.