data-visualization
Data visualization and information design best practices. Use when creating charts, dashboards, graphs, or any visual representation of data.
What this skill does
# Data Visualization
Principles and best practices for effective data visualization.
## Core Principles
### Tufte's Foundations
**Data-Ink Ratio**: Maximize ink used for actual data
- Remove unnecessary gridlines, borders, backgrounds
- Eliminate 3D effects, shadows, decorative elements
- Every visual element must justify its existence
**Lie Factor**: Graphical representation must match data
- Lie Factor = Size of Effect in Graphic / Size of Effect in Data
- Ideal = 1. Substantial distortion when >1.05 or <0.95
- Avoid: non-zero baselines, inconsistent scales, 3D distortion
**Chart Junk**: Remove non-data ink and redundant data-ink
### Graphical Integrity
| Practice | Rule |
|----------|------|
| Bar charts | Must start at zero |
| Proportions | Size encodements reflect actual ratios |
| 3D effects | Never use—distorts perception |
| Pie charts | Maximum 3-4 slices |
## Visual Perception
### Gestalt Principles
| Principle | Application |
|-----------|-------------|
| **Proximity** | Cluster related data; space different categories |
| **Similarity** | Consistent color/shape for categories |
| **Continuity** | Connected line charts for trends |
| **Closure** | Complete shapes, avoid unnecessary borders |
| **Figure/Ground** | Data stands out against background |
| **Connection** | Lines/links show relationships |
### Preattentive Attributes
Processed in <200ms before conscious attention:
**Hierarchy:** Position > Color > Size > Shape > Orientation
| Attribute | Use Case |
|-----------|----------|
| Position (spatial) | Ranking, trends |
| Color (hue) | Categorical distinction |
| Size | Quantitative comparison |
| Shape | Category distinction |
| Intensity | Highlighting differences |
## Color
### Palette Types
**Sequential**: Ordered data (low → high), single hue light to dark
**Diverging**: Data with meaningful midpoint, two hues meeting at neutral
**Categorical**: Nominal data, distinct equally-spaced hues (max 6-8)
### Color-Blind Safe Palettes
~8% of men and 0.5% of women have color vision deficiency. Design for them by default.
**Okabe-Ito Palette** (recommended default):
- Black `#000000`, Orange `#E69F00`, Sky Blue `#56B4E9`
- Bluish Green `#009E73`, Yellow `#F0E442`, Blue `#0072B2`
- Vermillion `#D55E00`, Reddish Purple `#CC79A7`
**Other tested palettes**: Viridis, Cividis, Paul Tol, ColorBrewer (colorblind filter)
### Color Blindness Types
| Type | Prevalence | Confusion |
|------|-----------|-----------|
| Deuteranomaly | 5% of men | Red-green (most common) |
| Protanopia | 1% of men | Red-green |
| Deuteranopia | 1.3% of men | Red-green |
| Tritanopia | 0.0001% | Blue-yellow (rare) |
| Achromatopsia | 0.003% | No color (greyscale) |
### Cultural Considerations
| Color | Western | China | Other |
|-------|---------|-------|-------|
| Red | Danger | Good luck | Death (some African) |
| White | Purity | Death | |
| Green | Environment | Infidelity | |
## Accessibility
### Fundamental Rule
**Never use color alone to encode data.** Always combine with at least one other channel:
- Color + pattern/texture (bar charts)
- Color + line style: solid, dashed, dotted (line charts)
- Color + shape (scatter plots)
- Color + direct labels (all charts)
### Contrast Requirements (WCAG)
| Element | AA (minimum) | AAA (enhanced) |
|---------|-------------|----------------|
| Body text | 4.5:1 | 7:1 |
| Large text (18pt+) | 3:1 | 4.5:1 |
| Non-text (lines, bars, icons) | 3:1 | — |
| Focus indicators | 3:1 | 3:1 + 2px space |
### Low Vision Design
~253 million people globally have visual impairment.
**Typography in charts:**
- Minimum 12px for labels (14px preferred)
- Sans-serif fonts for readability
- Line height ≥1.5×
- High contrast text (4.5:1 minimum)
**Layout:**
- Support browser zoom to 200% without content loss
- No horizontal scrolling at zoomed levels
- Direct data labeling reduces magnification needs
- Avoid cluttered, dense layouts
**Dark mode:**
- Avoid pure white (#fff) on pure black (#000) — causes halation
- Use slightly heavier font weights on dark backgrounds
- Maintain all contrast ratios
### Screen Reader Accessibility
**Alt text for charts** (follow the four-level model by Lundgard & Satyanarayan, 2021):
1. **What**: Chart type and data ("Bar chart showing 2024 sales by region")
2. **How**: Encoding method ("Bars represent revenue in USD")
3. **Readout**: Key values ("North America leads at $450K")
4. **Insight**: Patterns/trends ("45% year-over-year growth")
**SVG accessibility:**
```html
<svg role="img" aria-labelledby="title desc">
<title id="title">2024 Sales by Region</title>
<desc id="desc">Bar chart. North America leads with 45% of revenue.</desc>
</svg>
```
**Always provide**: data table alternative or detailed description for complex charts.
### Multi-Modal Access
Beyond visual, consider:
- **Sonification**: Map data values to pitch/rhythm (Highcharts Sonification Studio, TwoTone)
- **Tactile graphics**: Raised-surface charts for blind users (swell-touch paper, 3D print)
- **Haptic feedback**: Vibration intensity proportional to data values
- **MAIDR**: Multi-Access Interactive Data Representation (text + audio + tactile)
### Accessibility Legislation
| Jurisdiction | Law/Standard | Requirement |
|-------------|-------------|-------------|
| **US** | Section 508, ADA | WCAG 2.0/2.1 AA (federal); courts use WCAG for ADA |
| **EU** | European Accessibility Act (2025), EN 301 549 | WCAG 2.1 AA for public + private sectors |
| **UK** | Equality Act 2010, PSBAR 2018 | WCAG 2.1 AA for public sector |
| **Japan** | JIS X 8341-3:2016 | Aligned with WCAG, AA recommended |
| **Australia** | Disability Discrimination Act 1992 | WCAG 2.1 AA benchmark |
| **Canada** | Accessible Canada Act, AODA (Ontario) | WCAG 2.0 AA minimum, moving to 2.1 |
| **Singapore** | Digital Service Standards | WCAG 2.1 AA for government |
| **China** | GB/T 37668-2019 | Aligned with WCAG 2.0 |
| **South Korea** | KWCAG 2.1 | Aligned with WCAG 2.1 |
### Accessibility Testing Checklist
- [ ] Color not sole encoding method (WCAG 1.4.1)
- [ ] Text contrast ≥4.5:1 (WCAG 1.4.3)
- [ ] Non-text contrast ≥3:1 (WCAG 1.4.11)
- [ ] Supports 200% zoom (WCAG 1.4.4)
- [ ] Text spacing adjustable (WCAG 1.4.12)
- [ ] Alt text or data table provided (WCAG 1.1.1)
- [ ] Keyboard navigable (WCAG 2.1.1)
- [ ] Test with color blindness simulator (Coblis, ColorOracle)
- [ ] Test with screen reader (NVDA, VoiceOver)
- [ ] Grayscale test: still understandable?
## Chart Selection
```
Data type:
├─ Categorical comparison → Bar chart
├─ Part-to-whole → Treemap/stacked bar (avoid pie >4 slices)
├─ Time series → Line chart
├─ Distribution → Histogram, box plot, violin
├─ Correlation → Scatter plot
├─ Geographic → Choropleth, proportional symbol
└─ Network/flow → Network graph, Sankey
```
## Common Mistakes
### Avoid
- Truncated Y-axis in bar charts
- Dual Y-axes (false correlations)
- >4 pie chart slices
- 3D charts
- Rainbow palettes without meaning
- Over-plotting (too many points)
- Color-only encoding (accessibility failure)
- Insufficient contrast on chart elements
### Fixes
- **Clutter** → Small multiples, sparklines
- **No context** → Add baseline, benchmarks
- **Hard to compare** → Consistent scales, aligned axes
- **Data overload** → Filter, aggregate, progressive disclosure
- **Inaccessible** → Redundant encoding, alt text, data tables
## Domain Guidance
### Financial
- Candlestick charts for prices
- Treemaps for portfolio allocation
- Log vs linear scale for long timeframes
- Annotate key events (earnings, mergers)
### Security/SOC
- Heatmaps for activity over time
- Network graphs for connection analysis
- Sankey for traffic flow
- Red/amber/green severity (**with icons** for color-blind users)
- Dark theme preferred (reduce eye strain)
### Scientific
- Vector graphics (SVG, PDF)
- Field-specific conventions
- Follow Nature 2025 checklist: clarity, accessibility
- 300+ DPI, clear labeling
- Color-blind safe palettes Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.