legal-visualization

Generate legal diagrams as draw.io files with SVG, PNG, and PDF exports.

636|91|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/cat-xierluo/legal-skills --skill legal-visualization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: legal-visualization
Source: https://github.com/cat-xierluo/legal-skills/tree/main/skills/legal-visualization
Command: npx skills add https://github.com/cat-xierluo/legal-skills --skill legal-visualization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Turning case materials, contracts, evidence chains, and transaction structures into clear legal diagrams is slow and error-prone when done by hand. This Skill converts legal materials into validated draw.io diagrams with consistent visual semantics, ready for court submissions, client reports, and presentations.

Core Features & Use Cases

  • Scene-routed diagram generation: Routes materials through a legal scene library (litigation, corporate, compliance, contracts, IP, evidence) to pick the right chart type, then produces a structured VizSpec before drawing.
  • Validated draw.io output: Scripts enforce geometry locking, text overflow checks, container rules, and naming conventions before any file is delivered; templates are instantiated by placeholder replacement only.
  • Three-format delivery: Every diagram ships as an editable .drawio source plus SVG and high-resolution PNG exports, with optional PDF for archiving.
  • Use Case: A litigator needs a multi-party loan relationship diagram for a court filing. The Skill routes to the litigation scene, fills a locked template with party names and amounts, marks disputed facts with dashed lines, validates the layout, and exports a court-ready PNG.

Quick Start

Ask the assistant to turn the attached case materials into a legal relationship diagram and export it as PNG and SVG with an editable draw.io source file.

Frequently Asked Questions about legal-visualization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a legal relationship diagram from case materials?

Provide the case materials and state the intended audience, such as judge, client, or legal team. The Skill routes the content to a legal scene, builds a VizSpec, fills a locked draw.io template, validates the layout, and exports SVG and PNG alongside the editable .drawio file.

What output formats does legal diagram generation support?

Every diagram is delivered as a three-file set: an editable .drawio source, an SVG vector image, and a PNG exported at 2x scale by default. PDF can be added for archiving or printing, and PNG scale can be raised to 3x or 4x for large displays.

Does the draw.io export work without the desktop app installed?

No, automated SVG, PNG, and PDF export requires the draw.io or diagrams.net desktop CLI. Without it, the Skill still delivers the validated .drawio source file and reports that image export was not completed, so you can export manually.

How are disputed or unverified facts shown in legal diagrams?

Disputed, asserted, inferred, or missing facts are declared through epistemic status fields and rendered with dashed or dotted lines, gray coloring, and explicit labels like "disputed" or "to be supplemented". Missing facts are never inferred or filled in automatically.

Why does diagram validation fail before export?

The domain validator blocks files with node overlaps, deterministic text overflow, invalid container relationships, or overlong edge labels. Any error must be fixed before copying or exporting; warnings such as estimated label overlap require manual visual review of the exported image.