[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72XJM7DQTDMPX7BCEHC9M5K":3,"skill-same:01M72XJM7DQTDMPX7BCEHC9M5K":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M72XJM7DQTDMPX7BCEHC9M5K","kpi-dashboard-design",null,"Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use this skill when building an executive SaaS metrics dashboard tracking MRR, churn, and LTV\u002FCAC ratios; designing an operations center with live service health and request throughput; creating a cohort retention analysis view for a product team; or debugging a dashboard where metrics contradict each other due to inconsistent calculation methodology.","steph-frtech\u002Fclaude-code-up","steph-frtech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F198466323?v=4","01M72XD213FVQA2QXRGTJFKHE1","01M72XD227AANJ993SQTNZB1CK",1,"MIT","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fmarketplaces\u002Fwshobson\u002Fplugins\u002Fbusiness-analytics\u002Fskills\u002Fkpi-dashboard-design\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: kpi-dashboard-design\ndescription: Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use this skill when building an executive SaaS metrics dashboard tracking MRR, churn, and LTV\u002FCAC ratios; designing an operations center with live service health and request throughput; creating a cohort retention analysis view for a product team; or debugging a dashboard where metrics contradict each other due to inconsistent calculation methodology.\n---\n\n# KPI Dashboard Design\n\nComprehensive patterns for designing effective Key Performance Indicator (KPI) dashboards that drive business decisions.\n\n## When to Use This Skill\n\n- Designing executive dashboards\n- Selecting meaningful KPIs\n- Building real-time monitoring displays\n- Creating department-specific metrics views\n- Improving existing dashboard layouts\n- Establishing metric governance\n\n## Core Concepts\n\n### 1. KPI Framework\n\n| Level           | Focus            | Update Frequency  | Audience   |\n| --------------- | ---------------- | ----------------- | ---------- |\n| **Strategic**   | Long-term goals  | Monthly\u002FQuarterly | Executives |\n| **Tactical**    | Department goals | Weekly\u002FMonthly    | Managers   |\n| **Operational** | Day-to-day       | Real-time\u002FDaily   | Teams      |\n\n### 2. SMART KPIs\n\n```\nSpecific: Clear definition\nMeasurable: Quantifiable\nAchievable: Realistic targets\nRelevant: Aligned to goals\nTime-bound: Defined period\n```\n\n### 3. Dashboard Hierarchy\n\n```\n├── Executive Summary (1 page)\n│   ├── 4-6 headline KPIs\n│   ├── Trend indicators\n│   └── Key alerts\n├── Department Views\n│   ├── Sales Dashboard\n│   ├── Marketing Dashboard\n│   ├── Operations Dashboard\n│   └── Finance Dashboard\n└── Detailed Drilldowns\n    ├── Individual metrics\n    └── Root cause analysis\n```\n\n## Common KPIs by Department\n\n### Sales KPIs\n\n```yaml\nRevenue Metrics:\n  - Monthly Recurring Revenue (MRR)\n  - Annual Recurring Revenue (ARR)\n  - Average Revenue Per User (ARPU)\n  - Revenue Growth Rate\n\nPipeline Metrics:\n  - Sales Pipeline Value\n  - Win Rate\n  - Average Deal Size\n  - Sales Cycle Length\n\nActivity Metrics:\n  - Calls\u002FEmails per Rep\n  - Demos Scheduled\n  - Proposals Sent\n  - Close Rate\n```\n\n### Marketing KPIs\n\n```yaml\nAcquisition:\n  - Cost Per Acquisition (CPA)\n  - Customer Acquisition Cost (CAC)\n  - Lead Volume\n  - Marketing Qualified Leads (MQL)\n\nEngagement:\n  - Website Traffic\n  - Conversion Rate\n  - Email Open\u002FClick Rate\n  - Social Engagement\n\nROI:\n  - Marketing ROI\n  - Campaign Performance\n  - Channel Attribution\n  - CAC Payback Period\n```\n\n### Product KPIs\n\n```yaml\nUsage:\n  - Daily\u002FMonthly Active Users (DAU\u002FMAU)\n  - Session Duration\n  - Feature Adoption Rate\n  - Stickiness (DAU\u002FMAU)\n\nQuality:\n  - Net Promoter Score (NPS)\n  - Customer Satisfaction (CSAT)\n  - Bug\u002FIssue Count\n  - Time to Resolution\n\nGrowth:\n  - User Growth Rate\n  - Activation Rate\n  - Retention Rate\n  - Churn Rate\n```\n\n### Finance KPIs\n\n```yaml\nProfitability:\n  - Gross Margin\n  - Net Profit Margin\n  - EBITDA\n  - Operating Margin\n\nLiquidity:\n  - Current Ratio\n  - Quick Ratio\n  - Cash Flow\n  - Working Capital\n\nEfficiency:\n  - Revenue per Employee\n  - Operating Expense Ratio\n  - Days Sales Outstanding\n  - Inventory Turnover\n```\n\n## Dashboard Layout Patterns\n\n### Pattern 1: Executive Summary\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  EXECUTIVE DASHBOARD                        [Date Range ▼]  │\n├─────────────┬─────────────┬─────────────┬─────────────────┤\n│   REVENUE   │   PROFIT    │  CUSTOMERS  │    NPS SCORE    │\n│   $2.4M     │    $450K    │    12,450   │       72        │\n│   ▲ 12%     │    ▲ 8%     │    ▲ 15%    │     ▲ 5pts     │\n├─────────────┴─────────────┴─────────────┴─────────────────┤\n│                                                             │\n│  Revenue Trend                    │  Revenue by Product     │\n│  ┌───────────────────────┐       │  ┌──────────────────┐   │\n│  │    \u002F\\    \u002F\\          │       │  │ ████████ 45%     │   │\n│  │   \u002F  \\  \u002F  \\    \u002F\\   │       │  │ ██████   32%     │   │\n│  │  \u002F    \\\u002F    \\  \u002F  \\  │       │  │ ████     18%     │   │\n│  │ \u002F            \\\u002F    \\ │       │  │ ██        5%     │   │\n│  └───────────────────────┘       │  └──────────────────┘   │\n│                                                             │\n├─────────────────────────────────────────────────────────────┤\n│  🔴 Alert: Churn rate exceeded threshold (>5%)              │\n│  🟡 Warning: Support ticket volume 20% above average        │\n└─────────────────────────────────────────────────────────────┘\n```\n\n### Pattern 2: SaaS Metrics Dashboard\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  SAAS METRICS                     Jan 2024  [Monthly ▼]     │\n├──────────────────────┬──────────────────────────────────────┤\n│  ┌────────────────┐  │  MRR GROWTH                          │\n│  │      MRR       │  │  ┌────────────────────────────────┐  │\n│  │    $125,000    │  │  │                          \u002F──   │  │\n│  │     ▲ 8%       │  │  │                    \u002F────\u002F      │  │\n│  └────────────────┘  │  │              \u002F────\u002F            │  │\n│  ┌────────────────┐  │  │        \u002F────\u002F                  │  │\n│  │      ARR       │  │  │   \u002F────\u002F                       │  │\n│  │   $1,500,000   │  │  └────────────────────────────────┘  │\n│  │     ▲ 15%      │  │  J  F  M  A  M  J  J  A  S  O  N  D  │\n│  └────────────────┘  │                                      │\n├──────────────────────┼──────────────────────────────────────┤\n│  UNIT ECONOMICS      │  COHORT RETENTION                    │\n│                      │                                      │\n│  CAC:     $450       │  Month 1: ████████████████████ 100%  │\n│  LTV:     $2,700     │  Month 3: █████████████████    85%   │\n│  LTV\u002FCAC: 6.0x       │  Month 6: ████████████████     80%   │\n│                      │  Month 12: ██████████████      72%   │\n│  Payback: 4 months   │                                      │\n├──────────────────────┴──────────────────────────────────────┤\n│  CHURN ANALYSIS                                             │\n│  ┌──────────┬──────────┬──────────┬──────────────────────┐ │\n│  │ Gross    │ Net      │ Logo     │ Expansion            │ │\n│  │ 4.2%     │ 1.8%     │ 3.1%     │ 2.4%                 │ │\n│  └──────────┴──────────┴──────────┴──────────────────────┘ │\n└─────────────────────────────────────────────────────────────┘\n```\n\n### Pattern 3: Real-time Operations\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  OPERATIONS CENTER                    Live ● Last: 10:42:15 │\n├────────────────────────────┬────────────────────────────────┤\n│  SYSTEM HEALTH             │  SERVICE STATUS                │\n│  ┌──────────────────────┐  │                                │\n│  │   CPU    MEM    DISK │  │  ● API Gateway      Healthy    │\n│  │   45%    72%    58%  │  │  ● User Service     Healthy    │\n│  │   ███    ████   ███  │  │  ● Payment Service  Degraded   │\n│  │   ███    ████   ███  │  │  ● Database         Healthy    │\n│  │   ███    ████   ███  │  │  ● Cache            Healthy    │\n│  └──────────────────────┘  │                                │\n├────────────────────────────┼────────────────────────────────┤\n│  REQUEST THROUGHPUT        │  ERROR RATE                    │\n│  ┌──────────────────────┐  │  ┌──────────────────────────┐  │\n│  │ ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▂▃▄▅ │  │  │ ▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁  │  │\n│  └──────────────────────┘  │  └──────────────────────────┘  │\n│  Current: 12,450 req\u002Fs     │  Current: 0.02%                │\n│  Peak: 18,200 req\u002Fs        │  Threshold: 1.0%               │\n├────────────────────────────┴────────────────────────────────┤\n│  RECENT ALERTS                                              │\n│  10:40  🟡 High latency on payment-service (p99 > 500ms)    │\n│  10:35  🟢 Resolved: Database connection pool recovered     │\n│  10:22  🔴 Payment service circuit breaker tripped          │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Implementation Patterns\n\n### SQL for KPI Calculations\n\n```sql\n-- Monthly Recurring Revenue (MRR)\nWITH mrr_calculation AS (\n    SELECT\n        DATE_TRUNC('month', billing_date) AS month,\n        SUM(\n            CASE subscription_interval\n                WHEN 'monthly' THEN amount\n                WHEN 'yearly' THEN amount \u002F 12\n                WHEN 'quarterly' THEN amount \u002F 3\n            END\n        ) AS mrr\n    FROM subscriptions\n    WHERE status = 'active'\n    GROUP BY DATE_TRUNC('month', billing_date)\n)\nSELECT\n    month,\n    mrr,\n    LAG(mrr) OVER (ORDER BY month) AS prev_mrr,\n    (mrr - LAG(mrr) OVER (ORDER BY month)) \u002F LAG(mrr) OVER (ORDER BY month) * 100 AS growth_pct\nFROM mrr_calculation;\n\n-- Cohort Retention\nWITH cohorts AS (\n    SELECT\n        user_id,\n        DATE_TRUNC('month', created_at) AS cohort_month\n    FROM users\n),\nactivity AS (\n    SELECT\n        user_id,\n        DATE_TRUNC('month', event_date) AS activity_month\n    FROM user_events\n    WHERE event_type = 'active_session'\n)\nSELECT\n    c.cohort_month,\n    EXTRACT(MONTH FROM age(a.activity_month, c.cohort_month)) AS months_since_signup,\n    COUNT(DISTINCT a.user_id) AS active_users,\n    COUNT(DISTINCT a.user_id)::FLOAT \u002F COUNT(DISTINCT c.user_id) * 100 AS retention_rate\nFROM cohorts c\nLEFT JOIN activity a ON c.user_id = a.user_id\n    AND a.activity_month >= c.cohort_month\nGROUP BY c.cohort_month, EXTRACT(MONTH FROM age(a.activity_month, c.cohort_month))\nORDER BY c.cohort_month, months_since_signup;\n\n-- Customer Acquisition Cost (CAC)\nSELECT\n    DATE_TRUNC('month', acquired_date) AS month,\n    SUM(marketing_spend) \u002F NULLIF(COUNT(new_customers), 0) AS cac,\n    SUM(marketing_spend) AS total_spend,\n    COUNT(new_customers) AS customers_acquired\nFROM (\n    SELECT\n        DATE_TRUNC('month', u.created_at) AS acquired_date,\n        u.id AS new_customers,\n        m.spend AS marketing_spend\n    FROM users u\n    JOIN marketing_spend m ON DATE_TRUNC('month', u.created_at) = m.month\n    WHERE u.source = 'marketing'\n) acquisition\nGROUP BY DATE_TRUNC('month', acquired_date);\n```\n\n### Python Dashboard Code (Streamlit)\n\n```python\nimport streamlit as st\nimport pandas as pd\nimport plotly.express as px\nimport plotly.graph_objects as go\n\nst.set_page_config(page_title=\"KPI Dashboard\", layout=\"wide\")\n\n# Header with date filter\ncol1, col2 = st.columns([3, 1])\nwith col1:\n    st.title(\"Executive Dashboard\")\nwith col2:\n    date_range = st.selectbox(\n        \"Period\",\n        [\"Last 7 Days\", \"Last 30 Days\", \"Last Quarter\", \"YTD\"]\n    )\n\n# KPI Cards\ndef metric_card(label, value, delta, prefix=\"\", suffix=\"\"):\n    delta_color = \"green\" if delta >= 0 else \"red\"\n    delta_arrow = \"▲\" if delta >= 0 else \"▼\"\n    st.metric(\n        label=label,\n        value=f\"{prefix}{value:,.0f}{suffix}\",\n        delta=f\"{delta_arrow} {abs(delta):.1f}%\"\n    )\n\ncol1, col2, col3, col4 = st.columns(4)\nwith col1:\n    metric_card(\"Revenue\", 2400000, 12.5, prefix=\"$\")\nwith col2:\n    metric_card(\"Customers\", 12450, 15.2)\nwith col3:\n    metric_card(\"NPS Score\", 72, 5.0)\nwith col4:\n    metric_card(\"Churn Rate\", 4.2, -0.8, suffix=\"%\")\n\n# Charts\ncol1, col2 = st.columns(2)\n\nwith col1:\n    st.subheader(\"Revenue Trend\")\n    revenue_data = pd.DataFrame({\n        'Month': pd.date_range('2024-01-01', periods=12, freq='M'),\n        'Revenue': [180000, 195000, 210000, 225000, 240000, 255000,\n                    270000, 285000, 300000, 315000, 330000, 345000]\n    })\n    fig = px.line(revenue_data, x='Month', y='Revenue',\n                  line_shape='spline', markers=True)\n    fig.update_layout(height=300)\n    st.plotly_chart(fig, use_container_width=True)\n\nwith col2:\n    st.subheader(\"Revenue by Product\")\n    product_data = pd.DataFrame({\n        'Product': ['Enterprise', 'Professional', 'Starter', 'Other'],\n        'Revenue': [45, 32, 18, 5]\n    })\n    fig = px.pie(product_data, values='Revenue', names='Product',\n                 hole=0.4)\n    fig.update_layout(height=300)\n    st.plotly_chart(fig, use_container_width=True)\n\n# Cohort Heatmap\nst.subheader(\"Cohort Retention\")\ncohort_data = pd.DataFrame({\n    'Cohort': ['Jan', 'Feb', 'Mar', 'Apr', 'May'],\n    'M0': [100, 100, 100, 100, 100],\n    'M1': [85, 87, 84, 86, 88],\n    'M2': [78, 80, 76, 79, None],\n    'M3': [72, 74, 70, None, None],\n    'M4': [68, 70, None, None, None],\n})\nfig = go.Figure(data=go.Heatmap(\n    z=cohort_data.iloc[:, 1:].values,\n    x=['M0', 'M1', 'M2', 'M3', 'M4'],\n    y=cohort_data['Cohort'],\n    colorscale='Blues',\n    text=cohort_data.iloc[:, 1:].values,\n    texttemplate='%{text}%',\n    textfont={\"size\": 12},\n))\nfig.update_layout(height=250)\nst.plotly_chart(fig, use_container_width=True)\n\n# Alerts Section\nst.subheader(\"Alerts\")\nalerts = [\n    {\"level\": \"error\", \"message\": \"Churn rate exceeded threshold (>5%)\"},\n    {\"level\": \"warning\", \"message\": \"Support ticket volume 20% above average\"},\n]\nfor alert in alerts:\n    if alert[\"level\"] == \"error\":\n        st.error(f\"🔴 {alert['message']}\")\n    elif alert[\"level\"] == \"warning\":\n        st.warning(f\"🟡 {alert['message']}\")\n```\n\n## Best Practices\n\n### Do's\n\n- **Limit to 5-7 KPIs** - Focus on what matters\n- **Show context** - Comparisons, trends, targets\n- **Use consistent colors** - Red=bad, green=good\n- **Enable drilldown** - From summary to detail\n- **Update appropriately** - Match metric frequency\n\n### Don'ts\n\n- **Don't show vanity metrics** - Focus on actionable data\n- **Don't overcrowd** - White space aids comprehension\n- **Don't use 3D charts** - They distort perception\n- **Don't hide methodology** - Document calculations\n- **Don't ignore mobile** - Ensure responsive design\n\n## Troubleshooting\n\n### MRR shown on dashboard contradicts finance's number\n\nThe most common cause is inconsistent treatment of annual plans. Finance may prorate to a daily rate while the dashboard normalizes to monthly. Align on a single formula and document it directly on the dashboard card:\n\n```sql\n-- Explicit formula shown in tooltip \u002F data dictionary\n-- Annual plans: divide total contract value by 12\n-- Quarterly plans: divide by 3\n-- Monthly plans: use as-is\nCASE subscription_interval\n    WHEN 'monthly'   THEN amount\n    WHEN 'quarterly' THEN amount \u002F 3.0\n    WHEN 'yearly'    THEN amount \u002F 12.0\nEND AS normalized_mrr\n```\n\n### Dashboard shows green but product team reports users complaining\n\nThe dashboard likely tracks system uptime (a lagging indicator) but not user-facing quality metrics. Add customer-perceived metrics alongside infrastructure metrics:\n\n| Infrastructure (green) | User-perceived (add these) |\n|---|---|\n| API uptime 99.9% | P95 page load time |\n| Error rate 0.1% | Task completion rate |\n| Queue depth normal | Support ticket volume |\n\n### Retention cohort looks flat — no variation between cohorts\n\nCheck whether the cohort query is partitioning by signup month correctly. A common bug is using `created_at::date` instead of `DATE_TRUNC('month', created_at)`, which groups by day and produces cohorts too small to show trends:\n\n```sql\n-- Wrong: too granular, cohorts are too small\nDATE_TRUNC('day', created_at) AS cohort_date\n\n-- Correct: monthly cohorts\nDATE_TRUNC('month', created_at) AS cohort_month\n```\n\n### Real-time dashboard hammers the database\n\nA live dashboard refreshing every 10 seconds with complex cohort SQL will degrade production query performance. Separate OLAP workloads from OLTP by writing pre-aggregated metrics to a summary table via a scheduled job, and have the dashboard read from that:\n\n```python\n# Scheduled every 5 minutes via cron\u002FCelery\ndef refresh_mrr_summary():\n    conn.execute(\"\"\"\n        INSERT INTO kpi_snapshot (metric, value, snapshot_at)\n        SELECT 'mrr', SUM(...), NOW()\n        FROM subscriptions WHERE status = 'active'\n        ON CONFLICT (metric) DO UPDATE SET value = EXCLUDED.value\n    \"\"\")\n```\n\n### Alert thresholds fire constantly, team ignores them\n\nStatic thresholds set once and never reviewed cause alert fatigue. Use dynamic thresholds based on rolling averages so alerts fire only when the metric deviates significantly from its own baseline:\n\n```python\n# Alert if current value is > 2 standard deviations from 30-day rolling mean\ndef is_anomalous(current: float, history: list[float]) -> bool:\n    mean = statistics.mean(history)\n    stdev = statistics.stdev(history)\n    return abs(current - mean) > 2 * stdev\n```\n\n## Related Skills\n\n- `data-storytelling` - Turn dashboard findings into narratives that drive executive decisions\n","# KPI Dashboard Design\n\nComprehensive patterns for designing effective Key Performance Indicator (KPI) dashboards that drive business decisions.\n\n## When to Use This Skill\n\n- Designing executive dashboards\n- Selecting meaningful KPIs\n- Building real-time monitoring displays\n- Creating department-specific metrics views\n- Improving existing dashboard layouts\n- Establishing metric governance\n\n## Core Concepts\n\n### 1. KPI Framework\n\n| Level           | Focus            | Update Frequency  | Audience   |\n| --------------- | ---------------- | ----------------- | ---------- |\n| **Strategic**   | Long-term goals  | Monthly\u002FQuarterly | Executives |\n| **Tactical**    | Department goals | Weekly\u002FMonthly    | Managers   |\n| **Operational** | Day-to-day       | Real-time\u002FDaily   | Teams      |\n\n### 2. SMART KPIs\n\n```\nSpecific: Clear definition\nMeasurable: Quantifiable\nAchievable: Realistic targets\nRelevant: Aligned to goals\nTime-bound: Defined period\n```\n\n### 3. Dashboard Hierarchy\n\n```\n├── Executive Summary (1 page)\n│   ├── 4-6 headline KPIs\n│   ├── Trend indicators\n│   └── Key alerts\n├── Department Views\n│   ├── Sales Dashboard\n│   ├── Marketing Dashboard\n│   ├── Operations Dashboard\n│   └── Finance Dashboard\n└── Detailed Drilldowns\n    ├── Individual metrics\n    └── Root cause analysis\n```\n\n## Common KPIs by Department\n\n### Sales KPIs\n\n```yaml\nRevenue Metrics:\n  - Monthly Recurring Revenue (MRR)\n  - Annual Recurring Revenue (ARR)\n  - Average Revenue Per User (ARPU)\n  - Revenue Growth Rate\n\nPipeline Metrics:\n  - Sales Pipeline Value\n  - Win Rate\n  - Average Deal Size\n  - Sales Cycle Length\n\nActivity Metrics:\n  - Calls\u002FEmails per Rep\n  - Demos Scheduled\n  - Proposals Sent\n  - Close Rate\n```\n\n### Marketing KPIs\n\n```yaml\nAcquisition:\n  - Cost Per Acquisition (CPA)\n  - Customer Acquisition Cost (CAC)\n  - Lead Volume\n  - Marketing Qualified Leads (MQL)\n\nEngagement:\n  - Website Traffic\n  - Conversion Rate\n  - Email Open\u002FClick Rate\n  - Social Engagement\n\nROI:\n  - Marketing ROI\n  - Campaign Performance\n  - Channel Attribution\n  - CAC Payback Period\n```\n\n### Product KPIs\n\n```yaml\nUsage:\n  - Daily\u002FMonthly Active Users (DAU\u002FMAU)\n  - Session Duration\n  - Feature Adoption Rate\n  - Stickiness (DAU\u002FMAU)\n\nQuality:\n  - Net Promoter Score (NPS)\n  - Customer Satisfaction (CSAT)\n  - Bug\u002FIssue Count\n  - Time to Resolution\n\nGrowth:\n  - User Growth Rate\n  - Activation Rate\n  - Retention Rate\n  - Churn Rate\n```\n\n### Finance KPIs\n\n```yaml\nProfitability:\n  - Gross Margin\n  - Net Profit Margin\n  - EBITDA\n  - Operating Margin\n\nLiquidity:\n  - Current Ratio\n  - Quick Ratio\n  - Cash Flow\n  - Working Capital\n\nEfficiency:\n  - Revenue per Employee\n  - Operating Expense Ratio\n  - Days Sales Outstanding\n  - Inventory Turnover\n```\n\n## Dashboard Layout Patterns\n\n### Pattern 1: Executive Summary\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  EXECUTIVE DASHBOARD                        [Date Range ▼]  │\n├─────────────┬─────────────┬─────────────┬─────────────────┤\n│   REVENUE   │   PROFIT    │  CUSTOMERS  │    NPS SCORE    │\n│   $2.4M     │    $450K    │    12,450   │       72        │\n│   ▲ 12%     │    ▲ 8%     │    ▲ 15%    │     ▲ 5pts     │\n├─────────────┴─────────────┴─────────────┴─────────────────┤\n│                                                             │\n│  Revenue Trend                    │  Revenue by Product     │\n│  ┌───────────────────────┐       │  ┌──────────────────┐   │\n│  │    \u002F\\    \u002F\\          │       │  │ ████████ 45%     │   │\n│  │   \u002F  \\  \u002F  \\    \u002F\\   │       │  │ ██████   32%     │   │\n│  │  \u002F    \\\u002F    \\  \u002F  \\  │       │  │ ████     18%     │   │\n│  │ \u002F            \\\u002F    \\ │       │  │ ██        5%     │   │\n│  └───────────────────────┘       │  └──────────────────┘   │\n│                                                             │\n├─────────────────────────────────────────────────────────────┤\n│  🔴 Alert: Churn rate exceeded threshold (>5%)              │\n│  🟡 Warning: Support ticket volume 20% above average        │\n└─────────────────────────────────────────────────────────────┘\n```\n\n### Pattern 2: SaaS Metrics Dashboard\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  SAAS METRICS                     Jan 2024  [Monthly ▼]     │\n├──────────────────────┬──────────────────────────────────────┤\n│  ┌────────────────┐  │  MRR GROWTH                          │\n│  │      MRR       │  │  ┌────────────────────────────────┐  │\n│  │    $125,000    │  │  │                          \u002F──   │  │\n│  │     ▲ 8%       │  │  │                    \u002F────\u002F      │  │\n│  └────────────────┘  │  │              \u002F────\u002F            │  │\n│  ┌────────────────┐  │  │        \u002F────\u002F                  │  │\n│  │      ARR       │  │  │   \u002F────\u002F                       │  │\n│  │   $1,500,000   │  │  └────────────────────────────────┘  │\n│  │     ▲ 15%      │  │  J  F  M  A  M  J  J  A  S  O  N  D  │\n│  └────────────────┘  │                                      │\n├──────────────────────┼──────────────────────────────────────┤\n│  UNIT ECONOMICS      │  COHORT RETENTION                    │\n│                      │                                      │\n│  CAC:     $450       │  Month 1: ████████████████████ 100%  │\n│  LTV:     $2,700     │  Month 3: █████████████████    85%   │\n│  LTV\u002FCAC: 6.0x       │  Month 6: ████████████████     80%   │\n│                      │  Month 12: ██████████████      72%   │\n│  Payback: 4 months   │                                      │\n├──────────────────────┴──────────────────────────────────────┤\n│  CHURN ANALYSIS                                             │\n│  ┌──────────┬──────────┬──────────┬──────────────────────┐ │\n│  │ Gross    │ Net      │ Logo     │ Expansion            │ │\n│  │ 4.2%     │ 1.8%     │ 3.1%     │ 2.4%                 │ │\n│  └──────────┴──────────┴──────────┴──────────────────────┘ │\n└─────────────────────────────────────────────────────────────┘\n```\n\n### Pattern 3: Real-time Operations\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  OPERATIONS CENTER                    Live ● Last: 10:42:15 │\n├────────────────────────────┬────────────────────────────────┤\n│  SYSTEM HEALTH             │  SERVICE STATUS                │\n│  ┌──────────────────────┐  │                                │\n│  │   CPU    MEM    DISK │  │  ● API Gateway      Healthy    │\n│  │   45%    72%    58%  │  │  ● User Service     Healthy    │\n│  │   ███    ████   ███  │  │  ● Payment Service  Degraded   │\n│  │   ███    ████   ███  │  │  ● Database         Healthy    │\n│  │   ███    ████   ███  │  │  ● Cache            Healthy    │\n│  └──────────────────────┘  │                                │\n├────────────────────────────┼────────────────────────────────┤\n│  REQUEST THROUGHPUT        │  ERROR RATE                    │\n│  ┌──────────────────────┐  │  ┌──────────────────────────┐  │\n│  │ ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▂▃▄▅ │  │  │ ▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁  │  │\n│  └──────────────────────┘  │  └──────────────────────────┘  │\n│  Current: 12,450 req\u002Fs     │  Current: 0.02%                │\n│  Peak: 18,200 req\u002Fs        │  Threshold: 1.0%               │\n├────────────────────────────┴────────────────────────────────┤\n│  RECENT ALERTS                                              │\n│  10:40  🟡 High latency on payment-service (p99 > 500ms)    │\n│  10:35  🟢 Resolved: Database connection pool recovered     │\n│  10:22  🔴 Payment service circuit breaker tripped          │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Implementation Patterns\n\n### SQL for KPI Calculations\n\n```sql\n-- Monthly Recurring Revenue (MRR)\nWITH mrr_calculation AS (\n    SELECT\n        DATE_TRUNC('month', billing_date) AS month,\n        SUM(\n            CASE subscription_interval\n                WHEN 'monthly' THEN amount\n                WHEN 'yearly' THEN amount \u002F 12\n                WHEN 'quarterly' THEN amount \u002F 3\n            END\n        ) AS mrr\n    FROM subscriptions\n    WHERE status = 'active'\n    GROUP BY DATE_TRUNC('month', billing_date)\n)\nSELECT\n    month,\n    mrr,\n    LAG(mrr) OVER (ORDER BY month) AS prev_mrr,\n    (mrr - LAG(mrr) OVER (ORDER BY month)) \u002F LAG(mrr) OVER (ORDER BY month) * 100 AS growth_pct\nFROM mrr_calculation;\n\n-- Cohort Retention\nWITH cohorts AS (\n    SELECT\n        user_id,\n        DATE_TRUNC('month', created_at) AS cohort_month\n    FROM users\n),\nactivity AS (\n    SELECT\n        user_id,\n        DATE_TRUNC('month', event_date) AS activity_month\n    FROM user_events\n    WHERE event_type = 'active_session'\n)\nSELECT\n    c.cohort_month,\n    EXTRACT(MONTH FROM age(a.activity_month, c.cohort_month)) AS months_since_signup,\n    COUNT(DISTINCT a.user_id) AS active_users,\n    COUNT(DISTINCT a.user_id)::FLOAT \u002F COUNT(DISTINCT c.user_id) * 100 AS retention_rate\nFROM cohorts c\nLEFT JOIN activity a ON c.user_id = a.user_id\n    AND a.activity_month >= c.cohort_month\nGROUP BY c.cohort_month, EXTRACT(MONTH FROM age(a.activity_month, c.cohort_month))\nORDER BY c.cohort_month, months_since_signup;\n\n-- Customer Acquisition Cost (CAC)\nSELECT\n    DATE_TRUNC('month', acquired_date) AS month,\n    SUM(marketing_spend) \u002F NULLIF(COUNT(new_customers), 0) AS cac,\n    SUM(marketing_spend) AS total_spend,\n    COUNT(new_customers) AS customers_acquired\nFROM (\n    SELECT\n        DATE_TRUNC('month', u.created_at) AS acquired_date,\n        u.id AS new_customers,\n        m.spend AS marketing_spend\n    FROM users u\n    JOIN marketing_spend m ON DATE_TRUNC('month', u.created_at) = m.month\n    WHERE u.source = 'marketing'\n) acquisition\nGROUP BY DATE_TRUNC('month', acquired_date);\n```\n\n### Python Dashboard Code (Streamlit)\n\n```python\nimport streamlit as st\nimport pandas as pd\nimport plotly.express as px\nimport plotly.graph_objects as go\n\nst.set_page_config(page_title=\"KPI Dashboard\", layout=\"wide\")\n\n# Header with date filter\ncol1, col2 = st.columns([3, 1])\nwith col1:\n    st.title(\"Executive Dashboard\")\nwith col2:\n    date_range = st.selectbox(\n        \"Period\",\n        [\"Last 7 Days\", \"Last 30 Days\", \"Last Quarter\", \"YTD\"]\n    )\n\n# KPI Cards\ndef metric_card(label, value, delta, prefix=\"\", suffix=\"\"):\n    delta_color = \"green\" if delta >= 0 else \"red\"\n    delta_arrow = \"▲\" if delta >= 0 else \"▼\"\n    st.metric(\n        label=label,\n        value=f\"{prefix}{value:,.0f}{suffix}\",\n        delta=f\"{delta_arrow} {abs(delta):.1f}%\"\n    )\n\ncol1, col2, col3, col4 = st.columns(4)\nwith col1:\n    metric_card(\"Revenue\", 2400000, 12.5, prefix=\"$\")\nwith col2:\n    metric_card(\"Customers\", 12450, 15.2)\nwith col3:\n    metric_card(\"NPS Score\", 72, 5.0)\nwith col4:\n    metric_card(\"Churn Rate\", 4.2, -0.8, suffix=\"%\")\n\n# Charts\ncol1, col2 = st.columns(2)\n\nwith col1:\n    st.subheader(\"Revenue Trend\")\n    revenue_data = pd.DataFrame({\n        'Month': pd.date_range('2024-01-01', periods=12, freq='M'),\n        'Revenue': [180000, 195000, 210000, 225000, 240000, 255000,\n                    270000, 285000, 300000, 315000, 330000, 345000]\n    })\n    fig = px.line(revenue_data, x='Month', y='Revenue',\n                  line_shape='spline', markers=True)\n    fig.update_layout(height=300)\n    st.plotly_chart(fig, use_container_width=True)\n\nwith col2:\n    st.subheader(\"Revenue by Product\")\n    product_data = pd.DataFrame({\n        'Product': ['Enterprise', 'Professional', 'Starter', 'Other'],\n        'Revenue': [45, 32, 18, 5]\n    })\n    fig = px.pie(product_data, values='Revenue', names='Product',\n                 hole=0.4)\n    fig.update_layout(height=300)\n    st.plotly_chart(fig, use_container_width=True)\n\n# Cohort Heatmap\nst.subheader(\"Cohort Retention\")\ncohort_data = pd.DataFrame({\n    'Cohort': ['Jan', 'Feb', 'Mar', 'Apr', 'May'],\n    'M0': [100, 100, 100, 100, 100],\n    'M1': [85, 87, 84, 86, 88],\n    'M2': [78, 80, 76, 79, None],\n    'M3': [72, 74, 70, None, None],\n    'M4': [68, 70, None, None, None],\n})\nfig = go.Figure(data=go.Heatmap(\n    z=cohort_data.iloc[:, 1:].values,\n    x=['M0', 'M1', 'M2', 'M3', 'M4'],\n    y=cohort_data['Cohort'],\n    colorscale='Blues',\n    text=cohort_data.iloc[:, 1:].values,\n    texttemplate='%{text}%',\n    textfont={\"size\": 12},\n))\nfig.update_layout(height=250)\nst.plotly_chart(fig, use_container_width=True)\n\n# Alerts Section\nst.subheader(\"Alerts\")\nalerts = [\n    {\"level\": \"error\", \"message\": \"Churn rate exceeded threshold (>5%)\"},\n    {\"level\": \"warning\", \"message\": \"Support ticket volume 20% above average\"},\n]\nfor alert in alerts:\n    if alert[\"level\"] == \"error\":\n        st.error(f\"🔴 {alert['message']}\")\n    elif alert[\"level\"] == \"warning\":\n        st.warning(f\"🟡 {alert['message']}\")\n```\n\n## Best Practices\n\n### Do's\n\n- **Limit to 5-7 KPIs** - Focus on what matters\n- **Show context** - Comparisons, trends, targets\n- **Use consistent colors** - Red=bad, green=good\n- **Enable drilldown** - From summary to detail\n- **Update appropriately** - Match metric frequency\n\n### Don'ts\n\n- **Don't show vanity metrics** - Focus on actionable data\n- **Don't overcrowd** - White space aids comprehension\n- **Don't use 3D charts** - They distort perception\n- **Don't hide methodology** - Document calculations\n- **Don't ignore mobile** - Ensure responsive design\n\n## Troubleshooting\n\n### MRR shown on dashboard contradicts finance's number\n\nThe most common cause is inconsistent treatment of annual plans. Finance may prorate to a daily rate while the dashboard normalizes to monthly. Align on a single formula and document it directly on the dashboard card:\n\n```sql\n-- Explicit formula shown in tooltip \u002F data dictionary\n-- Annual plans: divide total contract value by 12\n-- Quarterly plans: divide by 3\n-- Monthly plans: use as-is\nCASE subscription_interval\n    WHEN 'monthly'   THEN amount\n    WHEN 'quarterly' THEN amount \u002F 3.0\n    WHEN 'yearly'    THEN amount \u002F 12.0\nEND AS normalized_mrr\n```\n\n### Dashboard shows green but product team reports users complaining\n\nThe dashboard likely tracks system uptime (a lagging indicator) but not user-facing quality metrics. Add customer-perceived metrics alongside infrastructure metrics:\n\n| Infrastructure (green) | User-perceived (add these) |\n|---|---|\n| API uptime 99.9% | P95 page load time |\n| Error rate 0.1% | Task completion rate |\n| Queue depth normal | Support ticket volume |\n\n### Retention cohort looks flat — no variation between cohorts\n\nCheck whether the cohort query is partitioning by signup month correctly. A common bug is using `created_at::date` instead of `DATE_TRUNC('month', created_at)`, which groups by day and produces cohorts too small to show trends:\n\n```sql\n-- Wrong: too granular, cohorts are too small\nDATE_TRUNC('day', created_at) AS cohort_date\n\n-- Correct: monthly cohorts\nDATE_TRUNC('month', created_at) AS cohort_month\n```\n\n### Real-time dashboard hammers the database\n\nA live dashboard refreshing every 10 seconds with complex cohort SQL will degrade production query performance. Separate OLAP workloads from OLTP by writing pre-aggregated metrics to a summary table via a scheduled job, and have the dashboard read from that:\n\n```python\n# Scheduled every 5 minutes via cron\u002FCelery\ndef refresh_mrr_summary():\n    conn.execute(\"\"\"\n        INSERT INTO kpi_snapshot (metric, value, snapshot_at)\n        SELECT 'mrr', SUM(...), NOW()\n        FROM subscriptions WHERE status = 'active'\n        ON CONFLICT (metric) DO UPDATE SET value = EXCLUDED.value\n    \"\"\")\n```\n\n### Alert thresholds fire constantly, team ignores them\n\nStatic thresholds set once and never reviewed cause alert fatigue. Use dynamic thresholds based on rolling averages so alerts fire only when the metric deviates significantly from its own baseline:\n\n```python\n# Alert if current value is > 2 standard deviations from 30-day rolling mean\ndef is_anomalous(current: float, history: list[float]) -> bool:\n    mean = statistics.mean(history)\n    stdev = statistics.stdev(history)\n    return abs(current - mean) > 2 * stdev\n```\n\n## Related Skills\n\n- `data-storytelling` - Turn dashboard findings into narratives that drive executive decisions\n",{"name":5,"description":7},"main","900bb95bbe72cdb94af6f5a620aa5081264b7b6d",".claude\u002Fmarketplaces\u002Fwshobson\u002Fplugins\u002Fbusiness-analytics\u002Fskills\u002Fkpi-dashboard-design",0,"https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up#readme","https:\u002F\u002Fgithub.com\u002Fsteph-frtech","2026-05-16 00:03:30",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add steph-frtech\u002Fclaude-code-up --skill kpi-dashboard-design",{"tool":37,"command":38},"bunx","bunx skills add steph-frtech\u002Fclaude-code-up --skill kpi-dashboard-design",{"tool":40,"command":41},"pnpm","pnpm dlx skills add steph-frtech\u002Fclaude-code-up --skill kpi-dashboard-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fmarketplaces\u002Fwshobson\u002Fplugins\u002Fbusiness-analytics\u002Fskills\u002Fkpi-dashboard-design\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M72Y1BY6X8TX3DS19Y04NEBQ","example","One-line summary of what this skill does","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002Fskills\u002Fexample\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M72Y1A38EYR8S9P1MBYDAQTW","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__writing-plans\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M72Y174QSV1B5NV1E4KWHQBR","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__using-git-worktrees\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M72Y14SQRHHMKG316HGB2CGK","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__test-driven-development\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M72Y127BCPRH3BRKPJC3Q3G2","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__systematic-debugging\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M72Y1090GJA6B67KPD60WPHH","subagent-driven-development","Use when executing implementation plans with independent tasks in the current session","https:\u002F\u002Fgithub.com\u002Fsteph-frtech\u002Fclaude-code-up\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsuperpowers__subagent-driven-development\u002FSKILL.md",[],[]]