session-profiler

Solid

Profile and debug Hermes sessions from their JSONL transcripts. Find a session and its subagents, build a queryable event table, summarize the work as a hierarchical table of contents, break down wall time, inference, tools, tokens, and estimated cost per agent, identify errors and improvement opportunities, and export a shareable Perfetto trace. Use when a user wants to inspect what a Hermes session did, debug agent or subagent activity, understand session cost or latency, create a session timeline, generate a trace, or learn how to improve the next agent run.

Data & Documents 56 stars 2 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Session Profiler Turn one Hermes main transcript plus its subagent transcripts into analysis artifacts. Route every operation through the bundled wrapper so it uses a consistent environment and remembers the latest parsed work directory. ```bash SP="$SKILL/scripts/sp" ``` Resolve `SKILL` to this skill's directory. If it is unavailable, use the absolute path to `scripts/sp` beside this file. ## Workflow 1. Find and inspect the session. ```bash $SP projects $SP list [--provider hermes] [--n 20] $SP list --project-dir "${HERMES_HOME:-$HOME/.hermes}/sessions" $SP find <session-id-prefix> $SP info <session-id-or-path> ``` Hermes stores rollouts under `${HERMES_HOME:-~/.hermes}/sessions/YYYY/MM/DD/rollout-*.jsonl` and archived rollouts under `archived_sessions/`. Hermes subagent rollouts identify their parent thread recursively in `session_meta`. 2. Parse the session before analyzing it. Re-run this for a session that is still active. ```bash $SP parse <session-id-or-main-jsonl-path> ``` The command prints and remembers its work directory. It writes `events.parquet`, `events.csv`, and `agents.json`. Override the remembered directory with global `--data-dir <dir>` or `SESSION_DATA_DIR`. 3. Start with a readable profile, then narrow the investigation. ```bash $SP brief $SP agent-summary $SP costs $SP slowest-tools --n 20 [--agent <id-or-name>] $SP tool-breakdown [--agent <id-or-name>] $SP inference-vs-tool $SP errors $SP turns $SP timeline 2026-07-08T19:14:00Z --window ...

Details

Author
tamdogood
Repository
tamdogood/builder-essential-skills
Created
2 weeks ago
Last Updated
yesterday
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

session-debug

Debug a specific session by inspecting its full event chain (PreToolUse, PostToolUse, Stop, SubagentStop, Compaction, APIError, TurnDuration, Notification events), agent hierarchy (recursive parent/child tree with subagent_type and depth), token usage with compaction baselines, workflow intelligence data (orchestration DAG, error propagation by depth), and session metadata (thinking_blocks, turn_count, total_turn_duration_ms).

854 Updated today
hoangsonww
Data & Documents Solid

profile

Session clock-time analyzer. Reads the foundry plugin's timings.jsonl and invocations.jsonl logs (written by task-log.js) and produces a per-session and per-skill wall-time breakdown — local-tool work vs subagent spawns vs Skill invocations vs AskUserQuestion idle vs main-loop reasoning residual. Useful for answering "why did /oss:resolve run 30 minutes?" or "what eats clock time in /develop:fix?". Pure log read — no instrumentation, no skill edits, no LLM calls. TRIGGER when: user asks where wall-clock time goes during a skill/session, why a skill is slow, what dominates total runtime, or wants a per-skill rollup over a recent window; phrases: "where does time go", "why so slow", "profile last session", "clock breakdown", "session timing". SKIP: token/cost questions (model field is null in current logs — out of scope); per-line Python perf (use foundry:perf-optimizer); known failure or hang (use /foundry:investigate).

23 Updated yesterday
Borda
Data & Documents Featured

session-report

Generate an explorable HTML report of Claude Code session usage (tokens, cache, subagents, skills, expensive prompts) from ~/.claude/projects transcripts.

32,767 Updated today
anthropics