法律图表化
将法律材料转化为律师级图表。本 Skill 的作用不是直接画图,而是先判断法律材料适合怎样图表化,再选择合适工具:正式结构图优先使用 draw.io,讲解型白板图优先使用 Excalidraw。
安装
本技能以单个技能包分发:ZIP 解压后应得到一个文件夹,其根目录包含本文件的 SKILL.md,以及子目录 skills/drawio/、skills/excalidraw-diagram-generator/。
- 获取技能 ZIP 后解压,或按客户端提供的 复制安装命令 安装。
- 将整个解压目录放到客户端要求的 skills 根目录下(例如 Claude 的 skills 目录),保持目录名与技能 id 一致(通常为
legal-visualization)。
- 使用时由本 Skill 总控路由:需要正式图表则加载
skills/drawio/SKILL.md,需要手绘白板风则加载 skills/excalidraw-diagram-generator/SKILL.md;二者已随主包安装,无需再单独安装两个画图技能。
核心原则
不要一上来就画图。先判断法律任务类型,提炼当事人、法律关系、请求抗辩、争议焦点、证据和责任结构,再选择图表类型,并判断是否需要拆成多张图。复杂案件通常不应强行塞进一张图。
工具选择
当用户需要正式、结构化、可复用的图表时,使用 draw.io:
- 判决书阅读图
- 裁判逻辑图
- 当事人 / 责任关系图
- 金额与利息分配图
- 合同审查流程图
- 交易结构图
- 担保 / 保全 / 追偿结构图
- 用于报告、客户备忘录、法律意见书或 PPT 的正式图表
当用户需要手绘感、白板式、便于讲解和二次编辑的图表时,使用 Excalidraw:
- 微信公众号文章配图
- 法律概念解释图
- 诉讼策略图
- 课程或直播讲解图
- 简化版案件关系草图
- 用户希望后续在 Excalidraw 中手动调整的图
法律类 Excalidraw 图应使用干净的白板风格,不要做成杂乱手稿风:
- 使用矩形、方形、圆角矩形色块。
- 优先使用
fillStyle: "solid" 和浅色背景。
roughness 保持较低,通常为 0 或 1。
- 默认不要使用
hachure、cross-hatch 或厚重草稿阴影。
- 用不同颜色的描边和箭头表达法律含义。
- 避免巨大的弯曲虚线回路;必要时使用旁注或拆成多张图。
当对应工具 Skill 已安装时,应加载并遵循该工具的规则:
- draw.io:
skills/drawio/SKILL.md (relative to this skill root)
- Excalidraw:
skills/excalidraw-diagram-generator/SKILL.md (relative to this skill root)
如果用户明确指定工具,优先使用该工具;只有明显不适合时,才简要说明取舍。
法律图表化流程
提取法律结构
- 当事人及其角色
- 合同、函件、判决书等关键文件
- 诉讼请求、抗辩、反诉或反请求
- 争议事实
- 法院裁判理由
- 金额、利息、担保、保全、责任分配
- 关键日期和证据锚点
选择图表类型
- 当事人关系图
- 合同链图
- 资金 / 付款流向图
- 担保 / 保全 / 责任结构图
- 时间线图
- 请求 - 抗辩 - 裁判逻辑图
- 判决书争点树
- 金额计算与责任分担图
- 证据链图
- 诉讼策略图
判断一张图还是多张图
- 一张图:简单关系、单一流程、文章配图。
- 三张图:判决书或复杂争议,通常拆成
关系图 + 裁判逻辑图 + 金额/责任图。
- 多张图:长篇判决、多方建设工程纠纷、公司控制权争议,或日期和证据链特别多的案件。
先设计,再渲染
- 为颜色分配稳定的法律含义。
- 先规划泳道或层级,再开始绘制。
- 每个节点控制在 2-4 行。
- 长解释放在节点外,用注释或旁注承载。
Render and verify
- Ensure no text overlaps.
- Ensure no line crosses text or node interiors.
- Route long arrows around the outside.
- Keep labels on white background or away from lines.
- Prefer short orthogonal routes.
- Check mobile readability for WeChat articles.
- For draw.io files, run the layout validator before exporting when possible (from this skill root):
python3 scripts/validate_drawio_layout.py <file.drawio>
- For Excalidraw files, run:
python3 scripts/validate_excalidraw_layout.py <file.excalidraw>
- If the validator reports an edge crossing a non-endpoint node, revise the layout before exporting.
Mandatory Layout Rules
- Never let arrows or connector lines cover text.
- Never let nodes overlap.
- Avoid diagonal spaghetti lines in legal relationship diagrams.
- Route return/recourse/claim-back arrows around the canvas edge.
- Use lanes for chain disputes:
contract/regulatory layer, payment break layer, claim/liability layer.
- For amount/liability charts, separate
amount calculation, ancillary fees, and liability bearers into distinct layers. Do not draw responsibility lines through fee nodes.
- For construction chain diagrams, avoid drawing all legal relationships in one canvas if it creates more than one long outer-loop arrow. Split into
contract chain and risk/claim chain or use a central risk hub.
- For Excalidraw legal diagrams, do not use hachure or cross-hatch fills unless the user explicitly asks for a rough sketch.
- Use separate diagrams instead of forcing all information into one crowded figure.
- For Chinese legal diagrams, avoid long sentences inside boxes.
- For public article diagrams, make the first screen readable on mobile.
Quality Gate
Before final delivery:
- Verify the legal content: no role, amount, claim, or liability is misstated.
- Verify visual readability: no line crosses text, no node overlaps, no label is hidden.
- For draw.io, run the bundled validator script when available.
- If a diagram fails readability, do not explain the failure as a tool limitation; revise the layout.
- If one diagram remains crowded after one revision, split it into multiple focused diagrams.
Legal Color Semantics
- Blue: party, main contract, primary legal relationship
- Green: supported claim, valid path, completion, payment due
- Red: breach, risk, rejection, disputed nonpayment, adverse finding
- Orange: issue, uncertainty, decision point, controversial fact
- Purple: guarantee, security, third-party liability, recourse
- Gray: background fact, neutral actor, supervision, context
Keep color semantics consistent within the same article or report.
Output Defaults
- For draw.io: create
.drawio source and export PNG when possible. Keep the source file unless the user asks for only PNG.
- For Excalidraw: create
.excalidraw source. Do not promise PNG export unless a separate rendering path is available.
- Use descriptive English filenames with legal context, e.g.
judgment-logic.drawio.png, construction-chain-dispute.excalidraw.
- For WeChat article use, prefer separate PNGs or Excalidraw files rather than one overloaded mega-image.
Reference
For detailed legal diagram patterns and examples, read references/legal-diagram-patterns.md when the task involves a judgment, multi-party dispute, construction dispute, case article, or litigation strategy map.
For quality checks and revision patterns, read references/layout-quality-gate.md when a diagram has crossing lines, compressed labels, or user feedback about readability.
1---2name: legal-visualization3description: 法律图表化4---56# 法律图表化78将法律材料转化为律师级图表。本 Skill 的作用不是直接画图,而是先判断法律材料适合怎样图表化,再选择合适工具:正式结构图优先使用 draw.io,讲解型白板图优先使用 Excalidraw。910## 安装1112本技能以**单个技能包**分发:ZIP 解压后应得到**一个文件夹**,其根目录包含本文件的 `SKILL.md`,以及子目录 `skills/drawio/`、`skills/excalidraw-diagram-generator/`。13141. 获取技能 ZIP 后解压,或按客户端提供的 **复制安装命令** 安装。152. 将整个解压目录放到客户端要求的 **skills 根目录**下(例如 Claude 的 skills 目录),保持**目录名与技能 id 一致**(通常为 `legal-visualization`)。163. 使用时由本 Skill **总控路由**:需要正式图表则加载 `skills/drawio/SKILL.md`,需要手绘白板风则加载 `skills/excalidraw-diagram-generator/SKILL.md`;二者已随主包安装,**无需再单独安装两个画图技能**。171819## 核心原则2021不要一上来就画图。先判断法律任务类型,提炼当事人、法律关系、请求抗辩、争议焦点、证据和责任结构,再选择图表类型,并判断是否需要拆成多张图。复杂案件通常不应强行塞进一张图。2223## 工具选择2425当用户需要正式、结构化、可复用的图表时,使用 **draw.io**:26- 判决书阅读图27- 裁判逻辑图28- 当事人 / 责任关系图29- 金额与利息分配图30- 合同审查流程图31- 交易结构图32- 担保 / 保全 / 追偿结构图33- 用于报告、客户备忘录、法律意见书或 PPT 的正式图表3435当用户需要手绘感、白板式、便于讲解和二次编辑的图表时,使用 **Excalidraw**:36- 微信公众号文章配图37- 法律概念解释图38- 诉讼策略图39- 课程或直播讲解图40- 简化版案件关系草图41- 用户希望后续在 Excalidraw 中手动调整的图4243法律类 Excalidraw 图应使用**干净的白板风格**,不要做成杂乱手稿风:44- 使用矩形、方形、圆角矩形色块。45- 优先使用 `fillStyle: "solid"` 和浅色背景。46- `roughness` 保持较低,通常为 `0` 或 `1`。47- 默认不要使用 `hachure`、`cross-hatch` 或厚重草稿阴影。48- 用不同颜色的描边和箭头表达法律含义。49- 避免巨大的弯曲虚线回路;必要时使用旁注或拆成多张图。5051当对应工具 Skill 已安装时,应加载并遵循该工具的规则:52- draw.io: `skills/drawio/SKILL.md` (relative to this skill root)53- Excalidraw: `skills/excalidraw-diagram-generator/SKILL.md` (relative to this skill root)5455如果用户明确指定工具,优先使用该工具;只有明显不适合时,才简要说明取舍。5657## 法律图表化流程58591. **提取法律结构**60 - 当事人及其角色61 - 合同、函件、判决书等关键文件62 - 诉讼请求、抗辩、反诉或反请求63 - 争议事实64 - 法院裁判理由65 - 金额、利息、担保、保全、责任分配66 - 关键日期和证据锚点67682. **选择图表类型**69 - 当事人关系图70 - 合同链图71 - 资金 / 付款流向图72 - 担保 / 保全 / 责任结构图73 - 时间线图74 - 请求 - 抗辩 - 裁判逻辑图75 - 判决书争点树76 - 金额计算与责任分担图77 - 证据链图78 - 诉讼策略图79803. **判断一张图还是多张图**81 - 一张图:简单关系、单一流程、文章配图。82 - 三张图:判决书或复杂争议,通常拆成 `关系图 + 裁判逻辑图 + 金额/责任图`。83 - 多张图:长篇判决、多方建设工程纠纷、公司控制权争议,或日期和证据链特别多的案件。84854. **先设计,再渲染**86 - 为颜色分配稳定的法律含义。87 - 先规划泳道或层级,再开始绘制。88 - 每个节点控制在 2-4 行。89 - 长解释放在节点外,用注释或旁注承载。90915. **Render and verify**92 - Ensure no text overlaps.93 - Ensure no line crosses text or node interiors.94 - Route long arrows around the outside.95 - Keep labels on white background or away from lines.96 - Prefer short orthogonal routes.97 - Check mobile readability for WeChat articles.98 - For draw.io files, run the layout validator before exporting when possible (from **this skill root**):99 `python3 scripts/validate_drawio_layout.py <file.drawio>`100 - For Excalidraw files, run:101 `python3 scripts/validate_excalidraw_layout.py <file.excalidraw>`102 - If the validator reports an edge crossing a non-endpoint node, revise the layout before exporting.103104## Mandatory Layout Rules105106- Never let arrows or connector lines cover text.107- Never let nodes overlap.108- Avoid diagonal spaghetti lines in legal relationship diagrams.109- Route return/recourse/claim-back arrows around the canvas edge.110- Use lanes for chain disputes: `contract/regulatory layer`, `payment break layer`, `claim/liability layer`.111- For amount/liability charts, separate `amount calculation`, `ancillary fees`, and `liability bearers` into distinct layers. Do not draw responsibility lines through fee nodes.112- For construction chain diagrams, avoid drawing all legal relationships in one canvas if it creates more than one long outer-loop arrow. Split into `contract chain` and `risk/claim chain` or use a central risk hub.113- For Excalidraw legal diagrams, do not use hachure or cross-hatch fills unless the user explicitly asks for a rough sketch.114- Use separate diagrams instead of forcing all information into one crowded figure.115- For Chinese legal diagrams, avoid long sentences inside boxes.116- For public article diagrams, make the first screen readable on mobile.117118## Quality Gate119120Before final delivery:1211221. Verify the legal content: no role, amount, claim, or liability is misstated.1232. Verify visual readability: no line crosses text, no node overlaps, no label is hidden.1243. For draw.io, run the bundled validator script when available.1254. If a diagram fails readability, do not explain the failure as a tool limitation; revise the layout.1265. If one diagram remains crowded after one revision, split it into multiple focused diagrams.127128## Legal Color Semantics129130- Blue: party, main contract, primary legal relationship131- Green: supported claim, valid path, completion, payment due132- Red: breach, risk, rejection, disputed nonpayment, adverse finding133- Orange: issue, uncertainty, decision point, controversial fact134- Purple: guarantee, security, third-party liability, recourse135- Gray: background fact, neutral actor, supervision, context136137Keep color semantics consistent within the same article or report.138139## Output Defaults140141- For draw.io: create `.drawio` source and export PNG when possible. Keep the source file unless the user asks for only PNG.142- For Excalidraw: create `.excalidraw` source. Do not promise PNG export unless a separate rendering path is available.143- Use descriptive English filenames with legal context, e.g. `judgment-logic.drawio.png`, `construction-chain-dispute.excalidraw`.144- For WeChat article use, prefer separate PNGs or Excalidraw files rather than one overloaded mega-image.145146## Reference147148For detailed legal diagram patterns and examples, read `references/legal-diagram-patterns.md` when the task involves a judgment, multi-party dispute, construction dispute, case article, or litigation strategy map.149150For quality checks and revision patterns, read `references/layout-quality-gate.md` when a diagram has crossing lines, compressed labels, or user feedback about readability.