Skill

analytics

Query cross-project usage analytics. Use when reviewing agent, skill, hook, or team performance across OrchestKit projects. Also replay sessions, estimate costs, and view model delegation trends.

From ork
Install
1
Run in your terminal
$
npx claudepluginhub yonatangross/orchestkit --plugin ork
Tool Access

This skill is limited to using the following tools:

BashReadGrepGlobAskUserQuestion
Supporting Assets
View in Repository
references/cost-estimation.md
references/data-locations.md
references/jq-queries.md
references/session-replay.md
references/trends-analysis.md
rules/_sections.md
rules/_template.md
rules/cost-calculation.md
rules/data-privacy.md
rules/large-file-streaming.md
rules/visualization-dashboards.md
rules/visualization-recharts.md
test-cases.json
Skill Content

Cross-Project Analytics

Query local analytics data from ~/.claude/analytics/. All data is local-only, privacy-safe (hashed project IDs, no PII).

Subcommands

Parse the user's argument to determine which report to show. If no argument provided, use AskUserQuestion to let them pick.

SubcommandDescriptionData SourceReference
agentsTop agents by frequency, duration, model breakdownagent-usage.jsonl${CLAUDE_SKILL_DIR}/references/jq-queries.md
modelsModel delegation breakdown (opus/sonnet/haiku)agent-usage.jsonl${CLAUDE_SKILL_DIR}/references/jq-queries.md
skillsTop skills by invocation countskill-usage.jsonl${CLAUDE_SKILL_DIR}/references/jq-queries.md
hooksSlowest hooks and failure rateshook-timing.jsonl${CLAUDE_SKILL_DIR}/references/jq-queries.md
teamsTeam spawn counts, idle time, task completionsteam-activity.jsonl${CLAUDE_SKILL_DIR}/references/jq-queries.md
sessionReplay a session timeline with tools, tokens, timingCC session JSONL${CLAUDE_SKILL_DIR}/references/session-replay.md
costToken cost estimation with cache savingsstats-cache.json${CLAUDE_SKILL_DIR}/references/cost-estimation.md
trendsDaily activity, model delegation, peak hoursstats-cache.json${CLAUDE_SKILL_DIR}/references/trends-analysis.md
summaryUnified view of all categoriesAll files${CLAUDE_SKILL_DIR}/references/jq-queries.md

Quick Start Example

# Top agents with model breakdown
jq -s 'group_by(.agent) | map({agent: .[0].agent, count: length}) | sort_by(-.count)' ~/.claude/analytics/agent-usage.jsonl

# All-time token costs
jq '.modelUsage | to_entries | map({model: .key, input: .value.inputTokens, output: .value.outputTokens})' ~/.claude/stats-cache.json

Quick Subcommand Guide

agents, models, skills, hooks, teams, summary — Run the jq query from Read("${CLAUDE_SKILL_DIR}/references/jq-queries.md") for the matching subcommand. Present results as a markdown table.

session — Follow the 4-step process in Read("${CLAUDE_SKILL_DIR}/references/session-replay.md"): locate session file, resolve reference (latest/partial/full ID), parse JSONL, present timeline.

cost — Apply model-specific pricing from Read("${CLAUDE_SKILL_DIR}/references/cost-estimation.md") to CC's stats-cache.json. Show per-model breakdown, totals, and cache savings.

trends — Follow the 4-step process in Read("${CLAUDE_SKILL_DIR}/references/trends-analysis.md"): daily activity, model delegation, peak hours, all-time stats.

summary — Run all subcommands and present a unified view: total sessions, top 5 agents, top 5 skills, team activity, unique projects.

Data Files

Load Read("${CLAUDE_SKILL_DIR}/references/data-locations.md") for complete data source documentation.

FileContents
agent-usage.jsonlAgent spawn events with model, duration, success
skill-usage.jsonlSkill invocations
hook-timing.jsonlHook execution timing and failure rates
session-summary.jsonlSession end summaries
task-usage.jsonlTask completions
team-activity.jsonlTeam spawns and idle events

Rules

Each category has individual rule files in rules/ loaded on-demand:

CategoryRuleImpactKey Pattern
Data Integrity${CLAUDE_SKILL_DIR}/rules/data-privacy.mdCRITICALHash project IDs, never log PII, local-only
Cost & Tokens${CLAUDE_SKILL_DIR}/rules/cost-calculation.mdHIGHSeparate pricing per token type, cache savings
Performance${CLAUDE_SKILL_DIR}/rules/large-file-streaming.mdHIGHStreaming jq for >50MB, rotation-aware queries
Visualization${CLAUDE_SKILL_DIR}/rules/visualization-recharts.mdHIGHRecharts charts, ResponsiveContainer, tooltips
Visualization${CLAUDE_SKILL_DIR}/rules/visualization-dashboards.mdHIGHDashboard grids, stat cards, widget registry

Total: 5 rules across 4 categories

References

ReferenceContents
${CLAUDE_SKILL_DIR}/references/jq-queries.mdReady-to-run jq queries for all JSONL subcommands
${CLAUDE_SKILL_DIR}/references/session-replay.mdSession JSONL parsing, timeline extraction, presentation
${CLAUDE_SKILL_DIR}/references/cost-estimation.mdPricing table, cost formula, daily cost queries
${CLAUDE_SKILL_DIR}/references/trends-analysis.mdDaily activity, model delegation, peak hours queries
${CLAUDE_SKILL_DIR}/references/data-locations.mdAll data sources, file formats, CC session structure

Important Notes

  • All files are JSONL (newline-delimited JSON) format
  • For large files (>50MB), use streaming jq without -s — load Read("${CLAUDE_SKILL_DIR}/rules/large-file-streaming.md")
  • Rotated files: <name>.<YYYY-MM>.jsonl — include for historical queries
  • team field only present during team/swarm sessions
  • pid is a 12-char SHA256 hash — irreversible, for grouping only

Output Format

Present results as clean markdown tables. Include counts, percentages, and averages. If a file doesn't exist, note that no data has been collected yet for that category.

Related Skills

  • ork:explore - Codebase exploration and analysis
  • ork:feedback - Capture user feedback
  • ork:remember - Store project knowledge
  • ork:doctor - Health check diagnostics
Stats
Parent Repo Stars128
Parent Repo Forks14
Last CommitMar 20, 2026