法律与合规 · 技能案例
LegalReviewSkill
对比客户提供合同与标准模板,自动标注风险条款、责任不平衡点与关键差异,并生成修订建议、责任人分工与跟进提醒。
Skill 结构概览
- 指令层:要求输出条款对比表、风险评级、修订建议与责任分工。
- 资源层:包含标准合同文本、条款解释、监管要求与风险案例。
- 工具层:脚本解析合同结构,生成差异摘要与审阅日志。
推荐资源
- templates/master-agreement.docx —— 公司标准合同。
- data/clause_library.json —— 条款解释与风险标签。
- scripts/legal_diff.py —— 合同比对脚本。
示例 SKILL.md 片段
---
name: LegalReviewSkill
description: >
Compare inbound agreements against company templates, highlight risky clauses, and generate revision guidance.
version: 1.2.1
visibility: organization
tags:
- legal
- contract
- compliance
entrypoint:
command: review_contract
label: Analyze third-party agreements
---
## When Claude should load this skill
- Invoke when reviewing NDAs, MSAs, SOWs, or other vendor agreements that must align with house templates.
- Use when teams request clause risk scoring, redline suggestions, or approval packets for legal leadership.
## Core workflow
1. Consult `instructions/legal-review-guide.md` for evaluation rubric and escalation thresholds.
2. Run `python scripts/legal_diff.py` to compare inbound language against standards and emit `CLAUSE_DIFF` plus `SUGGESTED_EDIT`.
3. Draft the client-facing response in `templates/risk-summary.md`, attaching tracked changes for review.
## Linked resources
- `templates/master-agreement.docx` — Canonical clause language used as comparison baseline.
- `data/clause_library.json` — Clause variants, fallback options, and commentary from legal ops.
- `instructions/legal-review-guide.md` — Review checklist, fallback approval matrix, and routing guidance.
- `templates/risk-summary.md` — Markdown summary skeleton for surfacing issues to stakeholders.
- `logs/review-register.csv` — Optional audit log for filing completed reviews and owners.
legal_diff.py 样例
import json
from difflib import SequenceMatcher
with open("data/clause_library.json", encoding="utf-8") as fp:
library = json.load(fp)
standard = "赔偿条款:如因甲方原因导致损失..."
inbound = "赔偿条款:若乙方提供的服务出现问题..."
ratio = SequenceMatcher(a=standard, b=inbound).ratio()
risk = "high" if ratio < 0.65 else "medium"
print("CLAUSE_DIFF=", {"match_ratio": ratio, "risk_level": risk})
print("SUGGESTED_EDIT=", library["indemnification"]["recommendation"])
1
上线流程
覆盖法务、销售与合规协作流程。
步骤 1: 整理标准合同、条款库与风险评估标准,完成脱敏处理。
步骤 2: 测试合同比对脚本,确认差异识别与输出格式满足审阅需求。
步骤 3: 将技能分享给销售/法务团队,建立审阅日志与修订追踪机制。
成功指标建议
-45%
合同审阅时间
+30%
风险识别覆盖率
100%
审阅留痕