legal-diagram
Installation
SKILL.md
/legal-diagram
Standalone skill: turn legal material into a context-appropriate Mermaid diagram, with an optional downloadable HTML figure. A structure-preserving Python engine extracts a typed ground truth; directive-driven LLM enrichment fills the gaps; a selector picks the diagram type; the diagram is generated natively.
Routing gate
Every real diagram request runs in this fixed order: first-run check, ingest, build-mode gate, generate, report gate. Non-diagram intents short-circuit at Step 0.
Three human gates = mandatory hard stops: GATE 0 (tutorial offer), GATE A (build mode), GATE B (HTML report). Gate discipline, no exceptions:
- Present each as structured choice (the question tool). No such tool → numbered plain-text list. Either way, STOP, wait for reply.
- Never skip a gate. Never infer its answer from wording. Never generate past an unanswered gate. Detailed, specific, or named-diagram request = still a request, not a gate answer.
- Only a literal typed flag may pre-answer:
--direct/--guided(GATE A),--html(GATE B),--tutorial(tutorial). Nothing else counts.
Step 0 — Intent and first-run
Check explicit short-circuits first: