Command Palette

Search for a command to run...

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

workload-analysis

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

Generate comprehensive workload analysis visualizations for PostHog customer accounts. Use when user requests account analysis, workload breakdown, SDK…

PostHogот PostHog★ 81 звезда на GitHub

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

Workload Analysis Skill

Generate interactive React visualizations showing how customer spend flows from products → workloads → teams, with SDK breakdowns, opportunity identification, and risk assessment.

Workflow

Step 1: Collect Account Data

  1. Find account in Vitally:

    vitally:find_account_by_name → get externalId (organization_id)
    vitally:get_account_full with filterUnnecessaryFields=false
    
  2. Query billing data from PostHog:

    SELECT date, report 
    FROM postgres.prod.billing_usagereport
    WHERE organization_id = '[externalId]'
    ORDER BY date DESC LIMIT 3
    
  3. Extract key fields (see references/data-mapping.md for complete field list):

    • Vitally: MRR, forecasted_mrr, diff_dollars, product spend fields
    • Billing: SDK event counts, AI events, recordings, exceptions, feature flag requests

Step 2: Calculate SDK Proportions

⚠️ CRITICAL: Check ALL SDKs, not just common ones. Flutter/React Native are often the dominant SDK for mobile-first companies.

From billing data, extract COMPLETE SDK breakdown:

const sdkBreakdown = {
  // Web
  web: report.web_events_count_in_period || 0,
  // Backend
  node: report.node_events_count_in_period || 0,
  python: report.python_events_count_in_period || 0,
  go: report.go_events_count_in_period || 0,
  ruby: report.ruby_events_count_in_period || 0,
  php: report.php_events_count_in_period || 0,
  java: report.java_events_count_in_period || 0,
  // Mobile Native
  ios: report.ios_events_count_in_period || 0,
  android: report.android_events_count_in_period || 0,
  // Mobile Cross-Platform (DON'T MISS THESE!)
  flutter: report.flutter_events_count_in_period || 0,
  react_native: report.react_native_events_count_in_period || 0,
};
const total = Object.values(sdkBreakdown).reduce((a, b) => a + b, 0);

// Verify: SDK total should ≈ event_count_in_period
// If big gap, you're missing an SDK!

Step 3: Define Workloads

Create workloads based on SDK proportions and product usage patterns:

Pattern Workload Type Examples
Web >80% Web Application (primary) SaaS dashboard
Node/Python/Go/Ruby/PHP/Java >80% Backend API (primary) API-first product
iOS + Android >20% Native Mobile Apps (primary) Consumer iOS/Android
Flutter >20% Flutter Mobile App (primary) Cross-platform mobile
React Native >20% React Native App (primary) Cross-platform mobile
AI events >0 LLM/AI Platform AI-first company
External schemas >0 Data Platform Data warehouse usage

Mobile Priority: If Flutter or React Native dominates, that's the primary mobile workload (not iOS/Android native).

Step 4: Allocate Spend to Workloads

Apply allocation rules from references/spend-allocation.md:

Product Allocation Rule
Product Analytics By SDK event proportion
Identified Events By SDK event proportion
Session Replay (Web) 100% to Web workload
Mobile Replay Split by iOS/Android event ratio
Feature Flags 100% to primary SDK consumer
Error Tracking By exception source (web vs node)
LLM Analytics 100% to LLM Platform workload
Data Warehouse 100% to Data Platform workload
Group Analytics 100% to primary workload
Teams/Scale Platform-wide (separate)

Step 5: Identify Opportunities & Risks

Apply frameworks from references/opportunity-framework.md:

Opportunities (check in order):

  1. Monthly → Annual conversion (if not annual)
  2. Product gaps (enrolled but $0 spend)
  3. Cross-sell (missing products for their profile)
  4. Usage expansion (approaching limits)

Risks (flag if present):

  1. Declining MRR (forecasted < current)
  2. No annual contract (>$3K MRR monthly)
  3. Low health score (<6)
  4. Single product dependency (>50% of spend)

Step 6: Generate React Visualization

Use the template from assets/workload-template.jsx. ALL components below are REQUIRED:

MANDATORY Components (include ALL of these):

  1. SummaryCards - MRR, health score, contract type, alerts
  2. SdkBreakdownBar - Visual SDK proportion bar
  3. WorkloadCards - Cards for each workload with products
  4. OpportunitiesTable - Ranked opportunities with confidence
  5. RisksTable - If risks present, severity-ranked
  6. TreeView - REQUIRED: Hierarchical view showing Account → Workloads → Products → Teams with connecting lines
  7. SankeyView - REQUIRED: SVG revenue flow diagram showing Products (left bars) flowing to Workloads (right bars) with curved paths
  8. MatrixView - Products × Workloads grid with spend cells

View Tabs (MUST include all 5):

const tabs = [
  { id: 'overview', label: '📊 Overview' },
  { id: 'risks', label: '🚨 Risks' },      // Show if risks.length > 0
  { id: 'tree', label: '🌳 Tree View' },   // REQUIRED
  { id: 'sankey', label: '💰 Revenue Flow' }, // REQUIRED
  { id: 'mat
Полный SKILL.md на GitHub

Установить workload-analysis в Claude Code и Claude Desktop

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

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

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

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

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

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

Вложенные файлы

README.mdassets/workload-template.jsxreferences/data-mapping.mdreferences/opportunity-framework.mdreferences/spend-allocation.md

FAQ

Что делает скилл workload-analysis?

Generate comprehensive workload analysis visualizations for PostHog customer accounts. Use when user requests account analysis, workload breakdown, SDK analysis, spend allocation, or expansion opportunity assessment. Triggers include "analyze [account]", "workload analysis for [account]", "SDK breakdown for [account]", "show me how [account] uses PostHog", or any request to understand customer usage patterns across products and platforms.

Как установить скилл workload-analysis?

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

Скилл workload-analysis запускает скрипты?

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

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

Сравнить workload-analysis с