Get the FREE Ultimate OpenClaw Setup Guide →

team-shinchan:analytics

npx machina-cli add skill seokan-jeong/team-shinchan/analytics --openclaw
Files (1)
SKILL.md
2.7 KB

Analytics Skill

Analyze work tracker events for observability insights.

Usage

/team-shinchan:analytics                        # Current session summary
/team-shinchan:analytics --report full          # Full analytics report
/team-shinchan:analytics --agent bo             # Single agent detail
/team-shinchan:analytics --trace trace-xxx      # Trace timeline
/team-shinchan:analytics --period 7d            # Last 7 days only

Arguments

ArgDefaultDescription
--report full(session)Generate full analytics report
--agent {name}(all)Detail for a single agent
--trace {id}(none)Timeline for a specific trace ID
--period {N}d(all)Filter events to the last N days
--format tablejsonOutput as text table instead of JSON

Process

Step 1: Locate Tracker File

Use .shinchan-docs/work-tracker.jsonl as the data source.

If file does not exist:

No work tracker log found.
Events will be recorded automatically during Claude Code sessions.

Step 2: Run Analytics Script

Execute the analytics script via Bash:

node "${CLAUDE_PLUGIN_ROOT}/src/analytics.js" .shinchan-docs/work-tracker.jsonl [options]

Map user arguments to script flags:

  • --report full → no extra flags (full report is default)
  • --agent <name>--agent <name>
  • --trace <id>--trace <id>
  • --period <N>d--period <N>d
  • Default (no args) → --format table

Step 3: Display Results

  • For --format table or default: display the text table output directly
  • For JSON output: format and display key sections with headers

Step 4: Interpret Results

After displaying raw output, provide a brief interpretation:

  • Highlight busiest agents
  • Note any agents with low success rates
  • Summarize delegation patterns
  • Flag anomalies (e.g. agents with 0 completions)

Metrics Computed

MetricDescription
Agent call countHow many times each agent was invoked
Avg durationAverage time from agent_start to agent_done
Success rateRatio of agent_done to agent_start
Session statsEvents, file changes, delegations per session
Event distributionPercentage breakdown of event types
Delegation graphWhich agent delegated to which, with counts

Important

  • Analytics script: src/analytics.js (Node.js, built-in modules only)
  • Data source: .shinchan-docs/work-tracker.jsonl
  • Trace IDs: generated per user prompt via trace-init hook

Source

git clone https://github.com/seokan-jeong/team-shinchan/blob/main/skills/analytics/SKILL.mdView on GitHub

Overview

The Analytics Skill processes work-tracker JSONL data to extract observability metrics. It highlights agent activity, session stats, event distributions, and delegation patterns to help optimize workflows and detect anomalies.

How This Skill Works

The skill reads the .shinchan-docs/work-tracker.jsonl data source, runs the Node.js analytics.js script, and computes metrics such as agent call count, average duration, and success rate, plus session stats, event distributions, and a delegation graph. Output can be rendered as a JSON report or a human-friendly table, with optional period filtering and agent scope.

When to Use It

  • Auditing agent performance over a period to identify busy or underperforming agents
  • Investigating workload distribution and delegation chains across sessions
  • Detecting anomalies such as agents with 0 completions or unusually long durations
  • Generating a full analytics report for stakeholders or drills into trace timelines
  • Inspecting a single agent's details using --agent to isolate behavior

Quick Start

  1. Step 1: Ensure the work tracker data exists at .shinchan-docs/work-tracker.jsonl
  2. Step 2: Run the analytics script, for example: node "${CLAUDE_PLUGIN_ROOT}/src/analytics.js" .shinchan-docs/work-tracker.jsonl [options]
  3. Step 3: View results in table (default) or JSON (--format json) and interpret according to the guidance

Best Practices

  • Run a full report first to establish baseline metrics
  • Filter by --period to analyze trends over time (e.g., last 7d)
  • Review the event distribution to spot rare or high-frequency events
  • Cross-check the delegation graph with expected workflows
  • Use JSON output for automation and downstream analytics

Example Use Cases

  • Monthly digest showing top agents by call count and average duration
  • Delegation graph illustrating hand-offs between agents
  • Last 7 days: busiest agents and event type distribution
  • Identify agents with persistently low success rates
  • Flag anomalies such as sudden spikes in events or 0 completions

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers