Skip to content
Back to skills

Session Stats

ASecurity

Render a dashboard of the current Claude Code session — message counts, token usage, cache read/write, and a tool-call histogram — parsed from the session transcript JSONL by a bundled bash script. One bash call, zero analysis, zero confirmation. Optionally pass a session id to inspect a different session. Use when the user asks for session stats, usage, token breakdown, or a session dashboard.

  • 44 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 19, 2026
ai-agentsbashgit

Works with

  • claude code

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 28, 2026

npx -y skills add foyzulkarim/skills --skill session-stats --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Session Stats?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Session Stats
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/foyzulkarim-session-stats/badge)](https://www.skillsdirectory.com/skills/foyzulkarim-session-stats)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: session-stats
description: "Render a dashboard of the current Claude Code session — message counts, token usage, cache read/write, and a tool-call histogram — parsed from the session transcript JSONL by a bundled bash script. One bash call, zero analysis, zero confirmation. Optionally pass a session id to inspect a different session. Use when the user asks for session stats, usage, token breakdown, or a session dashboard."
model: inherit
color: green
---

# Session-Stats

One bash call, then relay. The bundled script finds the transcript at
`~/.claude/projects/*/<session-id>.jsonl` (current id comes from
`CLAUDE_CODE_SESSION_ID` in the bash environment), aggregates it with `jq`,
and prints the dashboard. All numbers come from the script — compute nothing
yourself.

## Steps

1. Run — pass a session id only if the user named one, otherwise no args:

```bash
bash {base_directory}/dashboard.sh [session-id]
```

2. Print the script's stdout verbatim inside a ```text code fence. After the
   fence, add at most one sentence — or nothing.

3. Non-zero exit → print stderr verbatim and stop. No retries, no fallback
   parsing.

## Notes

- The transcript schema is internal to Claude Code; the script degrades to
  `—` for fields it can't find. Never "fill in" missing values by reading
  the JSONL yourself.
- For a colored render, the user can run the script directly:
  `! bash {base_directory}/dashboard.sh --color`

## You Must NOT

- Parse the JSONL yourself, or run any git/jq command
- Summarize, interpret, reformat, or annotate the dashboard beyond one sentence
- Ask questions — this skill has no interactive path

Files in this skill

  • SKILL.md1.7 KB
  • dashboard.sh5.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.