一键导入
chart
Render a data chart (bar, line, area, pie, donut, scatter) to PNG using matplotlib. Accepts chart type and data, produces a rasterised PNG.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Render a data chart (bar, line, area, pie, donut, scatter) to PNG using matplotlib. Accepts chart type and data, produces a rasterised PNG.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Produce a labeled figure with PERFECT text — render a label-free image locally (or take an external image) then overlay leader lines and typeset labels programmatically from vision-derived anchor coordinates. Text is correct by construction; only pointer placement is reviewed.
Ask which image models fit a set of tasks — get evidence-based recommendations with per-image costs, which external services to pay for, and which local models to install (with disk/RAM/licence guidance). Reads the live model catalog and probes what is actually available on this machine.
Check mflux (MLX) availability, per-family runtime presence, cached weights, and report readiness status.
Top-level image orchestrator. Routes all slide image generation to the appropriate skill (jack-tar-ollama:image, jack-tar-ollama:icon, jack-tar-ollama:pattern, jack-tar-ollama:diagram, jack-tar-cloud:image, jack-tar-cloud:icon, render_chart). Produces ImageManifest and ChartManifest. Also reads strategy-map.json to determine per-slide rendering approach (full_render, backdrop_render, composed).
Meta-verify — discover all jack-tar engine plugins, call each verify, report aggregate pipeline capability and discipline-hook readiness.
Generate an image locally on Apple Silicon via the mflux CLI (MLX). Flag-compatible with jack-tar-ollama's /image — a $0 local tier, no API keys needed.
| name | chart |
| description | Render a data chart (bar, line, area, pie, donut, scatter) to PNG using matplotlib. Accepts chart type and data, produces a rasterised PNG. |
| argument-hint | --type bar|line|area|pie|donut|scatter --data-file PATH [--output PATH] [--style-file PATH] |
| allowed-tools | Bash(python *) |
Render a data chart to PNG using matplotlib at 300 DPI. Supports chart types: bar, line, area, pie, donut, scatter.
PLUGIN_ROOT=$(python3 -c "
from pathlib import Path
import sys, os
if os.environ.get('JACK_TAR_CUSTOM_SMARTART_ROOT'):
print(os.environ['JACK_TAR_CUSTOM_SMARTART_ROOT']); sys.exit()
home = Path.home()
for base in [home / '.claude' / 'plugins' / 'cache']:
for p in base.rglob('jack-tar-custom-smartart/.claude-plugin/plugin.json'):
print(str(p.parent.parent)); sys.exit()
dev = Path.cwd() / 'plugins' / 'jack-tar-custom-smartart'
if dev.exists():
print(str(dev)); sys.exit()
print('NOT_FOUND')
" 2>/dev/null)
if [ -z "$PLUGIN_ROOT" ] || [ "$PLUGIN_ROOT" = "NOT_FOUND" ]; then echo "ERROR: jack-tar-custom-smartart not found" && exit 1; fi
echo "PLUGIN_ROOT=$PLUGIN_ROOT"
Collect from user input:
--type TYPE — chart type (required): bar, line, area, pie, donut, scatter--data-file PATH — JSON file containing chart data (required)--output PATH — output PNG path (default: /tmp/chart_<type>.png)--style-file PATH — optional JSON file containing a StyleGuide dictRead the data file:
python3 -c "
import json, sys
with open('$DATA_FILE') as f:
data = json.load(f)
print(json.dumps(data))
"
Data file format depends on chart type:
{"labels": ["Q1","Q2","Q3"], "values": [10,20,30]}{"labels": ["Q1","Q2","Q3"], "series": {"Revenue": [10,20,30], "Cost": [5,8,12]}}{"labels": ["A","B","C"], "values": [40, 35, 25]}{"labels": ["P1","P2","P3"], "values": [[1,2],[3,4],[5,6]]} (x,y pairs) or {"x": [1,3,5], "y": [2,4,6]}If --style-file is given, read it as a StyleGuide dict. Otherwise pass None (default brand colours apply).
PYTHONPATH="$PLUGIN_ROOT" python3 -c "
import json, os
chart_type = '$CHART_TYPE'
output_path = '$OUTPUT_PATH'
data_json = '''$DATA_JSON'''
style_guide_json = '''$STYLE_GUIDE_JSON''' # empty string = no style guide
data = json.loads(data_json)
style_guide = json.loads(style_guide_json) if style_guide_json.strip() else None
os.makedirs(os.path.dirname(output_path) or '/tmp', exist_ok=True)
from src.render_chart import render_chart
entry = render_chart(
chart_type=chart_type,
data=data,
output_path=output_path,
style_guide=style_guide,
width=1920,
height=1080,
dpi=300,
)
print(json.dumps(entry, indent=2))
"
Parse the returned manifest entry and report:
CHART COMPLETE
chart_id: chart_bar_slide1_abc123
chart_type: bar
status: rendered
output: /tmp/chart_bar.png
dimensions: 1920 x 1080
alt_text: Bar chart showing Q1 (10), Q2 (20), Q3 (30)
content_hash: abc123...
If the call raises ValueError for an unsupported chart type, report the valid types and ask the user to correct their input. Supported chart types: bar, line, area, pie, donut, scatter.
width and height kwargs if needed/render insteadradar chart type is NOT supported by render_chart — use /render with engine=custom_svg and graphic_type=radar_chart for radar/spider charts