Data visualization skill. Activates when users need to create charts, graphs, dashboards, or any visual representation of data. Supports chart type selection (bar, line, scatter, heatmap, treemap, sankey), integrates with D3.js, Chart.js, Recharts, and Plotly, enforces dashboard design principles, responsive layouts, and accessibility standards for data visualizations. Triggers on: /godmode:chart, "create a chart", "visualize this data", "build a dashboard", or when the orchestrator detects data visualization work.
From godmodenpx claudepluginhub arbazkhan971/godmodeThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
/godmode:chart/godmode:plan identifies data visualization tasks/godmode:review flags visualization accessibility or usability issuesUnderstand the data and what the visualization needs to communicate:
VISUALIZATION DISCOVERY:
Project: <name and purpose>
Data source: <API endpoint | database query | static JSON | CSV | real-time stream>
Data shape: <rows x columns, field names, types>
Audience: <executives | engineers | end-users | public>
Goal: <compare | trend | distribute | correlate | compose | flow | geospatial>
Interactivity: <static | hover tooltips | click-to-filter | drill-down | real-time>
Environment: <React | Vue | Angular | vanilla JS | server-side PDF | Jupyter>
Existing library: <D3.js | Chart.js | Recharts | Plotly | Nivo | Victory | none>
Constraints: <bundle size limit | IE support | print-friendly | offline | color-blind safe>
If the user hasn't specified, ask: "What story should this visualization tell? Who is the audience?"
Select the optimal chart type based on the data and communication goal:
CHART TYPE SELECTION:
| Goal | Recommended Chart Types |
|--|--|
| Compare values | Bar (vertical/horizontal), Grouped bar, Lollipop |
| Show trends | Line, Area, Sparkline, Step |
| Show distribution | Histogram, Box plot, Violin, Density |
| Show correlation | Scatter, Bubble, Heatmap (correlation matrix) |
| Show composition | Stacked bar, Treemap, Sunburst, Waffle |
| Show flow/process | Sankey, Alluvial, Chord diagram |
| Show hierarchy | Treemap, Sunburst, Dendrogram, Circle packing |
| Show geographic | Choropleth, Bubble map, Hex bin map |
| Show part-to-whole | Donut, Stacked area, Marimekko |
...
Rules:
Choose the right visualization library for the project:
LIBRARY SELECTION:
| Library | Best For | Bundle Size | Learning Curve |
|--|--|--|--|
| D3.js | Custom, complex, | ~90KB | Steep — full control |
| | unique visualizations | | over every pixel |
| Chart.js | Standard charts, | ~60KB | Low — declarative |
| | quick setup, canvas | | config-based API |
| Recharts | React dashboards, | ~120KB | Low — React-native |
| | composable charts | | component API |
| Plotly | Scientific/data | ~1MB | Medium — rich |
| | analysis, 3D plots | | interactive charts |
Prepare data for the selected chart type:
DATA TRANSFORMATION:
Source format: <raw data shape — e.g., array of objects, CSV rows, nested JSON>
Target format: <what the chart library expects>
Transformations needed:
1. <transformation — e.g., group by category, aggregate sum>
2. <transformation — e.g., pivot rows to columns>
3. <transformation — e.g., normalize to percentages>
4. <transformation — e.g., sort descending by value>
5. <transformation — e.g., compute rolling average>
Missing data strategy: <omit | zero-fill | interpolate | show gap>
...
Generate the transformation code:
// Data transformation pipeline
function transformData(raw: RawData[]): ChartData {
return raw
.filter(/* remove invalid entries */)
.map(/* reshape to chart format */)
.sort(/* order for readability */)
Build the chart with full configuration:
CHART CONFIGURATION:
| Property | Value |
|--|--|
| Type | <bar | line | scatter | heatmap | ...> |
| Width | <responsive | fixed px> |
| Height | <responsive | fixed px> |
| Aspect ratio | <16:9 | 4:3 | 1:1 | custom> |
| Margins | top=<N> right=<N> bottom=<N> left=<N> |
| Colors | <palette name or hex values> |
| Font family | <system | project font> |
| Animation | <none | enter | update | transition> |
| Legend | <position: top | right | bottom | none> |
...
Use the selected library's standard patterns:
ResponsiveContainer wrapper, declarative component compositionMobile (<480px): stack legend below, reduce ticks, enlarge touch targets. Tablet (480-1024px): side legend, full interactivity. Desktop (>1024px): full layout, annotations, brush/zoom.
Design accessible visualizations that work for everyone:
ACCESSIBILITY CHECKLIST:
| Check | Status |
|--|--|
| Color contrast ratio >= 3:1 against background | PASS | FAIL |
| Colorblind-safe palette (no red/green only) | PASS | FAIL |
| Patterns/textures as secondary differentiator | PASS | FAIL |
| aria-label on chart container (SVG role="img") | PASS | FAIL |
| Data table alternative available | PASS | FAIL |
| Keyboard navigable (focus on data points) | PASS | FAIL |
| Screen reader descriptions for trends | PASS | FAIL |
| Tooltip accessible via keyboard (not hover-only) | PASS | FAIL |
| Text labels minimum 12px font size | PASS | FAIL |
...
When building multi-chart dashboards, apply layout principles:
DASHBOARD DESIGN:
Layout: <grid columns — e.g., 12-column grid>
Sections:
1. <KPI row — number cards with sparklines>
2. <Primary chart — largest, most important visualization>
3. <Supporting charts — 2-3 smaller charts providing context>
4. <Detail table — filterable data table for drill-down>
DASHBOARD PRINCIPLES:
1. Most important metric is top-left (F-pattern reading)
2. KPI cards first — give the executive summary before details
3. Max 7 ± 2 charts per dashboard (cognitive load limit)
...
Optimize chart rendering for large datasets:
PERFORMANCE STRATEGIES:
| < 1,000 points | Render all — no optimization needed |
|--|--|
| 1K - 10K points | Canvas rendering (not SVG), debounce tooltips |
| 10K - 100K points | Data aggregation, LTTB downsampling, WebGL |
| > 100K points | Server-side aggregation, WebGL (deck.gl) |
Key techniques: Canvas over SVG for > 1K points, LTTB downsampling for time series,
IntersectionObserver for lazy-loading, useMemo for data transforms, Web Workers for heavy processing.
Validate the visualization and produce deliverables:
VISUALIZATION VALIDATION:
| Check | Status |
|--|--|
| Chart type matches data and communication goal | PASS | FAIL |
| Data transformations produce correct output | PASS | FAIL |
| Responsive at mobile, tablet, desktop breakpoints | PASS | FAIL |
| Accessibility checklist complete (all items pass) | PASS | FAIL |
| Color palette is colorblind-safe | PASS | FAIL |
| Performance acceptable at expected data volume | PASS | FAIL |
| Tooltips show correct formatted values | PASS | FAIL |
| Axis labels and titles are clear and formatted | PASS | FAIL |
| Legend is present and correctly maps to data series | PASS | FAIL |
...
Produce deliverables:
VISUALIZATION COMPLETE:
Artifacts:
- Chart component: src/components/charts/<ChartName>.tsx
- Data transformer: src/utils/chart-data/<transformer>.ts
- Dashboard layout: src/pages/<dashboard>.tsx (if dashboard)
- Storybook story: src/components/charts/<ChartName>.stories.tsx
- Tests: src/components/charts/__tests__/<ChartName>.test.tsx
Validation: <PASS | NEEDS REVISION>
Chart type: <type>
Library: <library>
...
Commit: "chart: <component> — <chart type>, <library>, <N> data series, responsive + accessible"
# Test chart rendering and accessibility
npm run test:charts
npx storybook build --ci
npx chromatic --exit-zero-on-changes
| Flag | Description |
|---|---|
| (none) | Full chart design and implementation workflow |
--type <chart> | Force chart type: bar, line, scatter, heatmap, treemap, sankey, pie, area |
--lib <library> | Force library: d3, chartjs, recharts, plotly, nivo, victory |
Never ask to continue. Loop autonomously until all charts render within targets and pass accessibility checks.
timestamp chart_type library data_points responsive a11y_score status
On activation, automatically detect project context without asking:
AUTO-DETECT:
1. Framework:
ls package.json 2>/dev/null && grep -o '"react"\|"vue"\|"angular"\|"svelte"' package.json
# Determines component style and library compatibility
2. Existing chart libraries:
grep -r "recharts\|chart.js\|d3\|plotly\|nivo\|victory" package.json 2>/dev/null
# Prefer existing library over introducing a new one
3. Design system:
ls src/theme* src/styles/tokens* tailwind.config* 2>/dev/null
# Extract color palette, font family, spacing tokens
...
After each chart skill invocation, emit a structured report:
CHART BUILD REPORT:
| Charts created | <N> |
|--|--|
| Charts updated | <N> |
| Library used | <library name> |
| Data points | <N> total across all charts |
| Responsive | YES / NO |
| A11y (data table) | YES / NO |
| Colorblind-safe | YES / NO |
| Bundle impact | +<N> KB (gzipped) |
| Render time | <N> ms (largest chart) |
| Verdict | PASS | NEEDS REVISION |
KEEP if: improvement verified. DISCARD if: regression or no change. Revert discards immediately.
Stop when: target reached, budget exhausted, or >5 consecutive discards.