Agent skill

Analytics

by yonatangross in yonatangross/orchestkit

Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends.

MITAuto-check: notesAgent Workflows

Install Analytics

skills CLI
$ npx skills add yonatangross/orchestkit --skill analytics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yonatangross/orchestkit analytics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yonatangross/orchestkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/analytics .claude/skills/analytics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
analytics
GitHub stars
288
Token cost
~2.6k tokens
SKILL.md length
1,013 words
Files
16 (incl. references)
Skills in repo
107
Repo updated
First seen
Licence
MIT

At a glance

Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends.

  • Reviewing performance
  • SKILL.md covers Subcommands, Data-Quality Caveats — read…, Data Files and Rules, plus 5 more sections
  • Calls jq
  • Estimating costs

What it does

Analytics is an agent skill from yonatangross/orchestkit. Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends. Privacy-safe with hashed project IDs. Supports time-range filtering and comparative analysis. Use when reviewing performance, estimating costs, or understanding usage patterns.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 17 other files, including reference files (for example `references/cost-estimation.md`, `references/data-locations.md` and `references/jq-queries.md`). Compatibility notes: Claude Code 2.1.277+.

It sits in Agent Workflows. The repository describes itself as: The Complete AI Development Toolkit for Claude Code. 106 skills, 36 agents, 171 hooks. Install ork for stable (v9.x), or ork-alpha for the v10 line, which ships daily. The licence is MIT.

When your agent uses it

  • Reviewing performance
  • Estimating costs
  • Understanding usage patterns

Example prompts

  • “Use the analytics skill to query local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session…”
  • “/analytics”

Requirements

  • Compatibility (from SKILL.md): Claude Code 2.1.277+.
  • Pre-approved tools (allowed-tools): Bash, Read, Grep, Glob, AskUserQuestion

What it can do on your machine

Read from SKILL.md and the folder at commit 1f8d8f3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Grep
    • Glob
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Claude Code 2.1.277+.

    From compatibility in the SKILL.md frontmatter.

Context cost

Analytics loads about 2.6k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 1,013 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Grep, Glob, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yonatangross/orchestkit at commit 1f8d8f3, republished under its MIT licence (© yonatangross). 1,013 words, ~2,649 tokens.

Download SKILL.mdSave it as .claude/skills/analytics/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
analytics
description
Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends. Privacy-safe with hashed project IDs. Supports time-range filtering and comparative analysis. Use when reviewing performance, estimating costs, or understanding usage patterns.
allowed-tools
Bash, Read, Grep, Glob, AskUserQuestion
compatibility
Claude Code 2.1.277+.
license
MIT
argument-hint
[agents|models|skills|hooks|teams|session|cost|trends|summary]
context
inherit
user-invocable
false
effort
low
model
haiku
metadata.category
document-asset-creation
metadata.version
2.1.0
metadata.author
OrchestKit
metadata.complexity
low

Cross-Project Analytics

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

Answer usage questions from the local files, never from guesswork: agent usage (which agents and how often — not which model, see the caveats) lives in ~/.claude/analytics/agent-usage.jsonl; hook performance and failures live in ~/.claude/analytics/hook-timing.jsonl; token and cost totals live in ~/.claude/stats-cache.json. Query them with jq one-liners (below) and present real counts, not pointers to dashboards.

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 and success rate (duration/model unavailable — #3034)agent-usage.jsonlreferences/jq-queries.md
modelsModel delegation from token totals in stats-cache.json. Per-spawn attribution is unavailable (#3034)stats-cache.jsonreferences/jq-queries.md
skillsTop skills by invocation countskill-usage.jsonlreferences/jq-queries.md
hooksSlowest hooks and failure rateshook-timing.jsonlreferences/jq-queries.md
teamsTeam spawn counts, idle time, task completionsteam-activity.jsonlreferences/jq-queries.md
sessionReplay a session timeline with tools, tokens, timingCC session JSONLreferences/session-replay.md
costToken cost estimation with cache savingsstats-cache.jsonreferences/cost-estimation.md
trendsDaily activity, model delegation, peak hoursstats-cache.jsonreferences/trends-analysis.md
summaryUnified view of all categoriesAll filesreferences/jq-queries.md
otelCC 2.1.117 + 2.1.122 + 2.1.126 OTEL enrichments: top slash commands (user vs model), per-effort cost, effort-vs-success correlation, skill activation by trigger type, most-mentioned @ targets~/.claude/otel/*.jsonl, or user-named Loki + Prometheus endpoints after schema discoveryreferences/otel-fields.md, references/otel-gateway-source.md
Quick Start Example
bash
# Top agents by spawn frequency. Excludes phantom rows (see caveat below).
jq -s 'map(select(.agent != "unknown")) | group_by(.agent) | map({agent: .[0].agent, count: length}) | sort_by(-.count)' ~/.claude/analytics/agent-usage.jsonl

# Cost per model: input + output token counts (multiply by per-model pricing;
# count cache-read tokens separately — prompt-cache hits are ~90% cheaper, so
# cache savings materially lower the real total)
jq '.modelUsage | to_entries | map({model: .key, input: .value.inputTokens, output: .value.outputTokens, cacheRead: .value.cacheReadInputTokens})' ~/.claude/stats-cache.json

# Slowest hooks by average duration, and failure rate as a percentage
jq -s 'group_by(.hook) | map({hook: .[0].hook, avg_ms: (map(.duration_ms) | add / length), fail_pct: (100 * (map(select(.ok != true)) | length) / length)}) | sort_by(-.avg_ms)' ~/.claude/analytics/hook-timing.jsonl
Quick Subcommand Guide

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

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

cost — Apply model-specific pricing from Read("references/cost-estimation.md") to CC's stats-cache.json. Show per-model breakdown, totals, and cache savings. On CC >= 2.1.174, cross-check against CC-native /usage per-component attribution (see 'CC-Native /usage Attribution' below).

trends — Follow the 4-step process in Read("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. If ~/.claude/otel/*.jsonl exists with non-empty content, append the three OTEL panels from otel-fields.md; otherwise omit them (do not render empty panels).

otel — Render the OTEL panels: 3 from CC 2.1.117 (top slash commands user-vs-model, per-effort cost, effort-vs-success correlation), 3 from CC 2.1.119 (oversized inputs, pre/post latency, see otel-fields.md), 1 from CC 2.1.122 (most-mentioned @ targets), and 1 from CC 2.1.126 (skill activation by trigger type). See Read("references/otel-fields.md") for queries, graceful-fallback rules, and panel semantics. Each panel falls back cleanly to "no OTEL data available (upgrade to CC ≥ X)" when its specific file is absent or empty — render only the panels with data.

Data-Quality Caveats — read before reporting any number

Two measured defects in agent-usage.jsonl change what this file can honestly answer. Verified against 11,249 real rows on 2026-07-20.

1. Four of eight fields are dead for 100% of rows (#3034). model is the literal string "unknown" on every row, agent_name is null on every row, output_len is 0 on every row, and duration_ms is absent entirely. Only ts, pid, agent, and success carry signal. Do NOT report model delegation, agent duration, or output size from this file — grouping by .model returns one unknown bucket, not a breakdown. If asked, say the data is unavailable and cite #3034 rather than presenting a single-bucket result as if it were an answer.

2. ~38% of rows are phantom events, not spawns (#3035). Rows with agent == "unknown" have no SubagentStart, no readable transcript, and their agent ids appear nowhere in Claude Code's own session data. They are an inflated denominator: any activation ratio computed over the full file is wrong. Filter select(.agent != "unknown") before computing any share, percentage, or ranking. A specialist-vs-generic split over the raw file understates specialists by roughly a third.

Both are writer-side defects, not query bugs — a better jq expression cannot recover the missing signal.

Show full SKILL.md (370 more words)Show less

Data Files

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

FileContents
agent-usage.jsonlAgent spawns — usable fields are ts, pid, agent, success only. model/agent_name/output_len/duration_ms are dead (#3034) and ~38% of rows are phantoms (#3035)
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 Integrityrules/data-privacy.mdCRITICALHash project IDs, never log PII, local-only
Cost & Tokensrules/cost-calculation.mdHIGHSeparate pricing per token type, cache savings
Performancerules/large-file-streaming.mdHIGHStreaming jq for >50MB, rotation-aware queries
Visualizationrules/visualization-recharts.mdHIGHRecharts charts, ResponsiveContainer, tooltips
Visualizationrules/visualization-dashboards.mdHIGHDashboard grids, stat cards, widget registry

Total: 5 rules across 4 categories

References

ReferenceContents
references/jq-queries.mdReady-to-run jq queries for all JSONL subcommands
references/session-replay.mdSession JSONL parsing, timeline extraction, presentation
references/cost-estimation.mdPricing table, cost formula, daily cost queries
references/trends-analysis.mdDaily activity, model delegation, peak hours queries
references/data-locations.mdAll data sources, file formats, CC session structure
references/otel-fields.mdCC 2.1.117 OTEL fields (command_name, command_source, effort), queries, and dashboard panels

Important Notes

  • All files are JSONL (newline-delimited JSON) format
  • For large files (>50MB), use streaming jq without -s — load Read("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

CC-Native /usage Attribution (2.1.174+)

CC 2.1.174 added per-component attribution to /usage: cache misses, long-context usage, subagent costs, and per-skill / per-agent / per-plugin / per-MCP cost breakdowns over the last 24h / 7d. It currently surfaces in the VSCode "Account & usage" dialog; in the terminal, run /usage.

When the user asks "which skill/agent actually costs the most" or questions ork's local estimates, direct them to /usage as the authoritative source — CC's own attribution supersedes ork's heuristic cost estimates for the windows it covers. Use ork's cost/otel views for history beyond CC's 7-day window and for cross-project slicing; use /usage for ground truth on the last 24h/7d.

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.

  • ork:explore - Codebase exploration and analysis
  • ork:remember - Store project knowledge
  • ork:doctor - Health check diagnostics

© yonatangross, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (references) in src/skills/analytics of yonatangross/orchestkit.

  • SKILL.md
  • references/cost-estimation.md
  • references/data-locations.md
  • references/jq-queries.md
  • references/otel-fields.md
  • references/otel-gateway-source.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

Open the folder on GitHubat commit 1f8d8f3

Compare with similar skills

Analytics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Analytics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Analytics this skillyonatangross/orchestkit288—~2.6kAutomated safety check: NotesMIT
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official37k11 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k34 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers296k2 repos~5.1kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official37k8 repos~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    37k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 34 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    296k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    37k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    794 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed

More from yonatangross/orchestkit

All 107 skills in this repo
  • API Design

    yonatangross/orchestkit

    API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs.

    288 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Architecture Decision Record

    yonatangross/orchestkit

    ADR templates in the Nygard format with context, decision, consequences, and alternatives.

    288 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Audit Full

    yonatangross/orchestkit

    Single-pass codebase analysis leveraging a 1M-token context window for comprehensive security scanning, architecture review, and dependency auditing.

    288 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check: notes
  • Code Review Playbook

    yonatangross/orchestkit

    Structured review processes, conventional comments, language-specific checklists, and feedback templates.

    288 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Create PR

    yonatangross/orchestkit

    Creates GitHub pull requests with pre-flight validation, conventional title formatting, and structured summary generation.

    288 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check: notes
  • Explore

    yonatangross/orchestkit

    Multi-angle codebase exploration spawning 3-5 parallel agents for code structure, data flow, architecture patterns, and health assessment.

    288 GitHub stars~3.9k tokensUpdated yesterday
    Auto-check: notes

Categories

Questions about Analytics

What does Analytics do?

Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends. Analytics is an agent skill from yonatangross/orchestkit. Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends.

When should I use Analytics?

Analytics fits situations like: reviewing performance; estimating costs; understanding usage patterns.

How do I install Analytics in Claude Code?

Run `npx skills add yonatangross/orchestkit --skill analytics -a claude-code`. Or copy the skill folder (src/skills/analytics in yonatangross/orchestkit) into .claude/skills/analytics in your project. Claude Code loads it when a task matches its description.

How do I install Analytics in Codex?

Run `npx skills add yonatangross/orchestkit --skill analytics -a codex`. Or copy the skill folder (src/skills/analytics in yonatangross/orchestkit) into .agents/skills/analytics in your project. Codex loads it when a task matches its description.

Can I use Analytics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yonatangross/orchestkit --skill analytics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/analytics, .gemini/skills/analytics, .github/skills/analytics and .opencode/skills/analytics in your project.

What does Analytics need to run?

Going by SKILL.md and its folder, Analytics needs the command-line tools its instructions call (jq). Its frontmatter pre-approves these tools: Bash, Read, Grep, Glob, AskUserQuestion. Compatibility (from SKILL.md): Claude Code 2.1.277+..

Does Analytics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Analytics safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Analytics use?

Analytics is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Analytics use?

About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.4k tokens, read only when the agent opens those files.

What are the alternatives to Analytics?

Skills that share tags, products or a category with Analytics: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 296k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Analytics?

yonatangross (a GitHub user) maintains it in yonatangross/orchestkit, which has 288 GitHub stars. The repository holds 107 skills in this directory. The repository was last updated on October 6, 2026.

Source: yonatangross/orchestkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.