subagent-observability

Analyze per-sub-agent token usage and performance from Claude Code JSONL logs.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/JNZader/javi-ai --skill subagent-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagent-observability
Source: https://github.com/JNZader/javi-ai/tree/main/own/skills/subagent-observability
Command: npx skills add https://github.com/JNZader/javi-ai --skill subagent-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Parse Claude Code JSONL session logs to extract per-sub-agent metrics, including token usage, tool call frequency, thinking-to-action ratio, bottleneck identification, and cost breakdown.

Core Features & Use Cases

  • Token usage per sub-agent: aggregate input/output tokens across sub-agents to quantify resource consumption.
  • Tool call frequency & thinking-to-action analysis: identify which tools are invoked most and how often agents think before acting.
  • Bottleneck detection & cost breakdown: surface latency and token spikes and attribute costs per agent for optimization.

Quick Start

Run the observability workflow on a Claude Code session to generate a per-agent metrics report.

Frequently Asked Questions about subagent-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract per-agent token usage from Claude Code JSONL logs?

You can extract per-agent token usage from Claude Code JSONL logs by parsing session entries to aggregate input and output tokens. This process deduplicates usage records and groups consumption metrics by sub-agent to quantify resource allocation.

What is sub-agent observability and why is it needed for cost analysis?

Sub-agent observability is the process of monitoring individual sub-agent performance metrics, such as token consumption and tool call frequency. It is needed for cost analysis to attribute expenses accurately to specific agents and identify optimization opportunities.

How do I identify bottlenecks and analyze tool call frequency in Claude sub-agents?

To identify bottlenecks and analyze tool call frequency in Claude sub-agents, you evaluate session logs for latency spikes and tool invocation counts. This analysis surfaces performance issues and calculates the thinking-to-action ratio for debugging.

Can I configure custom pricing to generate a reproducible observability report for sub-agents?

Yes, you can configure custom pricing to generate a reproducible observability report for sub-agents. The analysis applies your specific pricing rules to aggregated token usage data, producing a consistent cost breakdown across agents.

Does this observability workflow require external dependencies to parse JSONL session logs?

No external dependencies are required to parse JSONL session logs for sub-agent observability. The workflow operates directly on the JSONL data to extract metrics, deduplicate entries, and aggregate resource usage without additional packages.