CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

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.

Quality

84%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

SKILL.md
Quality
Evals
Security

Quality

Content

75%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 dispatch routing, executable commands, and deliberate one-level-deep reference deferral. The main costs are token efficiency — repeated rationales, UI minutiae, and inline version numbers — and a body that carries detail which belongs in its own references.

Suggestions

State the --quiet rationale once (in the flags table) and reference it from the Export shortcuts section and Quick usage comments instead of repeating the full explanation three times.

Move the version-annotated detail sections (subagent attribution Phase-B semantics, cross-cutting sections) into a reference file and keep a 3-5 line summary with a 'Read when' pointer in SKILL.md.

Condense the HTML drawer/interactive-detail description to the one or two facts that affect how the skill is invoked, deferring UI behavior to the HTML output itself or a reference.

DimensionReasoningScore

Conciseness

The body is dense and skill-specific with no generic-concept explanations, but includes unnecessary padding: the --quiet rationale is explained three times (Export shortcuts prose, the flags table, and a Quick usage comment), the HTML drawer UI description (~15 lines of toggle/focus/Esc detail) exceeds what is needed to run the skill, and inline version numbers (v1.6.0, v1.7.0, v1.36.0, v1.78.0, v1.87.0) are time-sensitive information not placed in a deprecated/old-patterns section. It is not a 2 because essentially all content is skill-specific operational fact rather than concepts Claude already knows.

3 / 5

Actionability

Fully executable throughout: copy-paste-ready `uv run` commands with concrete paths and env vars, a literal-equality dispatch table for $ARGUMENTS[0], ordered first-match-wins export rules backed by a 12-row argument-string-to-command example table, and complete flag tables with defaults. This matches the anchor for copy-paste-ready guidance covering the common cases.

5 / 5

Workflow Clarity

Multi-step flows are clearly sequenced with explicit gates: the dispatch gate, ordered export-scope checks, the 3-step prepare/edit/render flows for Tasks and Insights companions (render validates the prose; facts are recomputed, never trusted), scope gates ("Never auto-generate for --project-cost"), and count thresholds (2–40 request units). The destructive --prune-exports operation is dry-run by default with --yes required. It falls short of 5 because error-recovery paths (missing session JSONL, script failure, malformed exports) are implicit rather than spelled out.

4 / 5

Progressive Disclosure

All eight reference files plus the two referenced scripts exist, are one level deep, and are clearly signaled with per-file "Read when..." conditions and explicit deferral rationale ("deferred so single-session reports don't pay for context they rarely use"). It is not a 5 because the body itself inlines substantial detail that could live in references — the ~25-line subagent attribution semantics section, the exhaustive flag tables, and the HTML drawer behavior description — making SKILL.md more than the lean overview the top anchor describes.

4 / 5

Total

16

/

20

Passed

Description

90%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 description with excellent trigger coverage and a fully explicit what/when structure, further hardened by explicit negative dispatch guidance for compare mode. Its only weakness is capability coverage: it conveys the core tally/cost analysis but omits several of the skill's major capabilities (exports, project/instance aggregation, model comparison).

DimensionReasoningScore

Specificity

The description names the domain and 1-2 concrete actions ("Tally Claude Code session token usage and cost estimates from the raw JSONL conversation log", per-turn metrics breakdown), but major capabilities such as export formats, project/instance-wide aggregation, and model comparison are not mentioned, so coverage is not comprehensive. It falls below the level-4 anchor because the gaps are more than minor.

3 / 5

Completeness

It clearly 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 session cost, token usage, API spend...") with concrete quoted trigger phrases, plus explicit negative guidance on when not to dispatch compare mode.

5 / 5

Trigger Term Quality

Comprehensive natural trigger coverage including synonyms and verbatim user phrasings: "session cost", "token usage", "API spend", "cache hit rate", "input/output tokens", "how much have we spent", "show me token usage", "session summary", "cost so far". These are exactly the phrases a user would naturally say when needing this skill.

5 / 5

Distinctiveness Conflict Risk

The niche is clear and distinct — Claude Code session token/cost analysis from JSONL logs — with trigger terms unlikely to fire for unrelated skills. The phrase "session summary" is slightly generic, but it is anchored by the Claude Code session context, keeping conflict risk minimal.

5 / 5

Total

18

/

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.

Validation — 13 / 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: 1 deeper-than-1-level

Warning

Total

13

/

16

Passed

Repository

centminmod/my-claude-code-setup

Path

.claude/skills/session-metrics/SKILL.md

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.