agentsclimarketplace

Agent metrics

Skill damahua/claude-code-hook-hero/skills/agent-metrics

Query agent session metrics from hook-hero telemetry data. Use when the user asks about agent activity, efficiency, token spend, tool usage, session history, cost tracking, or productivity metrics. Examples: "how efficient was I this week", "show me my agent metrics", "which repo used the most tokens", "how much did I spend on Claude today".From its SKILL.md

Install
npx -y skills add damahua/claude-code-hook-hero --skill agent-metrics

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.2 KB, as published. Nobody here has run it

Agent Metrics — Hook-Hero Telemetry

Query and analyze agent session telemetry captured by the hook-hero plugin.

Data Location

Session summaries: ~/.claude/hook-hero/sessions/{YYYY-MM-DD}/{session_id}.json Raw events: ~/.claude/hook-hero/events/{YYYY-MM-DD}/{session_id}.jsonl

How to Query

Quick stats for a date range

Use Glob to find session files, Read each one, aggregate in a Bash one-liner:

# Today's sessions
ls ~/.claude/hook-hero/sessions/$(date +%Y-%m-%d)/*.json 2>/dev/null | wc -l

Filter by repo or channel

grep -rl '"repo": "acme/my-app"' ~/.claude/hook-hero/sessions/
grep -rl '"channel": "claude-cli"' ~/.claude/hook-hero/sessions/

Analyze raw events for a session

cat ~/.claude/hook-hero/events/{date}/{session_id}.jsonl

Session Summary Fields

Each JSON file contains:

  • timing: start_time, end_time, duration_seconds
  • context: project_path, project_name, directory, cwd, repo, git_remote_url, git_branch, model
  • tools: total_calls, by_type (map), failures
  • tokens: input, output, total, cache_read, cache_write, estimated_cost_usd
  • git: commits_made, branches_touched, files_changed, insertions, deletions, prs_created
  • prompts: count
  • subagents: total_spawned, by_type (map), total_duration_ms
  • compactions: count
  • worktrees: created, removed
  • tasks: completed

Insights to Provide

When presenting metrics, highlight:

  • Total sessions, time, and cost for the period
  • Which repos consume the most effort/tokens
  • Channel comparison (claude-code vs claude-cli)
  • Most-used tools and failure rates
  • Git productivity (commits, PRs, lines changed per session)
  • Subagent usage patterns
  • Context compaction frequency (signals complex sessions)

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.