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
| Category | Tools |
|---|---|
file | Read, Write, Edit, MultiEdit, Glob, Grep |
shell | Bash, KillShell |
agent | Task (with context = agent name) |
skill | Skill (with context = skill name) |
web | WebFetch, WebSearch |
planning | TodoWrite |
interaction | ask 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:
- •Peak Hours: Identify most productive time slots
- •Tool Preferences: Which tools are used most?
- •Error Patterns: Recurring failure points
- •Agent Utilization: Most helpful agents
- •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