mcpField
E
executive-dashboard

executive-dashboard

github.com/dengineproblem数据与数据库76 次安装
代码仓库

关于 executive-dashboard

executive-dashboard 是用于设计和构建高管仪表板的技能,面向 C 级高管和高级管理团队。它涵盖 KPI 组织、信息层级、图表选择、自动洞察及董事会演示导出等实践。

主要功能

  1. 01围绕业务目标组织 KPI
  2. 02按摘要、趋势和细节安排信息
  3. 03根据数据类型选择图表
  4. 04提供自动洞察与状态提示
  5. 05设计董事会演示导出和移动布局

适用场景

  1. 01为管理层汇总财务与运营指标
  2. 02制作适合演示的董事会仪表板
  3. 03规划移动端可读的 KPI 视图

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/dengineproblem/agents-monorepo --skill executive-dashboard

安装后在 Claude Code 中输入/executive-dashboard确认已加载。

详细介绍

高管仪表板专家

擅长设计和构建高管仪表板,为 C 级高管和高级领导层提供可执行的洞察。

核心仪表板原则

战略聚焦
  • 以业务成果为先,而非数据点
  • 将 KPI 与公司目标和战略举措直接对齐
  • 优先展示前瞻性指标,而非历史报告
  • 支持下钻,同时避免主视图信息过载
  • 兼顾移动端和演示场景进行设计
信息层级
  • 遵循“5 秒法则”——立即呈现关键洞察
  • 采用渐进式呈现:摘要 → 趋势 → 详情
  • 使用“红黄绿灯”状态指示系统
  • 将相关指标归入连贯的业务主题
  • 确保所有指标的术语一致

核心 KPI 类别

财务表现
const financialKPIs = {
  revenue: {
    current: 'Monthly Recurring Revenue (MRR)',
    trend: 'Revenue Growth Rate (YoY)',
    health: 'Revenue per Employee',
    forecast: 'Pipeline Value & Conversion Rate'
  },
  profitability: {
    margin: 'Gross Margin %',
    efficiency: 'Operating Expense Ratio',
    cash: 'Cash Flow & Burn Rate',
    roi: 'Return on Investment by Initiative'
  },
  unit_economics: {
    cac: 'Customer Acquisition Cost',
    ltv: 'Customer Lifetime Value',
    ltv_cac_ratio: 'LTV:CAC Ratio (target: 3:1)',
    payback: 'CAC Payback Period'
  }
};
卓越运营
const operationalKPIs = {
  customers: {
    acquisition: 'Customer Acquisition Cost (CAC)',
    retention: 'Net Revenue Retention (NRR)',
    satisfaction: 'Net Promoter Score (NPS)',
    lifetime: 'Customer Lifetime Value (CLV)',
    churn: 'Monthly/Annual Churn Rate'
  },
  performance: {
    quality: 'Defect Rate & SLA Performance',
    speed: 'Time to Market & Cycle Time',
    capacity: 'Utilization Rates & Capacity Planning'
  },
  growth: {
    pipeline: 'Sales Pipeline Coverage',
    conversion: 'Stage Conversion Rates',
    velocity: 'Deal Velocity'
  }
};

仪表板布局模式

高管摘要布局

<div class="executive-dashboard">
  
  <section class="hero-metrics">
    <div class="primary-kpi">Revenue: $2.3M ↗️ 12%</div>
    <div class="status-indicators">
      <span class="green">Growth</span>
      <span class="yellow">Margins</span>
      <span class="red">Churn</span>
    </div>
  </section>

  
  <section class="trend-charts">
    <div class="chart-grid">
      <chart type="line" data="revenue-trend" period="12mo"/>
      <chart type="gauge" data="nps-score" target="50"/>
      <chart type="funnel" data="sales-pipeline"/>
      <chart type="heatmap" data="regional-performance"/>
    </div>
  </section>

  
  <section class="action-items">
    <alert type="critical">Customer churn up 3% - immediate action required</alert>
    <insight>Marketing ROI improved 24% - scale successful campaigns</insight>
  </section>
</div>
CSS 网格布局
.executive-dashboard {
  display: grid;
  grid-template-areas:
    "hero hero hero hero"
    "chart1 chart1 chart2 chart2"
    "chart3 chart4 chart5 chart6"
    "alerts alerts insights insights";
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto 1fr 1fr auto;
  gap: 24px;
  padding: 24px;
  min-height: 100vh;
}

.hero-metrics {
  grid-area: hero;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
  border-radius: 12px;
  padding: 32px;
}

.primary-kpi {
  font-size: 48px;
  font-weight: 700;
  color: white;
}

.status-indicator {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
}

.status-indicator.green { background: #48bb78; }
.status-indicator.yellow { background: #ecc94b; color: #1a202c; }
.status-indicator.red { background: #f56565; }

数据可视化最佳实践

图表选择指南
def select_chart_type(data_type, purpose):
    chart_mapping = {
        ('trend', 'time_series'): 'line_chart',
        ('comparison', 'categories'): 'bar_chart',
        ('part_to_whole', 'composition'): 'donut_chart',
        ('performance', 'target'): 'gauge_chart',
        ('correlation', 'scatter'): 'scatter_plot',
        ('geographic', 'regional'): 'choropleth_map',
        ('process', 'conversion'): 'funnel_chart',
        ('distribution', 'variance'): 'box_plot',
        ('ranking', 'top_n'): 'horizontal_bar',
        ('change', 'waterfall'): 'waterfall_chart'
    }
    return chart_mapping.get((data_type, purpose), 'table')

# Executive dashboard color palette
EXEC_COLORS = {
    'success': '#00A86B',    # Green - targets met/exceeded
    'warning': '#FFB000',    # Amber - attention needed
    'critical': '#D2222D',   # Red - immediate action required
    'neutral': '#708090',    # Gray - informational
    'primary': '#1f4e79',    # Navy - brand/emphasis
    'secondary': '#4a5568',  # Dark gray - secondary elements
    'background': '#f7fafc'  # Light gray - backgrounds
}
交互元素
class ExecutiveDashboard {
  constructor() {
    this.filters = {
      timeframe: 'YTD',
      region: 'All',
      business_unit: 'All'
    };
    this.alertThresholds = {
      revenue_variance: 0.05,
      customer_churn: 0.02,
      margin_decline: 0.03
    };
  }

  // Auto-refresh critical metrics
  setupRealTimeUpdates() {
    setInterval(() => {
      this.updateMetrics(['revenue', 'active_users', 'system_health']);
      this.checkAlertConditions();
    }, 300000); // 5-minute intervals
  }

  // Contextual drill-downs
  enableDrillDown(metric, level = 'summary') {
    const drillPaths = {
      'revenue': ['total', 'by_product', 'by_region', 'by_customer'],
      'churn': ['rate', 'by_segment', 'by_reason', 'cohort_analysis'],
      'pipeline': ['total', 'by_stage', 'by_rep', 'by_source']
    };
    return drillPaths[metric] || ['summary'];
  }

  // Export for board presentations
  exportToPDF() {
    return {
      format: 'landscape',
      pages: ['executive_summary', 'financial', 'operational'],
      branding: true,
      timestamp: new Date().toISOString()
    };
  }
}

高管沟通功能

自动化洞察
def generate_executive_insights(metrics_data):
    insights = []

    # Trend analysis
    if metrics_data['revenue_growth'] > 0.15:
        insights.append({
            'type': 'opportunity',
            'message': f"Revenue accelerating at {metrics_data['revenue_growth']:.1%} - consider scaling successful initiatives",
            'action': 'Review top-performing channels for expansion'
        })

    # Anomaly detection
    if abs(metrics_data['current_vs_forecast']) > 0.1:
        insights.append({
            'type': 'alert',
            'message': 'Significant variance from forecast detected',
            'impact': 'May affect quarterly targets',
            'next_steps': 'Schedule forecast review meeting'
        })

    # Churn warning
    if metrics_data['churn_rate'] > metrics_data['churn_threshold']:
        insights.append({
            'type': 'critical',
            'message': f"Churn rate at {metrics_data['churn_rate']:.1%} exceeds threshold",
            'impact': f"Potential ARR loss: ${metrics_data['at_risk_arr']:,.0f}",
            'next_steps': 'Activate retention playbook'
        })

    return sorted(insights, key=lambda x: {'critical': 0, 'alert': 1, 'opportunity': 2}[x['type']])
董事会演示导出
// Board presentation export
function exportToBoardDeck() {
  const slideTemplates = {
    'executive_summary': {
      layout: 'hero_metrics_with_trend',
      charts: ['revenue_trend', 'key_kpis_table'],
      insights: 'auto_generated'
    },
    'financial_performance': {
      layout: 'financial_grid',
      charts: ['revenue_waterfall', 'margin_analysis', 'cash_flow'],
      commentary: 'variance_explanation'
    },
    'operational_highlights': {
      layout: 'balanced_scorecard',
      charts: ['customer_metrics', 'efficiency_trends'],
      actions: 'priority_initiatives'
    },
    'forward_look': {
      layout: 'forecast_view',
      charts: ['pipeline_coverage', 'growth_projections'],
      risks: 'risk_register_summary'
    }
  };

  return generatePresentation(slideTemplates);
}

性能与可扩展性

数据刷新策略
-- Executive dashboard data mart optimization
CREATE MATERIALIZED VIEW executive_kpis_daily AS
SELECT
    date_key,
    SUM(revenue) as total_revenue,
    COUNT(DISTINCT customer_id) as active_customers,
    AVG(satisfaction_score) as avg_nps,
    SUM(revenue) / COUNT(DISTINCT customer_id) as revenue_per_customer,
    SUM(CASE WHEN is_churned THEN arr ELSE 0 END) as churned_arr,
    SUM(CASE WHEN is_new THEN arr ELSE 0 END) as new_arr
FROM fact_daily_metrics
WHERE date_key >= CURRENT_DATE - INTERVAL '2 years'
GROUP BY date_key;

-- Create index for fast filtering
CREATE INDEX idx_exec_kpis_date ON executive_kpis_daily(date_key);

-- Refresh every 4 hours for near real-time executive view
SELECT cron.schedule('refresh-exec-dashboard', '0 */4 * * *',
    'REFRESH MATERIALIZED VIEW CONCURRENTLY executive_kpis_daily;');
缓存策略
const cacheConfig = {
  // Hero metrics - most viewed, short cache
  heroMetrics: {
    ttl: 300,  // 5 minutes
    preload: true
  },

  // Trend charts - moderate cache
  trendCharts: {
    ttl: 900,  // 15 minutes
    preload: false
  },

  // Historical data - long cache
  historicalData: {
    ttl: 3600,  // 1 hour
    preload: false
  },

  // Real-time metrics - no cache
  realTimeMetrics: {
    ttl: 0,
    streaming: true
  }
};

移动端优化

/* Mobile-first executive dashboard */
@media (max-width: 768px) {
  .executive-dashboard {
    grid-template-areas:
      "hero"
      "chart1"
      "chart2"
      "alerts";
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .primary-kpi {
    font-size: 32px;
  }

  .chart-container {
    min-height: 200px;
  }

  /* Touch-friendly controls */
  .filter-button {
    min-height: 44px;
    min-width: 44px;
  }
}

测试与验证

仪表板质量检查清单
  • 5 秒测试:加载后立即呈现关键洞察
  • 移动端兼容性:在高管的移动设备上清晰易读
  • 数据准确性:根据源系统进行自动验证
  • 性能:所有视图的加载时间均 < 3 秒
  • 无障碍性:采用色盲友好的配色方案,并支持屏幕阅读器
  • 利益相关方验证:每月与仪表板用户举行评审会议
自动化测试
def test_dashboard_accuracy():
    """Compare dashboard values to source systems."""

    dashboard_revenue = get_dashboard_metric('total_revenue')
    source_revenue = query_source_system('SELECT SUM(amount) FROM orders')

    variance = abs(dashboard_revenue - source_revenue) / source_revenue

    assert variance < 0.001, f"Revenue variance {variance:.2%} exceeds threshold"

最佳实践

  1. 5 秒法则 — 关键指标一目了然
  2. 渐进式呈现 — 从概览到详情
  3. 移动端优先 — 在 CEO 的手机上也能正常使用
  4. 按需实时更新 — 关键指标频繁更新
  5. 可执行的洞察 — 不只是数据,还要提供建议
  6. 设计一致 — 采用统一的视觉语言

评论

支持 Markdown