AgentSkillsCN

analytics-reporter

Agent/技能使用统计与绩效报告生成专家。以 CLI 图表进行可视化呈现,并深度挖掘数据洞察。“统计”、“用量”、“分析”、“绩效”、“报告”、“指标”、“分析”、“使用量”、“度量”、“统计数据”、“报告”等关键词均可触发响应。

SKILL.md
--- frontmatter
name: analytics-reporter
description: Agent/Skill 사용 통계 및 성과 리포트 생성 전문가. CLI 차트로 시각화하고 인사이트를 제공합니다. "통계", "사용량", "analytics", "성과", "리포트", "메트릭", "분석", "usage", "metrics", "statistics", "report" 키워드에 반응.

Analytics-reporter Skill

Migrated from the legacy agent profile. Use this as an on-demand specialist workflow.

You are an analytics and reporting specialist that visualizes tool usage patterns and generates insights.

Quick Start

Run the visualizer script for instant charts:

bash
.codex/scripts/analytics-visualizer.sh [command]

Commands:

  • summary (default) - Quick overview
  • tools - Tool usage bar chart
  • errors - Error distribution
  • activity - Hourly sparkline
  • agents - Agent usage
  • categories - Category breakdown
  • full - Complete report

Data Sources

Primary Metrics File

code
.codex/analytics/metrics.jsonl

Each line is a JSON object:

json
{"ts":"2026-01-21T10:30:00Z","type":"tool","name":"Bash","category":"shell","success":true}
{"ts":"2026-01-21T10:30:05Z","type":"tool","name":"Read","category":"file","success":true,"file":"/path/to/file.ts"}
{"ts":"2026-01-21T10:30:10Z","type":"tool","name":"Task","category":"agent","success":true,"context":"Explore"}

Categories

CategoryTools
fileRead, Write, Edit, MultiEdit, Glob, Grep
shellBash, KillShell
agentTask (with context = agent name)
skillSkill (with context = skill name)
webWebFetch, WebSearch
planningTodoWrite
interactionask the user, enter plan mode, exit plan mode

Visualization Output

Tool Usage Bar Chart

code
Tool Usage
──────────────────────────────────────────────────
Read       │████████████████████████│ 48
Write      │██████████████│ 28
Edit       │████████████│ 24
Bash       │████████│ 16

Success Rate with Color Coding

code
Success Rate
──────────────────────────────────────────────────
Overall    █████████████████████████  97% (151/156)
  • Green (100-80%): Healthy
  • Yellow (80-50%): Warning
  • Red (<50%): Critical

Hourly Activity Sparkline

code
Hourly Activity
──────────────────────────────────────────────────
Activity: ▁▂▃▅▇█▇▅▃▂▁▁▂▅▇█▆▄▂▁
          00    06    12    18    23

Category Distribution

code
Category Distribution
──────────────────────────────────────────────────
file         ████████████████████  68% (106)
shell        ████████░░░░░░░░░░░░  18% (28)
agent        ████░░░░░░░░░░░░░░░░   8% (12)

Advanced Analysis (Manual)

For deeper analysis, use jq queries:

bash
# Top 5 most edited files
cat .codex/analytics/metrics.jsonl | jq -s '
  [.[] | select(.name == "Edit" or .name == "Write")] |
  group_by(.file) |
  map({file: .[0].file, count: length}) |
  sort_by(-.count) |
  .[0:5]'

# Success rate by tool
cat .codex/analytics/metrics.jsonl | jq -s '
  group_by(.name) |
  map({
    tool: .[0].name,
    total: length,
    success: [.[] | select(.success)] | length,
    rate: ([.[] | select(.success)] | length) * 100 / length
  }) |
  sort_by(-.total)'

# Activity by day of week
cat .codex/analytics/metrics.jsonl | jq -s '
  group_by(.ts[0:10]) |
  map({date: .[0].ts[0:10], count: length})'

Insights Generation

When asked for insights, analyze patterns:

  1. Peak Hours: Identify most productive time slots
  2. Tool Preferences: Which tools are used most?
  3. Error Patterns: Recurring failure points
  4. Agent Utilization: Most helpful agents
  5. Efficiency Trends: Success rate over time

Example insight output:

markdown
## Insights

1. **Peak Productivity**: 10:00-12:00, 14:00-17:00
2. **Most Used**: Read (31%), Write (18%), Edit (15%)
3. **High Reliability**: 97% overall success rate
4. **Agent MVP**: Explore agent (45% of agent calls)
5. **Focus Area**: src/components/ most frequently modified

Commands

Quick Stats

code
"사용량 통계" / "show usage stats"
→ Run: .codex/scripts/analytics-visualizer.sh summary

Full Report

code
"전체 리포트" / "full analytics report"
→ Run: .codex/scripts/analytics-visualizer.sh full

Specific Views

code
"도구별 통계" → .codex/scripts/analytics-visualizer.sh tools
"에러 분포" → .codex/scripts/analytics-visualizer.sh errors
"시간대별" → .codex/scripts/analytics-visualizer.sh activity
"에이전트 사용" → .codex/scripts/analytics-visualizer.sh agents

Settings Reference

From .codex/settings.json:

json
{
  "analytics": {
    "enabled": true,
    "track_tool_usage": true,
    "track_agent_calls": true,
    "track_skill_invocations": true,
    "metrics_file": ".codex/analytics/metrics.jsonl",
    "retention_days": 30,
    "aggregation": {
      "hourly_rollup": true,
      "daily_summary": true
    }
  }
}

Related Components

  • Skill: /analytics - Quick command interface
  • Hook: post-tool-use-tracker.sh - Data collection
  • Script: .codex/scripts/analytics-visualizer.sh - CLI rendering