agents/monitoring/be-cost/SKILL.md
Monitor and analyze backend GPU costs for LTX API and LTX Studio. Use when analyzing cost trends, detecting anomalies, breaking down costs by endpoint/model/org/process, monitoring utilization, or investigating cost efficiency drift.
npx skillsauth add lightricks/ltx-analytics-agents be-cost-monitoringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ask the user:
Before writing SQL:
shared/product-context.md — LTX products and business contextshared/bq-schema.md — GPU cost table schema (lines 418-615)shared/metric-standards.md — GPU cost metric patterns (section 13)shared/event-registry.yaml — Feature events (if analyzing feature-level costs)shared/gpu-cost-query-templates.md — 11 production-ready SQL queriesshared/gpu-cost-analysis-patterns.md — Analysis workflows and benchmarksKey learnings:
ltx-dwh-prod-processed.gpu_costs.gpu_request_attribution_and_costdt (DATE) — always filter for performancecost_category: inference (requests), idle, overhead, unusedrow_cost + attributed_idle_cost + attributed_overhead_cost (inference rows only)SUM(row_cost) across all categoriesIf user didn't specify anything: Run all 11 query templates from shared/gpu-cost-query-templates.md to provide comprehensive cost overview.
If user specified specific analysis: Select appropriate template:
| User asks... | Use template | |-------------|-------------| | "What are total costs?" | Daily Total Cost (API + Studio) | | "Break down API costs" | API Cost by Endpoint & Model | | "Break down Studio costs" | Studio Cost by Process | | "Yesterday vs day before" | Day-over-Day Comparison | | "This week vs last week" | Week-over-Week Comparison | | "Detect cost spikes" | Anomaly Detection (Z-Score) | | "GPU utilization breakdown" | Utilization by Cost Category | | "Cost efficiency by model" | Cost per Request by Model | | "Which orgs cost most?" | API Cost by Organization |
See shared/gpu-cost-query-templates.md for all 11 query templates.
Run query using:
bq --project_id=ltx-dwh-explore query --use_legacy_sql=false --format=pretty "
<query>
"
Or use BigQuery console with project ltx-dwh-explore.
For cost trends:
For anomaly detection:
For breakdowns:
Format results with:
For ongoing monitoring:
For detailed table schema including all dimensions, columns, and cost calculations, see references/schema-reference.md.
| File | Read when |
|------|-----------|
| references/schema-reference.md | GPU cost table dimensions, columns, and cost calculations |
| shared/bq-schema.md | Understanding GPU cost table schema (lines 418-615) |
| shared/metric-standards.md | GPU cost metric SQL patterns (section 13) |
| shared/gpu-cost-query-templates.md | Selecting query template for analysis (11 production-ready queries) |
| shared/gpu-cost-analysis-patterns.md | Interpreting results, workflows, benchmarks, investigation playbooks |
dt partition column for performancecost_category = 'inference' for request-level analysisis_lt_team IS FALSE for customer-facing cost analysisltx-dwh-explore as execution projectSAFE_DIVIDE to avoid division by zeroSUM(row_cost) across all rows for total infrastructure costdevelopment
Adds the analyst layer (segmentation framing, filter/KPI surfacing, LTX-specific definitions, contextual follow-ups) on top of any Data MasterMind data interaction for LTX stakeholders (PMs, marketers, design, leadership). Wraps `get-data` / `validate-data` / `understand-data` / `visualize-data` — dialing intensity from a full guided session (for "look into X", "investigate Y", "do an analysis of …") down to a compressed wrap (for "what's MRR?", "is this number right?"). Output mode (chat-only or HTML artifact) is chosen up front for session-style asks. Always asks about Enterprise / paid non-Enterprise / Free segmentation and Studio-feature tier-gating when relevant. Do NOT use only when the user explicitly opts out ("just give me the number, no extras") or for templated feature dashboards (that's the Hex-based `dashboard-builder`).
testing
Generate LTX Studio sales opportunities report and credit limit alerts. Covers pipeline by rep/product (yesterday + QTD), new PELs/PQLs, future meetings, and enterprise orgs at 80%+ token usage. Use when: sales standup, pipeline review, account health check, or when asked for 'sales numbers' or 'credit alerts'.
data-ai
Generate LTX Studio product daily report with revenue, usage by segment (Enterprise, Pilot, Paying Non-Enterprise, Free), and DoD/DOW-avg comparisons. Use when: daily product standup, executive reporting, or when asked for 'yesterday's product numbers'.
data-ai
Generate LTX Studio marketing & sales daily report with lead gen, spend, PELs/PQLs, sales metrics, and top org usage vs 7-day averages. Use when: daily marketing standup, GTM review, or when asked for 'marketing numbers' or 'lead performance'.