CtrlK
BlogDocsLog inGet started
Tessl Logo

session-metrics

Tally Claude Code session token usage and cost estimates from the raw JSONL conversation log. Trigger when the user asks about session cost, token usage, API spend, cache hit rate, input/output tokens, or wants a breakdown of how much a Claude Code session has cost. Also trigger for "how much have we spent", "show me token usage", "session summary", "cost so far", or any request to analyse or display per-turn metrics from the current or a past session. Do NOT auto-dispatch compare mode (--compare / --compare-prep / --compare-run / --count-tokens-only) from natural-language phrases. The skill body uses $ARGUMENTS[0] as the dispatch key — if the first positional argument is not literally "compare", "compare-prep", "compare-run", or "count-tokens", route to the default single-session report.

69

Quality

86%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

78%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A highly actionable, well-structured skill body with excellent progressive disclosure and concrete executable commands. Its main weakness is conciseness: the body is long, sprinkles version annotations inline, and over-explains some internal mechanics that could live in references.

Suggestions

Move inline version markers (v1.6.0, v1.7.0, v1.78.0, v1.87.0, v1.36.0) into a 'Version history / deprecated' section or drop them, since time-sensitive info penalizes conciseness when not isolated.

Tighten or defer the detailed subagent-attribution mechanics and 'pin override visibility' prose into references/jsonl-schema.md, keeping only the user-facing flag summary in the body.

Consider consolidating the large flag tables (HTML-specific, other useful flags) into a single references/flags.md with a compact inline cheat-sheet, reducing the body's token footprint.

DimensionReasoningScore

Conciseness

Mostly operational and free of generic concept re-explanation, but the ~474-line body is noticeably long: inline version markers (v1.6.0, v1.7.0, v1.78.0, v1.87.0, v1.36.0) are time-sensitive and not isolated in a deprecated section, and detailed mechanics like subagent attribution and pin-override visibility could be tightened or deferred.

3 / 5

Actionability

Fully executable, copy-paste-ready guidance throughout: concrete `uv run python .../session-metrics.py` invocations, a dispatch table mapping arguments to routes, exact flag tables, and a full export-shortcut command table covering common cases.

5 / 5

Workflow Clarity

Multi-step flows (Tasks companion prepare→edit→render, Insights prepare→read→render, export first-match-wins ordering) are clearly sequenced with explicit scope gates, and the destructive `--prune-exports` is dry-run-by-default with `--yes`; minor validation gaps remain in the simpler paths.

4 / 5

Progressive Disclosure

Clear overview body with well-signaled one-level-deep references to eight real reference files (all verified to exist) plus scripts; eager content is deliberately kept minimal and split appropriately, with a dedicated 'Reference files' section for navigation.

5 / 5

Total

17

/

20

Passed

Description

95%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, well-targeted description that clearly states the capability, provides rich natural trigger terms, and explicitly handles routing edge cases to avoid mis-dispatch. The only minor gap is that distinct capabilities are interleaved with trigger phrasing rather than presented as a clean action list.

DimensionReasoningScore

Specificity

Names the domain ('Claude Code session token usage and cost estimates from the raw JSONL conversation log') and several concrete actions (tally usage, estimate cost, cache hit rate, per-turn metrics), but capabilities are largely conveyed through trigger enumeration rather than a clean comprehensive capability list, leaving minor gaps.

4 / 5

Completeness

Explicitly answers both what ('Tally Claude Code session token usage and cost estimates from the raw JSONL conversation log') and when ('Trigger when the user asks about...') with concrete trigger phrases.

5 / 5

Trigger Term Quality

Comprehensive natural terms including synonyms and explicit user phrasings: 'session cost', 'token usage', 'API spend', 'cache hit rate', 'input/output tokens', plus 'how much have we spent', 'show me token usage', 'session summary', 'cost so far'.

5 / 5

Distinctiveness Conflict Risk

Clear niche — Claude Code session cost/token metrics from JSONL logs — with distinct, specific triggers and minimal overlap risk with other skills; also includes an explicit anti-conflict dispatch rule for compare mode.

5 / 5

Total

19

/

20

Passed

Validation

81%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation13 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

relative_links

Relative link issues: 1 deeper-than-1-level

Warning

referenced_paths_exist

Referenced path issues: 2 deeper-than-1-level

Warning

Total

13

/

16

Passed

Repository
centminmod/my-claude-code-setup
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.