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

88%

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

81%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.

An exceptionally actionable and well-gated skill body with clean dispatch logic and genuine progressive disclosure backed by real reference files. Its weakness is size and padding: UI feature descriptions and inline version history inflate the file without helping invocation.

Suggestions

Move the descriptive output-feature sections ("Per-turn drill-down (HTML only)", the subagent-attribution internals, and the conditional-dashboard-card list) into references/jsonl-schema.md or a features reference, keeping only a one-line summary plus the pointer in SKILL.md.

Strip inline version annotations (v1.6.0, v1.36.0, v1.78.0, v1.87.0) from section headers and flag descriptions, or collect them in a single changelog/deprecated section so time-sensitive markers don't penalize the main instructions.

Tighten the "Other useful flags" and "Cross-cutting sections" tables to the flags and columns the invoker must decide about, deferring detection-rule detail (e.g. the /exit + synthetic-turn resume fingerprint) to the referenced deep-dive.

DimensionReasoningScore

Conciseness

The operational core (dispatch table, quick usage, export shortcuts) is tight and assumption-respecting, but several sections pad the file with feature documentation Claude doesn't need to invoke the script — e.g. the HTML drawer's "Close with the × button, Esc, or a backdrop click — focus returns to the originating row" and the subagent-attribution internals ("iterative resolve over (tool_use.id, agentId) linkage ... with a cycle guard"). Inline version markers ("v1.6.0", "v1.87.0", "v1.78.0+") are time-sensitive information placed outside any deprecated/changelog section, which the rubric explicitly penalizes. This lands above anchor 2 (the majority is operationally useful, not padded throughout) but below anchor 4 because multiple sections need trimming or deferral.

3 / 5

Actionability

Fully executable, copy-paste-ready commands throughout: `uv run python ${CLAUDE_SKILL_DIR}/scripts/session-metrics.py --session ${CLAUDE_SESSION_ID}` with every flag documented in tables, plus an export-shortcut table mapping each concrete argument string ("export project sessions to html") to the exact command (`--project-cost --quiet --output html json`). The common cases are all covered by specific examples.

5 / 5

Workflow Clarity

Multi-step flows are explicitly sequenced with validation checkpoints and gates: dispatch by literal equality with a defined fallback; export-scope checks as an ordered first-match-wins list; the Tasks and Insights companions as numbered prepare → edit → render flows where the render step "validates the prose ... never trusted for math"; and the one destructive operation (--prune-exports) is documented as dry-run-by-default with an explicit --yes opt-in. The "editor, not an author" contract and scope gates ("Never auto-generate for --project-cost or --all-projects") are unambiguous.

5 / 5

Progressive Disclosure

Good structure against the actual bundle: compare mode, instance dashboard, pricing, JSONL schema, and post-export audit are each deferred to real one-level-deep reference files with explicit "read X when Y" signals and stated deferral rationale ("so single-session reports don't pay for compare-mode context"), and all referenced paths exist. It falls short of anchor 5 because a substantial amount of feature detail is still inlined in SKILL.md — the per-turn HTML drill-down UI behavior, the cross-cutting sections, and the subagent-attribution internals — which could live in the existing references, making the overview heavier than a pure routing document.

4 / 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 description: concrete capabilities, explicit what/when, rich natural-language trigger coverage, and a clearly bounded niche. The only weakness is that the capability list is slightly narrower than the skill's actual surface (exports, project/instance rollups are absent from the what-clause).

DimensionReasoningScore

Specificity

Concrete actions are named — "Tally Claude Code session token usage and cost estimates from the raw JSONL conversation log" plus "breakdown of how much a Claude Code session has cost" and "per-turn metrics" — giving several specific capabilities with only minor gaps (export formats and the comparison mode are not named in the what-clause). It stops short of anchor 5's comprehensive coverage because the capability list omits the multi-format export and project/instance aggregation the skill actually performs.

4 / 5

Completeness

Explicitly answers both questions: what ("Tally ... token usage and cost estimates from the raw JSONL conversation log") and when ("Trigger when the user asks about ..." followed by concrete trigger phrases). The negative guidance about compare-mode dispatch adds routing precision without diluting either clause.

5 / 5

Trigger Term Quality

Covers natural terms and their synonyms comprehensively: "session cost", "token usage", "API spend", "cache hit rate", "input/output tokens", plus quoted user phrasings like "how much have we spent", "show me token usage", "session summary", and "cost so far". This matches the anchor-5 pattern of including the actual phrases a user would say, not just technical jargon.

5 / 5

Distinctiveness Conflict Risk

Occupies a clear niche — Claude Code session cost/token analysis from the JSONL log — with trigger terms (session cost, cache hit rate, per-turn metrics) that no generic analytics or code-metrics skill would claim. The explicit do-not-trigger boundary for compare mode further reduces mis-dispatch risk.

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.

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: 2 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.