一键导入
render
Render a SmartArt graphic to PNG using SVG, Mermaid, Vega-Lite, or matplotlib. Accepts a structured spec and produces a rasterised PNG.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Render a SmartArt graphic to PNG using SVG, Mermaid, Vega-Lite, or matplotlib. Accepts a structured spec and 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 | render |
| description | Render a SmartArt graphic to PNG using SVG, Mermaid, Vega-Lite, or matplotlib. Accepts a structured spec and produces a rasterised PNG. |
| argument-hint | --spec-file PATH | --graphic-type TYPE --items "item1;item2" [--output PATH] [--width INT] [--height INT] |
| allowed-tools | Bash(python *), Bash(npx *) |
Render a SmartArt graphic to PNG using the appropriate engine (custom_svg, mermaid, vega_lite, or matplotlib).
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"
If --spec-file PATH was given, read the spec JSON from that file.
If inline arguments were given (--graphic-type, --items, etc.), build a minimal spec:
import json, sys, os
# Inline spec construction example
graphic_type = "$GRAPHIC_TYPE" # e.g. "flowchart"
items_raw = "$ITEMS" # semicolon-separated, e.g. "Plan;Build;Ship"
output_path = "$OUTPUT_PATH" # default: /tmp/<graphic_type>.png
width = int("$WIDTH") if "$WIDTH" else 1920
height = int("$HEIGHT") if "$HEIGHT" else 1080
items = [i.strip() for i in items_raw.split(";") if i.strip()]
spec = {
"slide_number": 1,
"graphic_type": graphic_type,
"engine": "custom_svg", # default; override in spec file for mermaid/vega_lite/matplotlib
"enrichment_tier": "pure_programmatic",
"data": {"items": items},
"comparator_engines": [],
"dimensions": {"width": width, "height": height},
"alt_text": f"{graphic_type} diagram",
}
output_dir = os.path.dirname(output_path) or "/tmp"
print(json.dumps({"spec": spec, "output_dir": output_dir}))
If --spec-file was given, load the spec directly and extract output_dir from the spec's output_dir key, or default to /tmp.
PYTHONPATH="$PLUGIN_ROOT" python3 -c "
import json, sys, os
spec_json = '''$SPEC_JSON'''
spec = json.loads(spec_json)
output_dir = '$OUTPUT_DIR'
os.makedirs(output_dir, exist_ok=True)
# Minimal style_guide — renderer uses defaults when palette is absent
style_guide = {}
phase = 'draft'
from src.smartart_renderer import render
entry = render(spec, style_guide, phase, output_dir)
print(json.dumps(entry, indent=2))
"
Parse the returned manifest entry and report:
RENDER COMPLETE
graphic_type: flowchart
engine_used: custom_svg
status: rendered
output: /tmp/smartart_flowchart_slide1.png
dimensions: 1920 x 1080
alt_text: flowchart diagram
content_hash: abc123...
If status is failed, report the failure clearly and suggest checking:
engine field matches an available engine (custom_svg, mermaid, vega_lite, matplotlib)data field matches the engine's expected shape/verify to check)spec['engine'] must be one of: custom_svg, mermaid, vega_lite, matplotlibcustom_svg supports graphic types: flowchart, decision_tree, timeline, venn, swot, feature_matrix, pipeline_funnel, radar_chart, ganttmermaid and vega_lite require Node.js CLIs — run /verify first if unsuredata shape varies by engine:
custom_svg: {"items": ["Step 1", "Step 2", ...]} (flat list) or engine-specific keysmermaid: {"diagram": "graph LR\n A --> B"} (raw Mermaid DSL)vega_lite: {"spec": {...}} (Vega-Lite spec object)matplotlib: {"labels": [...], "values": [...]} (chart data — prefer /chart skill for these)comparator_engines can be a list of additional engines to compare against; the manifest entry will include comparator_resultsenrichment_tier controls AI enrichment: pure_programmatic, ai_background, ai_element_icons, full_ai_render