field-agent-visualization
FreeNo executable scriptsNot checkedProfessional Plotly visualization best practices for Field Agents including chart specifications, color palettes, formatting standards, and JSON structure…
About this skill
Field Agent Visualization Best Practices
This skill provides comprehensive guidelines for creating professional, executive-ready visualizations for Field Agents using Plotly. Follow these standards to ensure clean, readable, and impactful data visualizations.
When to Use This Skill
Use this skill when you need to:
- Create Plotly visualizations for Field Agent outputs
- Generate charts for data analysis and reporting
- Build dashboards with KPI indicators
- Design executive-ready visual presentations
- Ensure consistent visualization standards across agents
Core Principles
Golden Rules
- Create SINGLE CHARTS ONLY - NO SUBPLOTS for analysis charts
- Always use descriptive titles, axis labels, and legends
- Ensure proper formatting and readability
- Use the specified color palette consistently
- Always show numbers/percentages in bar charts and heatmaps
- LEGENDS MUST BE VISIBLE for pie charts and comparison charts
- NEVER CREATE SUBPLOTS for analysis - Always create separate individual charts
MANDATORY Color Palette
Always use this Treasure Data color palette for consistency:
TD_COLORS = [
'#44BAB8', # Teal (Primary)
'#8FD6D4', # Light Teal
'#DAF1F1', # Pale Teal
'#2E41A6', # Navy Blue
'#828DCA', # Purple
'#D5D9ED', # Light Purple
'#8CC97E', # Green
'#BADFB2', # Light Green
'#E8F4E5', # Pale Green
'#EEB53A', # Accent Yellow
'#F5D389', # Light Yellow
'#5FCFD8', # Cyan
'#A05EB0', # Magenta
'#C69ED0' # Light Magenta
]
Usage:
- Use
#44BAB8(Teal) as primary color for single-series charts - Use
#2E41A6(Navy) for text and titles - Cycle through colors for multi-series charts
- Use color scales for heatmaps (DAF1F1 → 8FD6D4 → 44BAB8)
Color Conversion Helper Function
For charts requiring RGB/RGBA format (e.g., transparency effects):
def hex_to_rgb(hex_color):
"""Convert hex color to RGB tuple
Args:
hex_color (str): Hex color code (e.g., '#44BAB8' or '44BAB8')
Returns:
tuple: RGB values as (R, G, B) where each value is 0-255
Example:
>>> hex_to_rgb('#44BAB8')
(68, 186, 184)
"""
hex_color = hex_color.lstrip('#')
return tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4))
def hex_to_rgba(hex_color, alpha=1.0):
"""Convert hex color to RGBA string for Plotly
Args:
hex_color (str): Hex color code (e.g., '#44BAB8')
alpha (float): Opacity value 0.0-1.0
Returns:
str: RGBA color string (e.g., 'rgba(68, 186, 184, 0.5)')
Example:
>>> hex_to_rgba('#44BAB8', 0.5)
'rgba(68, 186, 184, 0.5)'
"""
r, g, b = hex_to_rgb(hex_color)
return f'rgba({r}, {g}, {b}, {alpha})'
# Usage examples:
td_primary_rgb = hex_to_rgb('#44BAB8') # (68, 186, 184)
td_primary_transparent = hex_to_rgba('#44BAB8', 0.3) # 'rgba(68, 186, 184, 0.3)'
CRITICAL: JSON Structure Requirements
✅ CORRECT JSON Format
Always use proper JSON objects with native arrays and objects:
{
"data": [
{
"type": "bar",
"x": ["A", "B", "C"],
"y": [10, 20, 30],
"marker": {"color": "#44BAB8"},
"text": ["10", "20", "30"],
"textposition": "outside",
"textfont": {"size": 11, "color": "black"}
}
],
"layout": {
"title": {
"text": "Chart Title",
"x": 0.5,
"font": {"size": 18, "color": "#2E41A6"}
},
"height": 500,
"showlegend": true,
"margin": {"t": 120, "b": 80, "l": 80, "r": 80},
"font": {"family": "Arial", "size": 12},
"plot_bgcolor": "white",
"paper_bgcolor": "white"
}
}
❌ NEVER DO: String Data (Causes Errors)
{
"data": "[{\"type\": \"bar\", \"x\": [\"A\", \"B\"], \"y\": [10, 20]}]"
}
Critical: Data must be JSON objects and arrays, NOT stringified JSON.
CRITICAL: Missing Elements Fixes
For Bar Charts - MANDATORY Properties
{
"data": [{
"type": "bar",
"x": ["Category A", "Category B", "Category C"],
"y": [45, 30, 25],
"name": "Series Name",
"marker": {"color": "#44BAB8"},
"text": [45, 30, 25], // ⚠️ CRITICAL: Must include for numbers on bars
"textposition": "outside", // ⚠️ CRITICAL: Shows numbers above bars
"textfont": {"size": 11, "color": "black"}
}],
"layout": {
"title": {"text": "Bar Chart Title", "x": 0.5, "font": {"size": 18}},
"height": 500,
"showlegend": true, // ⚠️ CRITICAL: Must be true for multi-series
"legend": {
"orientation": "h",
"yanchor": "bottom",
"y": 1.05, // ⚠️ CRITICAL: Must be above 1.0 to be visible
"xanchor": "center",
"x": 0.5
},
"margin": {"t": 120, "b": 80, "l": 80, "r": 80}, // ⚠️ CRITICAL: Extra top margin for legend
"xaxis": {"title": {"text": "Categories", "font": {"size": 14}}},
"yaxis": {"title": {"text": "Values", "font": {"size": 14}}},
"font": {"family": "Arial",
Install field-agent-visualization in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the field-agent-visualization skill do?
Professional Plotly visualization best practices for Field Agents including chart specifications, color palettes, formatting standards, and JSON structure requirements for executive-ready data visualizations
How do I install the field-agent-visualization skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the field-agent-visualization skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic