martin65536/liquid-glass-webgl/charts

Claude Code and agent skill by martin65536/liquid-glass-webgl

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Professional chart and diagram creation skill. Covers all types of visual data representation and structural diagrams: - **Data charts**: bar charts, line charts, pie charts, scatter plots, heatmaps, radar charts, candlestick charts, boxplots, histograms, area charts, waterfall charts, regression plots, distribution plots, and statistical visualizations. - **Structural diagrams**: flowcharts, mind maps, tree diagrams, org charts, architecture diagrams, network/relationship graphs, ER diagrams, class diagrams, Gantt charts, swimlane diagrams, and sequence diagrams. - **Dashboards**: data dashboards, KPI panels, multi-chart compositions, and interactive visualizations. - **Design quality**: professional color systems, anti-overlap rules, layout optimization, scene-based framework routing (matplotlib, seaborn, ECharts, D3.js, Mermaid, Playwright+CSS), and publication-ready output. Applies when the user wants to create, generate, draw, plot, visualize, or improve any chart, graph, diagram, or dashboard. Also applies when the user asks for something more polished, cleaner, or publication-ready. NOT for: PDF document layout (use pdf skill), slide decks (use slides skill), spreadsheets with embedded charts (use xlsx skill), AI image generation (use image_gen), posters / infographics / creative cards (use pdf skill Creative pipeline). FORBIDDEN: Using matplotlib/seaborn to draw mind maps, tree diagrams, org charts, flowcharts, or any structural diagram. These MUST use Playwright+CSS.

Install

npx vskill@latest install martin65536/liquid-glass-webgl/charts

SKILL.md

Beautiful Charts

Quick Setup

bash
bash "$SKILL_DIR/setup.sh" # Interactive environment check + install

Make every chart and diagram look professionally designed, not AI-generated.

Architecture

ModuleFileWhen to Load
Routing + Core RulesThis fileAlways read first
Framework Templatesreferences/ by frameworkAfter choosing framework, read the corresponding file

Loading order: Read this file → choose framework → read template file → start coding.

Each template file contains its own framework-specific rules (spacing, connectors, color details). This file contains only routing decisions and universal rules that apply to ALL charts.


Part 1: Routing

⚠️ Format Constraint Rule (HIGHEST PRIORITY)

When the user specifies an output format/tool, you MUST comply. Never substitute.

User SaysYou Must DoForbidden
"use mermaid code" / "用Mermaid格式输出" / "转化为mermaid" / "mermaid流程"① Output Mermaid code block (``mermaid ... ``) ② Also provide a rendered image preview❌ Cannot only give image without code; ❌ Cannot screenshot raw code text as image
"use markdown code"Output markdown-formatted hierarchy❌ Cannot switch to HTML/CSS
"via mermaid or markdown code"Choose one of the two, output code text❌ Cannot switch to any non-specified format
"flowchart" / "mind map" (no format specified)Free to choose the best approach-
"use echarts/d3"Must use the specified framework❌ Cannot switch
🚫 FORBIDDEN: Mermaid Code Screenshot

NEVER take a screenshot of raw Mermaid source code and deliver it as the "diagram image". This is the worst possible outcome — the user gets neither usable code nor a visual diagram. When the user requests Mermaid format:

  1. MUST output the Mermaid code in a fenced code block (```mermaid)
  2. SHOULD also render the code into a visual diagram image (via mermaid-cli or Playwright + mermaid.js)
  3. If rendering fails, deliver the code block and tell the user to paste it into mermaid.live
Format Specified vs Auto-Upgrade Conflict

When the user specifies Mermaid but content triggers auto-upgrade conditions (>8 nodes, CJK-heavy, etc.):

  1. User choice wins — still use Mermaid, deliver code block + rendered image
  2. Proactively guide — after delivery, suggest the user try without specifying Mermaid for better layout quality
  3. Never silently switch to Playwright+CSS when user explicitly asked for Mermaid

When a specified tool hits rendering difficulties (e.g., mermaid CDN fails):

  • ✅ Output raw mermaid code text, tell user to view at mermaid.live
  • ❌ Secretly switch to another framework
  • ❌ Screenshot the code text as an "image"

Routing Decision Tree

1. Structural Diagrams
🔴 Flowchart Default: Phased Vertical (HIGHEST PRIORITY)

When the user asks to "generate/create a XXX flowchart/流程图" without specifying format, the DEFAULT layout is Phased Vertical (Layout C in `references/playwright-css.md`).

This is because nearly all real-world processes (manufacturing, legal proceedings, project management, business operations, cooking recipes, etc.) have natural phases/stages. Layout C produces the most professional, readable result.

Flowchart routing priority:

  1. User specified Mermaid/markdown → follow user choice (Format Constraint Rule)
  2. ≤6 nodes AND no phases AND short text → Mermaid (simple flowchart)
  3. Everything else → Playwright + CSS, Layout C (Phased Vertical) → references/playwright-css.md

Phase detection — treat as "has phases" when ANY is true:

  • Content has numbered sections (一、二、三 or 1. 2. 3. or Phase 1/Stage 1)
  • Process can be grouped by time/stage/role (e.g., "preparation → execution → review")
  • Total steps ≥ 5 (almost always groupable into 2+ phases)
  • Process involves multiple roles/departments
  • Process has clear start/end with intermediate stages

⚠️ When in doubt, default to Layout C. A phased layout with only 1 phase still looks professional. A Grid layout with phases looks like a mess.

Other Structural Diagrams
  • Simple flowchart (≤6 nodes, truly flat, no phases): Mermaid
  • Complex flowchart (>6 nodes / CJK-heavy / branches / phases): Playwright + CSS Layout C → references/playwright-css.md
  • Mind map / tree / org chart: Playwright + CSS → references/mindmap-css.md
  • Relationship / network diagram: ECharts graph
  • Center-radial analysis (SWOT / BSC / Porter's Five Forces / PEST): Playwright + CSS → references/radial-grid.md
2. Data Charts (matplotlib / seaborn)
  • Standard bar/line/scatter/heatmap/radar/pie: matplotlib
  • Regression/distribution/boxplot: Seaborn
3. Interactive Charts / Dashboards
  • Data dashboard / candlestick / real-time: ECharts
  • Fully custom interactive: D3.js
Default Strategy

One scene, one tool — don't hesitate:

SceneToolTemplate
Data chart (bar/line/scatter/pie/radar)matplotlibreferences/matplotlib.md
Statistical (regression/box/dist)Seabornreferences/seaborn.md
Mind map / tree / org chartPlaywright + CSSreferences/mindmap-css.md
Center-radial (SWOT/BSC/PEST/Five Forces)Playwright + CSSreferences/radial-grid.md
Any flowchart (default)Playwright + CSS Layout C`references/playwright-css.md`
Simple flowchart (≤6 nodes, truly flat)Mermaidreferences/mermaid.md
Relationship / force-directedECharts graphreferences/echarts.md
Data dashboardEChartsreferences/echarts.md
Academic paper figuresmatplotlibreferences/matplotlib.md

Mermaid Auto-Upgrade Rules

Mermaid's dagre/elk layout estimates CJK widths incorrectly. Auto-switch to Playwright+CSS when ANY condition is met:

TriggerAction
Total nodes > 6→ CSS flowchart (Layout C)
Any node text > 12 Chinese characters→ CSS flowchart
More than 3 parallel branches→ CSS flowchart
Nested subgraphs > 2 levels→ CSS flowchart
Connector crossings > 2→ CSS flowchart
Side annotations / dashed note boxes→ CSS flowchart
Loop-back / cycle arrows→ CSS flowchart
Process has identifiable phases/stages→ CSS flowchart (Layout C)

If staying with Mermaid: padding: 32, nodeSpacing: 80, rankSpacing: 80. Node text ≤ 10 CJK chars/line, wrap with <br>, quote all text A["text"].


Large Dataset Rendering

Data SizeApproach
< 1,000 pointsmatplotlib / any
1,000 - 10,000matplotlib (no markers) or ECharts
10,000 - 100,000ECharts (Canvas mode)
> 100,000ECharts (large: true) or WebGL

Part 2: Universal Rules

These rules apply to ALL charts regardless of framework. Framework-specific rules live in each template file.

7 Core Rules

  1. Zero overlap. No element may cover another's text. Overlap = information loss = task failure. Post-generation: verify every element has clear separation.
  1. Hierarchy over uniformity. Primary nodes larger/bolder than secondary. Annotation nodes smaller/muted. Spacing between groups > within groups. If every box looks identical, the layout has failed.
  1. Low-saturation palette. 70% background/neutral, 20% secondary, 10% accent (one highlight only). No high-saturation large fills. Saturated colors only on borders (2px), text, and small elements.
  1. Insight first. Titles express conclusions, not field names. Remove non-essential elements: top/right borders, grid lines, tick marks, legend box borders. If removing it doesn't reduce understanding, it shouldn't exist.
  1. Label clarity over label method. The goal is zero overlap — choose the method that achieves it for each chart type. Direct labels, legends, and leader lines are all valid; what matters is that nothing overlaps.
🚫 FORBIDDEN: Any Text Overlapping Any Other Element

No label, legend, annotation, or title may overlap any other visual element. This is the single most common matplotlib defect. Both direct labels AND legends can cause overlap — neither is inherently safe.

Anti-overlap decision tree:

  1. Check if direct labels fit — if all labels have enough space (bar tops, line endpoints, large pie slices), label directly. No legend needed.
  2. If some labels would collide (small pie slices, dense scatter points, clustered bars) → use legend outside plot area instead of forcing labels into tight spaces.
  3. Mixed approach — label the major items directly, group small items into "其他" or use leader lines + legend for the small ones.

Pie chart specific (the worst offender):

  • Slices < 5%: MUST use leader lines (wedgeprops + texts manual repositioning, or matplotlib.patches.ConnectionPatch) to pull labels outside. Do NOT rely on autopct alone — it places text inside/near the slice.
  • Multiple small adjacent slices: use bbox_to_anchor legend outside, NOT direct labels
  • labeldistance=1.25 minimum to keep labels outside the pie
  • When >2 slices are < 5%, consider grouping all < 3% into "其他(X项)"
  • Use adjustText library to auto-resolve label collisions when available

Legend placement (when legend is needed):

  • Place legend outside the plot area using bbox_to_anchor
  • Suggested starting positions:
  • Bar/line/scatter: right side outside (bbox_to_anchor=(1.02, 1), loc='upper left')
  • Pie: right side outside (bbox_to_anchor=(1.1, 0.5), loc='center left')
  • Radar: below chart (bbox_to_anchor=(0.5, -0.15), loc='upper center')
  • Heatmap: no legend needed (colorbar suffices)

🔧 Mandatory: auto-adjust legend to prevent overlap. Copy this snippet after placing any legend:

python
# ── Auto-adjust legend position to prevent overlap ──
fig.canvas.draw() # must render first to get bboxes
legend = ax.get_legend()
if legend:
renderer = fig.canvas.get_renderer()
# Try shifting up to 5 times to resolve overlap
for _ in range(5):
leg_bb = legend.get_window_extent(renderer).transformed(ax.transAxes.inverted())
has_overlap = False
for text in ax.texts + [ax.title] + ax.get_xticklabels() + ax.get_yticklabels():
if not text.get_text():
continue
txt_bb = text.get_window_extent(renderer).transformed(ax.transAxes.inverted())
if leg_bb.overlaps(txt_bb):
has_overlap = True
break
if not has_overlap:
break
# Move legend further outside (direction depends on current loc)
bbox = legend.get_bbox_to_anchor().transformed(ax.transAxes.inverted())
x0, y0 = bbox.x0, bbox.y0
# Heuristic: if legend is below center, move down; if right of center, move right
if y0 < 0.5:
legend.set_bbox_to_anchor((x0, y0 - 0.08), transform=ax.transAxes)
else:
legend.set_bbox_to_anchor((x0 + 0.08, y0), transform=ax.transAxes)
fig.canvas.draw()
  • After placing legend: always call plt.tight_layout() or fig.subplots_adjust() to ensure legend is not clipped

🚫 FORBIDDEN:

  • loc='best' — matplotlib's "best" frequently overlaps data
  • loc='upper right' / loc='lower right' on line/bar charts — high collision risk
  • Direct labels on pie slices < 5% without leader lines
  • Any text placement without verifying zero overlap
  1. Font discipline. Max 2 fonts. Chinese: SimHei/PingFang SC. Always explicitly set fonts in code. Font size follows hierarchy (title 18-24px → body 13-15px → annotation 11-13px). Never go below 10px floor. When text overflows: condense text → enlarge canvas → last resort: shrink font (but never below floor).

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
70
Repository forks
6
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/martin65536/liquid-glass-webgl/charts/badge)](https://verified-skill.com/skills/martin65536/liquid-glass-webgl/charts)

Something wrong with this skill or its page? Tell us.