Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

field-agent-visualization

БесплатноБез исполняемых скриптовНе проверен

Professional Plotly visualization best practices for Field Agents including chart specifications, color palettes, formatting standards, and JSON structure…

treasure-dataот treasure-data★ 23 звезды на GitHub13 установок в других каталогах

Об этом скилле

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

  1. Create SINGLE CHARTS ONLY - NO SUBPLOTS for analysis charts
  2. Always use descriptive titles, axis labels, and legends
  3. Ensure proper formatting and readability
  4. Use the specified color palette consistently
  5. Always show numbers/percentages in bar charts and heatmaps
  6. LEGENDS MUST BE VISIBLE for pie charts and comparison charts
  7. 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",
Полный SKILL.md на GitHub

Установить field-agent-visualization в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл field-agent-visualization?

Professional Plotly visualization best practices for Field Agents including chart specifications, color palettes, formatting standards, and JSON structure requirements for executive-ready data visualizations

Как установить скилл field-agent-visualization?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл field-agent-visualization запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить field-agent-visualization с