Diagram to Image Converter
sugarforever/01coder-agent-skills
Converts Mermaid diagrams and markdown tables into PNG images through a hosted rendering API, for platforms without rich formatting.
A skill your agent uses when a user needs a legal or legal-adjacent Mermaid diagram from a document, pasted text, matter description, process, timeline, party map, obligation map, corporate…
$ npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install lawve-ai/awesome-legal-skills legal-diagram --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/lawve-ai/awesome-legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/legal-diagram-sam-zhai .claude/skills/legal-diagram && rm -rf skills-srcUse ~/.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/
Install the "legal-diagram" agent skill from https://github.com/lawve-ai/awesome-legal-skills/tree/main/skills/legal-diagram-sam-zhai into .claude/skills/legal-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-diagram", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/lawve-ai/awesome-legal-skills/tree/main/skills/legal-diagram-sam-zhaiType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install lawve-ai/awesome-legal-skills legal-diagram --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lawve-ai/awesome-legal-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/legal-diagram-sam-zhai .agents/skills/legal-diagram && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "legal-diagram" agent skill from https://github.com/lawve-ai/awesome-legal-skills/tree/main/skills/legal-diagram-sam-zhai into .agents/skills/legal-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-diagram", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install lawve-ai/awesome-legal-skills legal-diagram --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lawve-ai/awesome-legal-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/legal-diagram-sam-zhai .cursor/skills/legal-diagram && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "legal-diagram" agent skill from https://github.com/lawve-ai/awesome-legal-skills/tree/main/skills/legal-diagram-sam-zhai into .cursor/skills/legal-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-diagram", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/lawve-ai/awesome-legal-skills.git --path skills/legal-diagram-sam-zhai--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install lawve-ai/awesome-legal-skills legal-diagram --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lawve-ai/awesome-legal-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/legal-diagram-sam-zhai .gemini/skills/legal-diagram && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "legal-diagram" agent skill from https://github.com/lawve-ai/awesome-legal-skills/tree/main/skills/legal-diagram-sam-zhai into .gemini/skills/legal-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-diagram", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install lawve-ai/awesome-legal-skills legal-diagramInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/lawve-ai/awesome-legal-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/legal-diagram-sam-zhai .github/skills/legal-diagram && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "legal-diagram" agent skill from https://github.com/lawve-ai/awesome-legal-skills/tree/main/skills/legal-diagram-sam-zhai into .github/skills/legal-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-diagram", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install lawve-ai/awesome-legal-skills legal-diagram --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lawve-ai/awesome-legal-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/legal-diagram-sam-zhai .opencode/skills/legal-diagram && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "legal-diagram" agent skill from https://github.com/lawve-ai/awesome-legal-skills/tree/main/skills/legal-diagram-sam-zhai into .opencode/skills/legal-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-diagram", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
legal-diagramA skill your agent uses when a user needs a legal or legal-adjacent Mermaid diagram from a document, pasted text, matter description, process, timeline, party map, obligation map, corporate…
Legal Diagram is an agent skill from lawve-ai/awesome-legal-skills. Use when a user needs a legal or legal-adjacent Mermaid diagram from a document, pasted text, matter description, process, timeline, party map, obligation map, corporate structure, funds flow, or compliance workflow. Trigger on: "diagram this contract", "visualise this deal/matter", "map the parties", "create a timeline of events", "make an org chart", "obligation checklist", "export as HTML diagram". Not for general-purpose non-legal diagrams, pure graphic design, image generation, or legal advice.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 183 other files, including scripts, reference files and assets (for example `PORTABILITY.md`, `README.md` and `references/extraction-schema.md`).
It sits in Development, covering Diagrams and Image generation. It works with Mermaid. The repository describes itself as: A curated list of awesome Agent Skills for automating legal work. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 045f738. It shows what the files ask for, not the result of running them.
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.
Ships 8 files in scripts/ (Python, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
pythonpipFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Legal Diagram loads about 2.6k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 130 tokens; SKILL.md has 1,117 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from lawve-ai/awesome-legal-skills at commit 045f738, republished under its MIT licence (© lawve-ai). 1,117 words, ~2,614 tokens.
.claude/skills/legal-diagram/SKILL.md (or your agent's skills folder). This skill also uses 178 other files; get the full folder from GitHub.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.
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:
--direct/--guided (GATE A), --html (GATE B), --tutorial (tutorial). Nothing else counts.Check explicit short-circuits first:
--tutorial. → Load workflows/tutorial.md. Stop here.shared/setup-check.md, run check_setup.py, report. Stop here.Otherwise this is a real diagram request (a file, pasted text, or a matter description). Detect first-run:
Run python scripts/first_run.py. Parse {state}: returning, first_run, or unknown. Script absent, non-zero exit, or no JSON → treat as unknown.
returning (confirmed) → no offer; user ran skill before. Continue to Step 1.first_run, unknown, or anything not a confirmed returning → GATE 0 (hard stop): "First time here. Want a quick tutorial, or go straight to your diagram?" Options: Start tutorial (recommended, list first) / Skip, straight to my diagram. Present as structured choice, or numbered plain-text list if host has no choice tool, then STOP, wait for reply. After answer, run python scripts/first_run.py --mark to record offer (best-effort; on unknown state with no writable disk, mark may not persist, fine). Then: tutorial → load workflows/tutorial.md, stop; skip → continue to Step 1.unknown defaults to offering, not suppressing: surface the choice, do not decide for user. Suppress only on confirmed returning. Tutorial stays reachable any time by keyword.
Detect input: file path, pasted text, or conversation/matter description. Load shared/setup-check.md (session-cached).
Multi-file scope gate (2+ files) ⛔: mandatory hard stop unless user already stated scope. Present as structured choice, or numbered plain-text list if host has no choice tool, then STOP, wait for reply. Options: One combined diagram / One per document. Never infer scope from wording. Store diagram_scope. Single file, or scope user explicitly stated → skip.
Run Pass 1 only (deterministic manifest, no LLM): workflows/extract.md Steps 0-2. Store the result as manifest_cache and pass it to the chosen lane so Pass 1 never re-runs. Matter-description-only input (no docs) has no Pass 1 counts; proceed without them.
GATE A = mandatory hard stop. ALWAYS fires unless user typed a literal --direct or --guided flag. Do not load a lane and do not generate any diagram until GATE A answered.
Only a literal flag pre-answers. Sole answer-carrier = exact token --direct or --guided in user's message. Present → state resolved mode in one line ("Build mode: direct (flag)") and load the lane. User's own recorded choice, not a model decision.
Everything else → present the gate and STOP. Detailed, specific, or named-diagram request ("comprehensive diagram of this exact case", "make an org chart") = a request, NOT a gate answer. Never infer build mode from wording. Lead with what Pass 1 found, plain language: "Found [N parties, M events, ...]. How should I build it?" (omit counts for no-docs input). Present as structured choice, or numbered plain-text list if host has no choice tool, then wait for reply. Options, fixed order:
Do not reorder options, do not mark one implied from wording. Order fixed; choice is user's.
On choice: load workflows/direct.md or workflows/guided.md, passing manifest_cache, input_source, and diagram_scope. Both lanes share workflows/generation.md for the build; GATE B (HTML report) fires there.
User-facing language (casual-friendly). Never show Mermaid-internal type names to user. Use the plain-language names in shared/diagram-type-map.md § Plain-language names — "timeline", "org chart", "flowchart", "obligation checklist", and so on. Accept plain-word requests too ("make me an org chart") and map them through the same glossary. Legal vocabulary is fine; technical diagram vocabulary stays internal.
Output language (EN/FR). Gates, digest, elicitation, and rationale render in the user's prompt language (EN or FR; FR diagram names per the glossary's FR column). Extracted evidence and diagram labels stay verbatim source language, never translated. HTML export chrome follows via render_html.py --ui-lang en|fr.
All script commands run from the skill root (the folder containing this SKILL.md). Resolve the skill root once, then invoke scripts as python scripts/<name>.py.
| Script | Role |
|---|---|
scripts/check_setup.py | Dependency check → {ok, missing[], installed[], optional{}} |
scripts/first_run.py | First-run state → {state} (returning/first_run/unknown); --mark consumes flag |
scripts/extract_entities.py | Orchestrator: normalize → detect → manifest JSON |
scripts/diagram_selector.py | Enriched extraction + intent → recommended type |
scripts/patch_gate.py | Pass 2 patch gate: validates and applies LLM JSON Patch → {ok, findings[], enriched_extraction_result} |
scripts/eval_pass2.py | Pass 2 eval grader: scores LLM patch against label expectations → {ok, results[], score} |
scripts/render_html.py | Mermaid + FigureDescription → standalone HTML |
scripts/normalize/ (format adapters) and scripts/extraction/ (candidate harvesters, resolver, and materializer) are libraries used by the orchestrator. Install deps once: pip install -r requirements.txt -c constraints.txt for release-verified versions, or omit -c constraints.txt for broad compatibility testing.
| Intent/Need | File |
|---|---|
| First-run walkthrough + setup gate | workflows/tutorial.md |
| Interactive default lane (digest/elicit → menu) | workflows/guided.md |
| Power-user lane (read all signals, hard cap 1) | workflows/direct.md |
| Shared generation core (select → guard → generate → deliver) | workflows/generation.md |
| Two-pass extraction (called by both lanes) | workflows/extract.md |
| Pass 2 quality eval (execute enrichment, grade against labels) | workflows/eval-pass2.md |
| No-docs intake sets + delivery pattern | shared/elicitation.md |
| Standalone HTML figure export | workflows/html-export.md |
| Intent/Need | File |
|---|---|
| Dependency-check procedure | shared/setup-check.md |
| Per-type guards, entity normalization, parser bugs | shared/parser-guards.md |
| FigureDescription fields, captions, legends, risk rubric, caveats | shared/figure-description-schema.md |
| 30 legal categories → Mermaid type | shared/diagram-type-map.md |
| Semantic node categories, palette, CSS class naming | shared/node-styles.md |
| Field catalogue + detection tiers + signals | references/extraction-schema.md |
Output is CLI display only: the fenced Mermaid block renders as an artifact in the Claude web app and as syntax-highlighted code in the CLI. No note file is written. After the block, GATE B offers an HTML report as a selectable choice; the export escapes matter text, runs Mermaid in strict mode, uses vendored Mermaid when present, and loads the pinned CDN fallback only when explicitly enabled. Full output rules: workflows/generation.md § Step 5.
Mermaid is for thinking, planning, explaining, and generating structure. It is not legal advice, not a court-ready exhibit, and not a substitute for legal writing. Every diagram carries a caveat line. Confidential material stays in tools approved for that matter.
© lawve-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 178 other files (scripts, references, assets) in skills/legal-diagram-sam-zhai of lawve-ai/awesome-legal-skills.
Open the folder on GitHubat commit 045f738
Legal Diagram 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Legal Diagram this skilllawve-ai/awesome-legal-skills | 847 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Diagram to Image Convertersugarforever/01coder-agent-skills | 137 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Sf Diagram NanobananaproJaganpro/sf-skills | 424 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Gpt Image Skillfeiskyer/claude-code-settings | 1.7k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Nanobanana Skillfeiskyer/claude-code-settings | 1.7k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Draw.io Diagram StudioAgents365-ai/drawio-skill | 10k | — | ~2.4k | Automated safety check: Notes | MIT |
sugarforever/01coder-agent-skills
Converts Mermaid diagrams and markdown tables into PNG images through a hosted rendering API, for platforms without rich formatting.
Jaganpro/sf-skills
AI-powered image generation for Salesforce visuals via Nano Banana Pro.
feiskyer/claude-code-settings
Generate or edit images using OpenAI GPT Image API (gpt-image-2, gpt-image-1, etc).
feiskyer/claude-code-settings
Generate or edit images via Google Gemini (nanobanana). An agent skill from feiskyer/claude-code-settings.
Agents365-ai/drawio-skill
Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.
spacering-net/codeg
Create publication-quality scientific diagrams using Nano Banana 2 AI with smart iterative refinement.
lawve-ai/awesome-legal-skills
U.S. An agent skill from lawve-ai/awesome-legal-skills.
lawve-ai/awesome-legal-skills
Practitioner skill for advising on EU Regulation 2023/2854 (Data Act).
lawve-ai/awesome-legal-skills
Calendar litigation and arbitration deadlines from a scheduling order.
lawve-ai/awesome-legal-skills
Read, search, and download emails and attachments from Microsoft Outlook via OAuth2.
lawve-ai/awesome-legal-skills
Turn an interpretive-ambiguity audit of a legal text — contract, statute, regulation, or judicial opinion — into a polished deliverable.
lawve-ai/awesome-legal-skills
Audits a website for compliance with Azerbaijan's Law on Personal Data No.
Works with
Categories
A skill your agent uses when a user needs a legal or legal-adjacent Mermaid diagram from a document, pasted text, matter description, process, timeline, party map, obligation map, corporate…. Legal Diagram is an agent skill from lawve-ai/awesome-legal-skills. Use when a user needs a legal or legal-adjacent Mermaid diagram from a document, pasted text, matter description, process, timeline, party map, obligation map, corporate structure, funds flow, or compliance workflow.
Legal Diagram fits situations like: A user needs a legal; legal-adjacent Mermaid diagram from a document; matter description; corporate structure.
Run `npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a claude-code`. Or copy the skill folder (skills/legal-diagram-sam-zhai in lawve-ai/awesome-legal-skills) into .claude/skills/legal-diagram in your project. Claude Code loads it when a task matches its description.
Run `npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a codex`. Or copy the skill folder (skills/legal-diagram-sam-zhai in lawve-ai/awesome-legal-skills) into .agents/skills/legal-diagram in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lawve-ai/awesome-legal-skills --skill legal-diagram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/legal-diagram, .gemini/skills/legal-diagram, .github/skills/legal-diagram and .opencode/skills/legal-diagram in your project.
Going by SKILL.md and its folder, Legal Diagram needs Python for the scripts in its folder and the command-line tools its instructions call (python and pip). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Legal Diagram is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Legal Diagram: Diagram to Image Converter (sugarforever/01coder-agent-skills, 137 stars), Sf Diagram Nanobananapro (Jaganpro/sf-skills, 424 stars), Gpt Image Skill (feiskyer/claude-code-settings, 1.7k stars) and Nanobanana Skill (feiskyer/claude-code-settings, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
lawve-ai (a GitHub organization) maintains it in lawve-ai/awesome-legal-skills, which has 847 GitHub stars. The repository holds 154 skills in this directory. The repository was last updated on October 2, 2026.
Source: lawve-ai/awesome-legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.