Generate usage summaries, KPI trends, ROI reports, and compliance analytics from the terminal. AUTO-INVOKE when user wants: usage summaries, KPI trends, risk analysis, ROI reports, efficiency metrics, agent comparisons, token usage reports, cost analysis, compliance reports, or any analytics without using the web dashboard. TRIGGER KEYWORDS: olakai, analytics, reports, usage summary, KPI trends, risk analysis, ROI, efficiency, agent comparison, token usage, cost analysis, metrics report, dashboard data, CLI analytics, terminal report, compliance, usage report, event summary, performance metrics, AI usage stats. DO NOT load for: setting up monitoring (use olakai-integrate), troubleshooting (use olakai-troubleshoot), or creating new agents (use olakai-new-project).
Ships in olakai-ai-olakai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill enables terminal-based analytics report generation using the Olakai CLI, eliminating the need to access the web UI for analytics insights.
For full documentation, see: https://app.olakai.ai/llms.txt
Or connect via MCP. Everything this skill does from the CLI — usage summaries, KPI trends, ROI, and risk analysis — your assistant can also do directly once your account is connected through the Olakai MCP connector. Point any MCP-capable client (Claude Desktop, claude.ai, Claude Code, ChatGPT, Codex, Cursor) at your server URL, approve the one-time OAuth consent, and ask for the report in natural language. Setup: https://app.olakai.ai/docs/olakai/olakai-mcp-connect. The CLI stays the right tool for scripting and piping into
jq; MCP is the right tool when you want the assistant itself to pull and explain the numbers.
jq is required by every recipe below. macOS/Linux: brew install jq or
apt install jq. Git Bash on Windows does not ship it — without jq the
pipelines fail outright, which is at least loud.
Two silent-zero traps, both measured against the live API shape:
--include-analytics is not optional. task, timesaved_minutes and
riskassessment_dangerousity live under an analytics object that is
absent unless the flag is passed. Read them without it and every figure
is 0 or null — no error.olakai activity kpis requires --agent-id or --workflow-id and
exits 400 without one.Field names come from apps/main-app/src/app/api/activity/prompts/route.ts.
The ones this skill got wrong until OLA-1611 — and what they silently returned
against three real events (one blocked, one high-risk, 15 minutes saved):
| Wrong | Right | Silent result |
|---|---|---|
.model | .modelType | unique_models: 1 instead of 2 |
.status == "blocked" | .blocked (boolean) | blocked: 0 instead of 1 |
.status != "error" | .decorationStatus != "DECORATION_FAILED" | 100% success |
.riskScore (0-10) | .analytics.riskassessment_dangerousity (0-1) | high_risk: 0 instead of 1 |
.timeSavedMinutes | .analytics.timesaved_minutes | 0 instead of 15 |
.task | .analytics.task | no grouping |
.sensitivityLabel | .sensitivity (array of PII/PHI/CODE/SECRET) | null label |
.kpis[] | .coreKpis[] (.kpis is an object keyed by definition id) | [] for ROI |
Risk is 0-1, never out of 10. Bands: > 0.8 High, 0.2-0.8 Medium,
< 0.2 Low, with 0.6 the compliance cut — the same thresholds
olakai-governance uses. Never present a /10 score.
Before generating reports, ensure:
# 1. CLI is authenticated
olakai whoami
# 2. You have the agent ID (if reporting on specific agent)
olakai agents list --json | jq '.[] | {id, name}'
--json flagjq| Command | Data Retrieved |
|---|---|
olakai activity list --json | Events: modelType, tokens, isHighRisk, blocked, decorationStatus, sensitivity[] |
olakai activity list --include-analytics --json | + an analytics object — task, subtask, timesaved_minutes, riskassessment_dangerousity. Without the flag there is no analytics key at all |
olakai activity kpis --agent-id AGENT_ID --json | Raw metrics, metric slot KPIs, composites (ROI) + custom KPIs |
olakai activity kpis --agent-id AGENT_ID --period daily --json | Time-series breakdown |
olakai activity kpis --agent-id AGENT_ID --include-atoms --json | Per-event KPI values |
olakai agents list --json | Agent metadata |
olakai kpis list --json | KPI definitions |
olakai activity sessions --agent-id ID --json | Session decoration status + summary counts |
Shows total usage metrics across events, tokens, models, and agents.
# Get recent events with analytics
olakai activity list --limit 100 --include-analytics --json > /tmp/events.json
# Extract summary metrics
cat /tmp/events.json | jq '{
total_events: (.prompts | length),
total_tokens: ([.prompts[].tokens // 0] | add),
avg_tokens: ([.prompts[].tokens // 0] | add / length | floor),
unique_models: ([.prompts[].modelType] | unique | length),
models: ([.prompts[].modelType] | group_by(.) | map({model: .[0], count: length})),
unique_agents: ([.prompts[].app] | unique | length),
agents: ([.prompts[].app] | group_by(.) | map({agent: .[0], count: length})),
success_rate: (([.prompts[] | select(.decorationStatus != "DECORATION_FAILED")] | length) / (.prompts | length) * 100 | floor)
}'
# Usage Summary Report
Generated: [DATE]
Period: Last [N] events
## Overview
| Metric | Value |
|--------|-------|
| Total Events | [COUNT] |
| Total Tokens | [TOKENS] |
| Avg Tokens/Event | [AVG] |
| Success Rate | [RATE]% |
## Events by Model
[ASCII BAR CHART]
## Events by Agent
[ASCII BAR CHART]
# Usage Summary Report
Generated: 2025-01-21
Period: Last 100 events
## Overview
| Metric | Value |
|--------|-------|
| Total Events | 100 |
| Total Tokens | 45,230 |
| Avg Tokens/Event | 452 |
| Success Rate | 98% |
## Events by Model
gpt-4o ████████████████████████████████████ 45
gpt-4o-mini ██████████████████████ 28
claude-3-5 ████████████████ 20
gpt-3.5-turbo █████ 7
## Events by Agent
code-assistant ████████████████████████████████ 40
data-analyzer ████████████████████████ 30
chat-support ████████████████████ 25
test-agent ████ 5
Shows KPI values over time with period-over-period comparisons.
# Get KPIs with daily breakdown
olakai activity kpis --agent-id AGENT_ID --period daily --json > /tmp/kpis_daily.json
# Get KPIs with weekly breakdown
olakai activity kpis --agent-id AGENT_ID --period weekly --json > /tmp/kpis_weekly.json
# Extract trend data
cat /tmp/kpis_daily.json | jq '{
period: "daily",
kpis: [.kpis[] | {
name: .name,
current: .value,
trend: .trend,
breakdown: .breakdown
}]
}'
# Get custom KPIs for specific agent
olakai activity kpis --agent-id AGENT_ID --period daily --json | jq '.kpis'
# List KPI definitions
olakai kpis list --agent-id AGENT_ID --json | jq '.[] | {name, unit, aggregation}'
# KPI Trends Report
Generated: [DATE]
Agent: [AGENT_NAME] (or "All Agents")
Period: [PERIOD]
## Raw Metrics
| Metric | Current | Previous | Change |
|--------|---------|----------|--------|
| Interaction Volume | [VAL] | [PREV] | [+/-]% |
| Token Consumption | [VAL] | [PREV] | [+/-]% |
## Metric Slot KPIs
| KPI | Current | Previous | Change |
|-----|---------|----------|--------|
| Execution Cost (USD) | $[VAL] | $[PREV] | [+/-]% |
| Time Saved (min) | [VAL] | [PREV] | [+/-]% |
| Value Created (USD) | $[VAL] | $[PREV] | [+/-]% |
| Governance Compliance (%) | [VAL]% | [PREV]% | [+/-]% |
## Composites
| KPI | Current | Previous | Change |
|-----|---------|----------|--------|
| ROI | [VAL]x | [PREV]x | [+/-]% |
## Custom KPIs
| KPI | Value | Unit | Aggregation |
|-----|-------|------|-------------|
| [NAME] | [VAL] | [UNIT] | [AGG] |
## Daily Trend (Last 7 Days)
[ASCII LINE CHART]
# KPI Trends Report
Generated: 2025-01-21
Agent: code-assistant
Period: Last 7 days
## Raw Metrics & Slot KPIs
| KPI | Current | Previous | Change |
|-----|---------|----------|--------|
| Interaction Volume | 847 | 792 | +7% |
| Execution Cost | \$127.50 | \$118.80 | +7% |
| Time Saved | 1,694 min | 1,584 min | +7% |
| Value Created | \$4,235 | \$3,960 | +7% |
| Governance Compliance | 99.2% | 98.5% | +0.7% |
| ROI | 33.2x | 33.3x | -0.3% |
## Custom KPIs
| KPI | Value | Unit | Aggregation |
|-----|-------|------|-------------|
| Code Reviews | 156 | count | SUM |
| Bugs Found | 23 | count | SUM |
| Avg Response Quality | 4.7 | score | AVERAGE |
## Daily Interactions (Last 7 Days)
150 ┤ ╭──
125 ┤ ╭────────────╯
100 ┤ ╭─────────╯
75 ┤────╯
50 ┤
└──────────────────────────────
Mon Tue Wed Thu Fri Sat Sun
Shows risk distribution, blocked events, and sensitivity patterns.
# Get events with risk data
olakai activity list --limit 200 --include-analytics --json > /tmp/events.json
# Extract risk metrics
cat /tmp/events.json | jq '{
total_events: (.prompts | length),
high_risk: ([.prompts[] | select((.analytics.riskassessment_dangerousity // 0) > 0.8)] | length),
medium_risk: ([.prompts[] | select((.analytics.riskassessment_dangerousity // 0) >= 0.2 and (.analytics.riskassessment_dangerousity // 0) <= 0.8)] | length),
low_risk: ([.prompts[] | select((.analytics.riskassessment_dangerousity // 0) < 0.2)] | length),
blocked: ([.prompts[] | select(.blocked)] | length),
blocked_percentage: (([.prompts[] | select(.blocked)] | length) / (.prompts | length) * 100),
sensitivity_labels: ([.prompts[].sensitivity[]] | group_by(.) | map({label: .[0], count: length})),
avg_risk_score: ([.prompts[].analytics.riskassessment_dangerousity // 0] | add / length)
}'
# Risk Analysis Report
Generated: [DATE]
Period: Last [N] events
## Risk Overview
| Metric | Value |
|--------|-------|
| Total Events Analyzed | [COUNT] |
| High Risk Events | [COUNT] ([%]%) |
| Blocked Events | [COUNT] ([%]%) |
| Average Risk Score | [SCORE] (0-1) |
## Risk Distribution
[ASCII BAR CHART]
## Events by Sensitivity Label
[ASCII BAR CHART]
## High-Risk Event Details (Recent)
| Time | Agent | Risk Score | Reason |
|------|-------|------------|--------|
| [TIME] | [AGENT] | [SCORE] | [REASON] |
# Risk Analysis Report
Generated: 2025-01-21
Period: Last 200 events
## Risk Overview
| Metric | Value |
|--------|-------|
| Total Events Analyzed | 200 |
| High Risk Events | 8 (4%) |
| Blocked Events | 3 (1.5%) |
| Average Risk Score | 0.23 |
## Risk Distribution
Low (<0.2) ████████████████████████████████████████ 172 (86%)
Medium (0.2-0.8) ████████ 20 (10%)
High (>0.8) ████ 8 (4%)
## Events by Sensitivity Label
Public ████████████████████████████████████ 145
Internal ██████████████████ 42
Confidential ████ 10
Restricted █ 3
## High-Risk Events (Recent 5)
| Time | Agent | Score | Model |
|------|-------|-------|-------|
| 10:23 | data-export | 8.5 | gpt-4o |
| 09:15 | chat-support | 7.2 | gpt-4o |
| 08:42 | code-assist | 7.0 | claude-3-5 |
Shows time saved, cost metrics, and productivity gains.
# Get KPIs (includes ROI data)
olakai activity kpis --agent-id AGENT_ID --json > /tmp/kpis.json
# Get events with time saved data
olakai activity list --limit 100 --include-analytics --json > /tmp/events.json
# Extract efficiency metrics
cat /tmp/events.json | jq '{
total_events: (.prompts | length),
total_time_saved_minutes: ([.prompts[].analytics.timesaved_minutes // 0] | add),
avg_time_saved: ([.prompts[].analytics.timesaved_minutes // 0] | add / length),
total_tokens: ([.prompts[].tokens // 0] | add),
by_task: ([.prompts[] | select(.analytics.task != null)] | group_by(.analytics.task) | map({
task: .[0].analytics.task,
count: length,
time_saved: ([.[].analytics.timesaved_minutes // 0] | add)
}))
}'
# Get ROI from KPIs
cat /tmp/kpis.json | jq '.coreKpis[] | select(.name | test("ROI|Compliance"))'
# ROI/Efficiency Report
Generated: [DATE]
Period: Last [N] events
## Efficiency Summary
| Metric | Value |
|--------|-------|
| Total Events | [COUNT] |
| Total Time Saved | [HOURS] hours |
| Avg Time Saved/Event | [MIN] minutes |
| Estimated Cost Savings | $[AMOUNT] |
## Governance Compliance
| Metric | Value |
|--------|-------|
| Compliance Rate | [RATE]% |
| Policy Violations | [COUNT] |
| Auto-Blocked | [COUNT] |
## Time Saved by Task Type
[ASCII BAR CHART]
## ROI Breakdown
[ASCII PIE CHART or TABLE]
# ROI/Efficiency Report
Generated: 2025-01-21
Period: Last 100 events
## Efficiency Summary
| Metric | Value |
|--------|-------|
| Total Events | 100 |
| Total Time Saved | 12.5 hours |
| Avg Time Saved/Event | 7.5 minutes |
| Estimated Cost Savings | \$1,875 |
## Governance Compliance
| Metric | Value |
|--------|-------|
| Compliance Rate | 99.2% |
| Policy Violations | 2 |
| Auto-Blocked | 1 |
## Time Saved by Task Type
Code Review ████████████████████████████████ 4.2 hrs
Bug Analysis ██████████████████████████ 3.5 hrs
Documentation ████████████████████ 2.7 hrs
Refactoring ████████████████ 2.1 hrs
## Productivity Multiplier
Based on avg 7.5 min saved per interaction:
- Daily (50 events): 6.25 hours saved
- Weekly (250 events): 31.25 hours saved
- Monthly (1000 events): 125 hours saved
Side-by-side comparison of metrics across multiple agents.
# Get all agents
olakai agents list --json > /tmp/agents.json
# Get events for comparison
olakai activity list --limit 500 --include-analytics --json > /tmp/events.json
# Extract per-agent metrics
cat /tmp/events.json | jq '{
agents: ([.prompts[].app] | unique | map(. as $agent | {
name: $agent,
events: ([($parent.prompts // [])[] | select(.app == $agent)] | length),
tokens: ([($parent.prompts // [])[] | select(.app == $agent) | .tokens // 0] | add),
avg_risk: ([($parent.prompts // [])[] | select(.app == $agent) | .analytics.riskassessment_dangerousity // 0] | add / length)
}))
}'
# Alternative: Get KPIs per agent
for agent_id in $(olakai agents list --json | jq -r '.[].id'); do
echo "Agent: $agent_id"
olakai activity kpis --agent-id $agent_id --json | jq '.coreKpis[] | {name, value}'
done
# Agent Comparison Report
Generated: [DATE]
Agents Compared: [COUNT]
## Activity Volume
| Agent | Events | Tokens | Avg Tokens |
|-------|--------|--------|------------|
| [NAME] | [COUNT] | [TOKENS] | [AVG] |
## KPI Comparison
| KPI | [AGENT1] | [AGENT2] | [AGENT3] |
|-----|----------|----------|----------|
| Executions | [VAL] | [VAL] | [VAL] |
| Compliance | [VAL]% | [VAL]% | [VAL]% |
| ROI | $[VAL] | $[VAL] | $[VAL] |
## Risk Profile
[ASCII GROUPED BAR CHART]
## Activity Trend by Agent
[ASCII MULTI-LINE CHART]
# Agent Comparison Report
Generated: 2025-01-21
Agents Compared: 4
## Activity Volume
| Agent | Events | Tokens | Avg Tokens |
|-------|--------|--------|------------|
| code-assistant | 245 | 98,450 | 402 |
| data-analyzer | 189 | 156,230 | 827 |
| chat-support | 312 | 78,540 | 252 |
| test-agent | 54 | 12,340 | 229 |
## KPI Comparison
| KPI | code-assist | data-analyze | chat-support |
|-----|-------------|--------------|--------------|
| Compliance | 99.5% | 98.2% | 99.8% |
| Avg Risk | 1.8 | 3.2 | 1.2 |
| Time Saved | 18.5 hrs | 12.3 hrs | 8.7 hrs |
## Risk Profile by Agent
Low Medium High
code-assist ████████████████████ █ │ 92% 6% 2%
data-analyze ██████████████████ ████ ██ 85% 10% 5%
chat-support █████████████████████ │ │ 97% 2% 1%
test-agent ███████████████████ ██ │ 90% 8% 2%
To create horizontal bar charts, use this pattern:
# Generate bar chart from jq output
cat /tmp/events.json | jq -r '
[.prompts[].modelType] | group_by(.) | map({model: .[0], count: length}) |
sort_by(-.count) |
(max_by(.count).count) as $max |
.[] |
"\(.model | .[0:15] | . + " " * (15 - length)) " +
("█" * ((.count / $max * 40) | floor)) +
" \(.count)"
'
Example output:
gpt-4o ████████████████████████████████████████ 45
gpt-4o-mini █████████████████████████ 28
claude-3-5 ██████████████████ 20
# Show percentage with visual bar
echo "Compliance: ████████████████████░░░░░ 85%"
Pattern:
[LABEL]: [FILLED █ * percentage/4][EMPTY ░ * (25-filled)] [VALUE]%
↑ +7% (increase)
↓ -3% (decrease)
→ 0% (stable)
# Usage Summary
olakai activity list --limit 100 --include-analytics --json | jq '{
events: (.prompts | length),
tokens: ([.prompts[].tokens // 0] | add),
models: ([.prompts[].modelType] | unique)
}'
# KPI Snapshot
olakai activity kpis --agent-id AGENT_ID --json | jq '.coreKpis[] | {name, value, unit}'
# Risk Summary
olakai activity list --limit 100 --include-analytics --json | jq '{
high_risk: ([.prompts[] | select((.analytics.riskassessment_dangerousity // 0) > 0.8)] | length),
blocked: ([.prompts[] | select(.blocked)] | length)
}'
# Agent List
olakai agents list --json | jq '.[] | {id, name}'
# Per-Agent KPIs
olakai activity kpis --agent-id AGENT_ID --json
# Time-Series Data
olakai activity kpis --agent-id AGENT_ID --period daily --json
olakai activity kpis --agent-id AGENT_ID --period weekly --json
Follow this workflow for any report type:
# 1. Determine scope
AGENT_ID="your-agent-id" # or leave empty for all
LIMIT=100
# 2. Collect data
olakai activity list --limit $LIMIT --include-analytics --json > /tmp/activity.json
olakai activity kpis --agent-id $AGENT_ID --json > /tmp/kpis.json
olakai agents list --json > /tmp/agents.json
# 3. Process and format (example for usage summary)
echo "# Usage Summary Report"
echo "Generated: $(date +%Y-%m-%d)"
echo ""
echo "## Overview"
cat /tmp/activity.json | jq -r '"| Metric | Value |
|--------|-------|
| Total Events | \(.prompts | length) |
| Total Tokens | \([.prompts[].tokens // 0] | add) |
| Unique Models | \([.prompts[].modelType] | unique | length) |"'
# Check if events exist
olakai activity list --limit 1 --json | jq '.prompts | length'
# If 0, inform user:
# "No events found. Ensure your agent is sending events to Olakai."
# Verify agent exists
olakai agents list --json | jq '.[] | select(.id == "AGENT_ID")'
# If empty, list available agents:
olakai agents list --json | jq '.[] | {id, name}'
# Re-authenticate if needed
olakai logout && olakai login
olakai whoami # Verify
--json flag for programmatic processingjq for clean data extractionWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/olakai-ai-olakai-skills:olakai-reportsfrom olakai-ai-olakai-skills
olakai-ai-olakai-skills@cascade-ai-ml-agents-misc-1 is listed by joshuarweaver/cascade-ai-ml-agents-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-1 --plugin olakai-ai-olakai-skills2 plugins in one repository ship this exact skill · first indexed Oct 20, 2026
13 skills in this plugin
/olakai-finopsReads and interprets Olakai AI cost data over MCP — spend posture, unit economics, showback, anomalies, budget variance, forecasts, model-mix optimization and AI ROI — without confusing the three numbers Olakai calls "cost".
AUTO-INVOKE when the user asks what they spend on AI, cost per developer or team, who is burning the budget, whether they will land on plan, why spend spiked, where to cut, or their AI ROI.
TRIGGER KEYWORDS: olakai, finops, AI spend, AI cost, burn rate, run rate, forecast, budget variance, chargeback, showback, allocation, unattributed spend, unit economics, spend spike, model swap, seat licensing, ROI, execution cost.
CRITICAL: there are THREE cost authorities — virtual, billed and allocated — never summed. Budgets are overlapping lenses, not a partition, and they only alert: nothing caps spend. flaggedDays flags seasonality as readily as incidents.
DO NOT load for: risk or compliance (olakai-governance), SDK setup (olakai-integrate), or CLI KPI reports (olakai-reports).
/olakai-get-startedInstall the CLI, authenticate, and send your first monitored event.
AUTO-INVOKE when: CLI is not installed, user is not authenticated, user asks about getting started with Olakai, user wants to try Olakai, user mentions they don't have an account yet, or when other skills fail due to missing prerequisites.
TRIGGER KEYWORDS: get started, setup, install olakai, olakai account, sign up, signup, new to olakai, try olakai, olakai onboarding, first agent, getting started, no account, create account, register.
DO NOT load for: users who are already authenticated and have agents set up (use olakai-new-project, olakai-integrate, or olakai-troubleshoot instead).