skills/olakai-reports/SKILL.md
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).
npx skillsauth add olakai-ai/olakai-skills olakai-reportsInstall 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.
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
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 with tokens, model, risk, status |
| olakai activity list --include-analytics --json | + task, subtask, time saved, risk score |
| olakai activity kpis --json | Raw metrics, metric slot KPIs, composites (ROI) + custom KPIs |
| olakai activity kpis --period daily --json | Time-series breakdown |
| olakai activity kpis --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[].model] | unique | length),
models: ([.prompts[].model] | 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(.status != "error")] | 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 --period daily --json > /tmp/kpis_daily.json
# Get KPIs with weekly breakdown
olakai activity kpis --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(.riskScore >= 7)] | length),
medium_risk: ([.prompts[] | select(.riskScore >= 4 and .riskScore < 7)] | length),
low_risk: ([.prompts[] | select(.riskScore < 4)] | length),
blocked: ([.prompts[] | select(.status == "blocked")] | length),
blocked_percentage: (([.prompts[] | select(.status == "blocked")] | length) / (.prompts | length) * 100),
sensitivity_labels: ([.prompts[].sensitivityLabel] | group_by(.) | map({label: .[0], count: length})),
avg_risk_score: ([.prompts[].riskScore // 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]/10 |
## 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 | 2.3/10 |
## Risk Distribution
Low (0-3) ████████████████████████████████████████ 172 (86%)
Medium (4-6) ████████ 20 (10%)
High (7-10) ████ 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 --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[].timeSavedMinutes // 0] | add),
avg_time_saved: ([.prompts[].timeSavedMinutes // 0] | add / length),
total_tokens: ([.prompts[].tokens // 0] | add),
by_task: ([.prompts[] | select(.task != null)] | group_by(.task) | map({
task: .[0].task,
count: length,
time_saved: ([.[].timeSavedMinutes // 0] | add)
}))
}'
# Get ROI from KPIs
cat /tmp/kpis.json | jq '.kpis[] | select(.name | contains("ROI") or contains("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) | .riskScore // 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 '.kpis[] | {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[].model] | 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 --json | jq '{
events: (.prompts | length),
tokens: ([.prompts[].tokens // 0] | add),
models: ([.prompts[].model] | unique)
}'
# KPI Snapshot
olakai activity kpis --json | jq '.kpis[] | {name, value, unit}'
# Risk Summary
olakai activity list --limit 100 --json | jq '{
high_risk: ([.prompts[] | select(.riskScore >= 7)] | length),
blocked: ([.prompts[] | select(.status == "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 --period daily --json
olakai activity kpis --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[].model] | 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 extractiondevelopment
Show your Olakai developer Coding IQ status — monitoring health, personal spend, and budget. AUTO-INVOKE when user asks about: their Olakai monitoring health, personal AI spend, budget status, Coding IQ digest, whether their workspace is monitored, how much they've spent on AI this month, whether they're approaching their budget limit, or wants a quick overview of their Olakai coding status. TRIGGER KEYWORDS: olakai status, my spend, my budget, coding iq status, am I monitored, monitoring health, personal spend, budget limit, how much have I spent, olakai digest, coding status, my olakai, workspace monitored, check my olakai. DO NOT load for: setting up monitoring (use olakai-monitor-local-coding-agent), troubleshooting events or KPIs (use olakai-troubleshoot), generating analytics reports (use olakai-reports), or creating new agents (use olakai-new-project).
tools
Set up and self-heal Olakai monitoring for the coding tool you are using — Claude Code, OpenAI Codex CLI, Cursor, Google Gemini CLI, or Antigravity CLI. Installs hooks, creates the agent record, and explains how to enrich events with KPIs. This is the skill for "monitor my coding tool itself" (not for instrumenting your own agent's source code with the SDK — that is olakai-integrate). AUTO-INVOKE when user wants to: monitor Claude Code / Codex / Cursor / Gemini CLI / Antigravity CLI sessions, monitor THIS coding tool, add observability to a local coding agent, track my own coding-assistant usage, set up olakai monitoring in this workspace, see what is being monitored on this machine, check if monitoring is working, or enable / repair hooks-based monitoring for any local coding agent. TRIGGER KEYWORDS: olakai monitor, monitor my coding tool, monitor this tool, monitor claude code, monitor codex, monitor cursor, monitor gemini cli, monitor antigravity, codex cli, cursor hooks, gemini cli, gemini-cli hooks, antigravity cli, antigravity, agy, local coding agent, local agent monitoring, olakai hooks, olakai monitor init, olakai monitor list, olakai monitor doctor, olakai monitor repair, monitor workspace, track sessions, is my monitoring working, monitoring not working, no events from claude code, claude code monitoring, codex monitoring, cursor monitoring, agents mine, where am i monitoring. DO NOT load for: instrumenting your own agent's SDK code (use olakai-integrate), creating agents from scratch with custom code (use olakai-new-project), generic SDK / KPI / event troubleshooting unrelated to a coding tool (use olakai-troubleshoot).
tools
Diagnose and repair Olakai monitoring for a local coding tool you already set up — Claude Code, OpenAI Codex CLI, or Cursor. Drives `olakai monitor list`, `olakai monitor doctor [--fix]`, and `olakai monitor repair` to self-heal hooks-based monitoring (no events, missing KPIs, broken/deleted agent, drifted config). For first-time setup use olakai-monitor-local-coding-agent instead. AUTO-INVOKE when user says: my coding-tool monitoring isn't working, no events from Claude Code / Codex / Cursor, is monitoring on / working, check my olakai monitoring, what's monitored on this machine, monitor doctor, monitor repair, monitor list, fix my monitoring, my monitored agent disappeared / 404, hooks stopped firing, re-link my monitoring key. TRIGGER KEYWORDS: olakai monitor doctor, olakai monitor repair, olakai monitor list, monitor not working, no events claude code, no events codex, no events cursor, fix monitoring, repair monitoring, agent 404, agent missing, hooks stopped firing, drift, registry, agents mine, where am i monitoring, is my monitoring working, self-heal monitoring. DO NOT load for: first-time setup of a coding tool (use olakai-monitor-local-coding-agent), instrumenting your own agent's SDK code (use olakai-integrate), generic SDK / KPI / event troubleshooting unrelated to a coding tool (use olakai-troubleshoot).
tools
Diagnose and fix issues with events, KPIs, custom data, or SDK integration. AUTO-INVOKE when user mentions: events not appearing, KPIs showing wrong values, KPIs showing strings instead of numbers, custom data missing, null KPIs, authentication errors, CLI not working, events not associated with agent, monitoring broken, SDK errors, or any Olakai-related problem. TRIGGER KEYWORDS: olakai, troubleshoot, debug, not working, events missing, KPI wrong, KPI null, KPI string, customData missing, authentication failed, CLI error, no events, events not appearing, diagnose, fix olakai, broken, SDK error, monitoring issue, API key invalid, events not tracked. DO NOT load for: initial setup (use olakai-new-project or olakai-integrate), or generating reports (use olakai-reports).