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 196 stars 7 forks Updated 3 weeks ago MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
76
Recency 20%
90
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 months ago
Last Updated
3 weeks ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

profile-session

Answers "why was that session slow?" from the agent transcript's own timestamps. Attributes wall-clock time to categories (tests/build, subagent dispatch, adversarial review, model thinking, stalls, user-away), ranks the biggest gaps, and names the specific commands behind them. Reads Claude Code session JSONL and Codex rollout JSONL. Modes: [transcript], --last, --skill <name>, --since <iso>, --compare <a> <b>.

6 Updated 4 days ago
greglas75
Data & Documents Featured

profile

Session clock-time AND token/cost analyzer. Reads the foundry plugin's timings.jsonl and invocations.jsonl logs (written by task-log.js) for wall-time, plus Claude Code transcripts (~/.claude/projects/**, main-loop + subagent files) for token usage and USD cost, and merges both into one per-session and per-skill report — local-tool vs subagent-spawn vs Skill vs AskUserQuestion idle vs main-loop reasoning residual time, and main-loop vs subagent spend by model tier. Useful for answering "why did /oss:resolve run 30 minutes?", "what did this session cost?", or "which skill burns the most tokens?". Pure log/transcript read — no instrumentation, no skill edits, no LLM calls. TRIGGER when: user asks where wall-clock time OR tokens/cost go during a skill/session, why a skill is slow or expensive, what dominates total runtime or spend, or wants a per-skill rollup over a recent window; phrases: "where does time go", "why so slow", "what did this cost", "token spend", "why so expensive", "profile last session", "clock

27 Updated today
Borda
AI & Automation Featured

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).

989 Updated 2 days ago
hoangsonww