Agent skill

Session Profiler

by tamdogood in tamdogood/builder-essential-skills

Profile and debug Hermes sessions from their JSONL transcripts.

MITAuto-check passedDevelopment

Install Session Profiler

skills CLI
$ npx skills add tamdogood/builder-essential-skills --skill session-profiler -a claude-code

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

GitHub CLI
$ gh skill install tamdogood/builder-essential-skills session-profiler --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/tamdogood/builder-essential-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/session-profiler .claude/skills/session-profiler && 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
session-profiler
GitHub stars
219
Token cost
~1.5k tokens
SKILL.md length
670 words
Files
23 (incl. scripts)
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Profile and debug Hermes sessions from their JSONL transcripts.

  • A user wants to inspect what a Hermes session did
  • SKILL.md covers Workflow, Interpretation Rules and Privacy And Failure Handling
  • Runs Python scripts from its folder
  • Subagent activity

What it does

Session Profiler is an agent skill from tamdogood/builder-essential-skills. 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…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 29 other files, including scripts (for example `README.md`, `agents/openai.yaml` and `scripts/session_profiler/__init__.py`).

It sits in Development, covering Performance optimization and Subagents. The repository describes itself as: A repository for skills that are essential to my daily work. The licence is MIT.

When your agent uses it

  • A user wants to inspect what a Hermes session did
  • Subagent activity
  • Understand session cost
  • Create a session timeline

Example prompts

  • “/session-profiler”

Requirements

  • Python 3

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 11 files in scripts/ (Python, from the files we listed), which the agent can run.

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

  • Network

    Links to these hosts (documentation or services it may open):

    • ui.perfetto.dev

    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.

Context cost

Session Profiler loads about 1.5k tokens when it runs. Until then it costs about 146 tokens; SKILL.md has 670 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~146
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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 passed

The automated check found no risky patterns in SKILL.md.

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); the scripts in this folder are not scanned.

SKILL.md

The full file from tamdogood/builder-essential-skills at commit 1be9984, republished under its MIT licence (© tamdogood). 670 words, ~1,513 tokens.

Download SKILL.mdSave it as .claude/skills/session-profiler/SKILL.md (or your agent's skills folder). This skill also uses 22 other files; get the full folder from GitHub.
name
session-profiler
description
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.

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.

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

  1. 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 120
$SP events [--agent main] [--tool Bash] [--grep rebase] [--since 2026-07-08] [--n 30] [--long]

Use brief first when explaining a session to a person. It writes brief.md with the session's headline metrics, standout slow paths or failures, prompt trail or TOC storyline, and an agent scoreboard. Use the table commands for specific questions after the brief identifies the interesting region.

For ad hoc pandas analysis, set SESSION_DATA_DIR, add scripts/ to PYTHONPATH, and use from session_profiler.dataset import load; df = load() inside the wrapper's venv.

  1. Summarize the session and preserve lessons for the next run.
bash
$SP toc --dry-run
$SP toc
$SP review

Use toc --dry-run to inspect the sanitized, junk-free digest. toc builds a local chronological table of contents and writes toc.json plus toc.md without calling an external agent CLI. Show toc.md to orient the user. review writes review.md with deterministic observations about failed calls, slow paths, active-time mix, delegation, and estimated cost. Turn those observations into concrete changes to prompts, tool batching, preflight checks, or subagent assignments; do not claim the profiler automatically changes agent behavior.

  1. Build and open the trace.
bash
$SP trace
$SP open

Load the emitted trace.json.gz in Perfetto. Read it top-down: Session overview gives the whole run, Table of contents shows the story when toc.json exists, each agent's work timeline shows inference and tools, prompt trail marks user turns, and usage tokens + cost shows cumulative counters. Click a slice to inspect sanitized input/output previews, duration, concurrency, failure state, token count, and estimated cost.

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

Interpretation Rules

Trust these derivations instead of recomputing them from raw rows:

  • For transcript-style JSONL, deduplicate usage per API message.id: content-block records repeat a growing usage snapshot, so keep only the final snapshot once. For Hermes, consume last_token_usage once per token_count event and treat cached_input_tokens as a subset of input tokens.
  • Sum tokens across agents. Subagent token usage lives in the subagent transcript, not the parent transcript.
  • Measure a tool from tool_use to its matching tool_result within the same transcript. Treat multiple tool uses sharing one assistant message as concurrent.
  • Measure inference from the first to last assistant record for one message ID. Do not treat human idle time as inference.
  • Measure each subagent's wall runtime from the first to last timestamp in its own transcript, not from the parent's spawn tool span.
  • Treat active-time totals as sums of spans, not wall time. Concurrent tools and agents can make summed active time exceed elapsed wall time.
  • Label all dollar values as estimates. Hermes uses model-specific public API rates when the model is known, including long-context multipliers recorded by the pricing docs. Subscriptions, credits, priority processing, tool fees, and negotiated rates can differ; an unknown model is marked unavailable instead of guessed.

Privacy And Failure Handling

  • Treat transcripts and traces as sensitive. Previews redact long opaque tokens and common auth/cookie headers, but can still contain source code, prompts, paths, personal data, or secrets. Review before sharing and share only where the session owner would.
  • Expect UTC timestamps throughout.
  • If parsing a growing transcript, rerun parse immediately before final analysis.
  • If dependency bootstrap fails, report the uv or pip error and let the user fix local network/package configuration. Do not add machine-specific proxy settings to this skill.
  • If toc cannot build a table of contents from the parsed data, keep the parsed data and analyses; use toc --dry-run as the session digest and explain which timestamps or events were missing.

© tamdogood, 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 22 other files (scripts) in skills/session-profiler of tamdogood/builder-essential-skills.

  • SKILL.md
  • README.md
  • agents/openai.yaml
  • scripts/requirements.txt
  • scripts/session_profiler/__init__.py
  • scripts/session_profiler/analyses.py
  • scripts/session_profiler/cli.py
  • scripts/session_profiler/dataset.py
  • scripts/session_profiler/discover.py
  • scripts/session_profiler/toc.py
  • scripts/session_profiler/trace.py
  • scripts/sp
  • scripts/tests/fixture/main.jsonl
  • scripts/tests/fixture/main/subagents/agent-abc.jsonl
  • … and 9 more

Open the folder on GitHubat commit 1be9984

Compare with similar skills

Session Profiler 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.

Session Profiler compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Session Profiler this skilltamdogood/builder-essential-skills219—~1.5kAutomated safety check: PassMIT
V2 Perf Iterationmirage-project/mirage2.5k—~4kAutomated safety check: PassApache-2.0
Perf Loopozontech/seq-db133—~1.6kAutomated safety check: PassApache-2.0
Tracelens Analysis Orchestratoramd/skills398—~760Automated safety check: PassMIT
GitHub Review Iterationprisma/orm48k—~2.2kAutomated safety check: PassApache-2.0
Cherry Studio PR ReviewCherryHQ/cherry-studio52k—~3.9kAutomated safety check: PassAGPL-3.0

Similar skills

  • V2 Perf Iteration

    mirage-project/mirage

    Runtime-V2 performance-iteration workflow. An agent skill from mirage-project/mirage.

    2.5k GitHub stars~4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Perf Loop

    ozontech/seq-db

    Autonomous performance-optimization loop for seq-db driven by seqbazooka.

    133 GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Orchestrates modular PyTorch profiler trace analysis with TraceLens: generates perf reports, prepares category data, runs system-level and compute-kernel subagents in parallel, validates outputs…

    398 GitHub stars~760 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Cherry Studio PR Review

    CherryHQ/cherry-studio

    Reviews Cherry Studio branches, pull requests, commits, files and docs against the project's own architecture, naming, API-boundary and UI rules, report-only by default.

    52k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Jevgrep

    dzhng/jevgrep

    A skill your agent uses for questions about how, why, or where behavior works in a repository, including questions that name a function or setting.

    2.4k GitHub stars~741 tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from tamdogood/builder-essential-skills

All 18 skills in this repo
  • Create Marketing Kit

    tamdogood/builder-essential-skills

    Create truthful, human-centered marketing campaigns for an app or product, including positioning, channel copy, original artwork, editable layouts, README banners, and selective website integration.

    219 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Name Your Business

    tamdogood/builder-essential-skills

    Generate, refine, compare, and when needed validate distinctive names for startups, AI products, developer tools, protocols, open-source projects, apps, product families, local businesses, services…

    219 GitHub stars~4.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Build Scenario Tests

    tamdogood/builder-essential-skills

    Inspect an unfamiliar repository, turn a focused Markdown behavior scenario into a deterministic test in the repository's native test stack, run it, and preserve traceability between intent and code.

    219 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Create Skill

    tamdogood/builder-essential-skills

    Create or update a complete repository skill from a user's idea, including the workflow instructions, references, scripts or assets, agent metadata, skill-card artwork, cinematic banner artwork…

    219 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Paper Opportunity Radar

    tamdogood/builder-essential-skills

    Run a cumulative daily or retrospective sweep of research papers on a chosen topic, audit their claims, methods, integrity signals, and independent support, then identify overlooked but feasible…

    219 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Repo System Map

    tamdogood/builder-essential-skills

    Analyze a software repository at the latest remote main commit and turn its implemented architecture into a citation-backed interactive isometric system map with a legend, selectable infrastructure…

    219 GitHub stars~3k tokensUpdated 1 mo ago
    Auto-check: notes

Questions about Session Profiler

What does Session Profiler do?

Profile and debug Hermes sessions from their JSONL transcripts. Session Profiler is an agent skill from tamdogood/builder-essential-skills. Profile and debug Hermes sessions from their JSONL transcripts.

When should I use Session Profiler?

Session Profiler fits situations like: A user wants to inspect what a Hermes session did; subagent activity; understand session cost; create a session timeline.

How do I install Session Profiler in Claude Code?

Run `npx skills add tamdogood/builder-essential-skills --skill session-profiler -a claude-code`. Or copy the skill folder (skills/session-profiler in tamdogood/builder-essential-skills) into .claude/skills/session-profiler in your project. Claude Code loads it when a task matches its description.

How do I install Session Profiler in Codex?

Run `npx skills add tamdogood/builder-essential-skills --skill session-profiler -a codex`. Or copy the skill folder (skills/session-profiler in tamdogood/builder-essential-skills) into .agents/skills/session-profiler in your project. Codex loads it when a task matches its description.

Can I use Session Profiler 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 tamdogood/builder-essential-skills --skill session-profiler -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/session-profiler, .gemini/skills/session-profiler, .github/skills/session-profiler and .opencode/skills/session-profiler in your project.

What does Session Profiler need to run?

Going by SKILL.md and its folder, Session Profiler needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Session Profiler access the network?

SKILL.md names 1 domain. As links in the text: ui.perfetto.dev. This is read from the text; nothing was executed.

Is Session Profiler safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Session Profiler use?

Session Profiler is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Session Profiler use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Session Profiler?

Skills that share tags, products or a category with Session Profiler: V2 Perf Iteration (mirage-project/mirage, 2.5k stars), Perf Loop (ozontech/seq-db, 133 stars), Tracelens Analysis Orchestrator (amd/skills, 398 stars) and GitHub Review Iteration (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Session Profiler?

tamdogood (a GitHub user) maintains it in tamdogood/builder-essential-skills, which has 219 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on August 16, 2026.

Source: tamdogood/builder-essential-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.