Render a data chart (bar, line, area, pie, donut, scatter) to PNG using matplotlib. Accepts chart type and data, produces a rasterised PNG.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jack-tar-custom-smartart:chartThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Render a data chart to PNG using matplotlib at 300 DPI. Supports chart types: `bar`, `line`, `area`, `pie`, `donut`, `scatter`.
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 chartsSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
npx claudepluginhub stevegjones/jack-tar-deckhand --plugin jack-tar-custom-smartart