Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Session Metrics

skill · centminmod/my-claude-code-setupMIT licenceAudited 8 Oct 2026 · source 279fe3d84db5

★ 2,657pushed today
✕BLOCKGrade D · 68/100 · 14 findings · 279fe3d
2,657repo stars · whole centminmod/my-claude-code-setup

Is it safe? No — BLOCK, grade D (68/100). We read this skill's source at commit 279fe3d84db5 and observed filesystem, network and shell access and no hard-coded secrets. The audit raised 14 findings, 2 critical or high. What it does: 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…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Session Metrics (centminmod/my-claude-code-setup)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/centminmod/session-metrics

Blocked. The page stays public so you can check this skill if someone recommended it to you. The audit found 2 critical or high findings, starting with “Code injection” in scripts/_data.py:392. Do not install it without reading them.

Trust audit

Audit 0.4.1 · source read 8 Oct 2026

Trust score68/100✕BLOCK D
0 critical2 high5 medium6 low1 info

BLOCK means the audit found something that could harm you or your machine. Grade D is shared by 749 of 18,389 audited skills.

What the source does

  • FilesystemDeclared1 observation
  • NetworkDeclared8 observations
  • ShellDeclared2 observations
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeFAIL13
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS1
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (14)

HIGHCode injectioncode.deserialize · scripts/_data.py:392
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
return pickle.load(fh)
Why
deserialises untrusted bytes into live objects
Fix
use json or yaml.safe_load
HIGHCode injectioncode.eval_exec · scripts/session_metrics_compare.py:1543
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
exec(src, ns)   # trusted skill-shipped code — no sandbox
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
MEDIUMNetwork egressnet.beacon_words · scripts/_html_sections.py:4227
F-04 Network egressCWE-200 · CWE-319Layer L1
'<button data-theme="theme-beacon">Beacon</button>'
Why
No further detail recorded for this rule.
Fix
—
MEDIUMNetwork egressnet.beacon_words · scripts/_html_sections.py:4246
F-04 Network egressCWE-200 · CWE-319Layer L1
'if(!/^(beacon|console|lattice|pulse)$/.test(t))t="console";'
Why
No further detail recorded for this rule.
Fix
—
MEDIUMObfuscation / stealthobf.homoglyph · scripts/session_metrics_compare.py:1884
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
hdr = (f"  {'#':>3}  {'A input':>8} {'B input':>8} {'Δin':>6}   "
Why
No further detail recorded for this rule.
Fix
—
MEDIUMObfuscation / stealthobf.homoglyph · scripts/session_metrics_compare.py:1885
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
f"{'A out':>7} {'B out':>7} {'Δout':>6}   "
Why
No further detail recorded for this rule.
Fix
—
MEDIUMObfuscation / stealthobf.homoglyph · scripts/session_metrics_compare.py:1886
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
f"{'A cost':>9} {'B cost':>9} {'Δcost':>6}{extras}")
Why
No further detail recorded for this rule.
Fix
—
LOWInsecure cryptocrypto.weak_hash · scripts/_data.py:358
F-09 Insecure cryptoCWE-327 · CWE-338Layer L1
path_hash = hashlib.sha1(abs_path.encode("utf-8")).hexdigest()[:8]
Why
No further detail recorded for this rule.
Fix
—
LOWInsecure cryptocrypto.weak_hash · scripts/_data.py:425
F-09 Insecure cryptoCWE-327 · CWE-338Layer L1
_ph = hashlib.sha1(_abs.encode("utf-8")).hexdigest()[:8]
Why
No further detail recorded for this rule.
Fix
—
LOWInsecure cryptocrypto.weak_hash · scripts/_turn_parser.py:517
F-09 Insecure cryptoCWE-327 · CWE-338Layer L1
return hashlib.sha1(canon.encode("utf-8")).hexdigest()[:16]
Why
No further detail recorded for this rule.
Fix
—
LOWInsecure cryptocrypto.weak_hash · scripts/session_metrics_compare.py:157
F-09 Insecure cryptoCWE-327 · CWE-338Layer L1
return hashlib.sha1(head.encode("utf-8")).hexdigest()
Why
No further detail recorded for this rule.
Fix
—
LOWObfuscation / stealthobf.decode_call · scripts/vendor/charts/highcharts/v12/export-data.js:14
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
*/function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.AST,t._Highcharts.Chart):"function"==typeof define&&define.amd?define("highcharts/modules
Why
No further detail recorded for this rule.
Fix
—
LOWObfuscation / stealthobf.decode_call · scripts/vendor/charts/highcharts/v12/exporting.js:13
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
*/function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.AST,e._Highcharts.Chart):"function"==typeof define&&define.amd?define("highcharts/modules
Why
No further detail recorded for this rule.
Fix
—
INFOPrompt injectionprompt.conditional_escalation · SKILL.md:168
F-01 Prompt injectionCWE-94 · CWE-1427Layer L2
> **Invocation note for the AI.** Don't pass `--tz` or `--utc-offset` unless the user explicitly asks for a specific timezone. The script auto-detects the user's system tz and renders all human-facing
Why
No further detail recorded for this rule.
Fix
—

Audit 0.4.1 · source sha 279fe3d84db5 · 8 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • Publishercentminmod GitHub userOwner of the repository this skill is read from
  • Source foldercentminmod/my-claude-code-setup/.claude/skills/session-metricsThe exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdict279fe3d84db5A new audit runs when the source changes
  • Repository statusNot archivedPushed today
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: 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…

---
name: session-metrics
effort: medium
description: >
  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.
---

# Session Metrics

Runs `scripts/session-metrics.py` against the Claude Code JSONL log to produce
a timeline-ordered cost summary with per-turn and cumulative totals.

## Dispatch — how to route this invocation

**First positional argument received:** `$ARGUMENTS[0]`
**Full argument string:** `$ARGUMENTS`

Read `$ARGUMENTS[0]` above and match it by **literal equality** against the
table below. Claude Code already tokenized the arguments shell-style, so no
parsing is required — just compare strings.

| `$ARGUMENTS[0]`     | Route                                     | Then read |
|---------------------|-------------------------------------------|-----------|
| `all-projects`      | Instance-wide dashboard aggregating every project under `~/.claude/projects` | `## Instance dashboard (all projects)` below |
| `compare`           | Two-session compare on JSONLs that already exist | `## Model comparison` below, then [`references/model-compare.md`](references/model-compare.md) before running |
| `compare-run`       | Fully automated capture: spawns two `claude -p` sessions, feeds the suite, then runs `--compare` | `## Model comparison` below, then [`references/model-compare.md`](references/model-compare.md) "Workflow A — automated" |
| `compare-prep`      | Print manual capture protocol + 10-prompt suite (fallback when headless is unavailable) | `## Model comparison` below |
| `count-tokens`      | API-key-only tokenizer check              | `## Model comparison` below |
| `export`            | Natural-language export shortcut — scan full arg string to determine session vs project scope | `## Export shortcuts` below |
| `project`           | All sessions for the current project — timeline + per-session subtotals + grand total | `## Quick usage` below (`--project-cost`); also scan remaining args for `--output` format flags |
| `project-cost`      | Alias for `project`                       | `## Quick usage` below (`--project-cost`); also scan remaining args for `--output` format flags |
| *(empty, or any other value)* | Default single-session report   | `## Quick usage` below |

This is the single gate that keeps compare mode off the natural-language
path. **Do not infer the route from the user's chat history; only use the
literal value of `$ARGUMENTS[0]` above.**

When the skill auto-triggers from a natural-language question ("how much did
this session cost?", "show me token usage"), there are no positional
arguments — `$ARGUMENTS[0]` is empty — and you always route to the default.
Phrases like "compare 4.6 vs 4.7 cost" arriving as natural language do NOT
produce `$ARGUMENTS[0] = compare` and must not route into compare mode;
answer them by running the default report on the current session and
suggesting `/session-metrics compare-prep` if the user wants a real
benchmark.

## Pre-flight context

- skill-dir: ${CLAUDE_SKILL_DIR}
- session-id: ${CLAUDE_SESSION_ID}

## Export shortcuts

Reached when `$ARGUMENTS[0]` is `export`. Scan the **full argument string** (not just `$ARGUMENTS[0]`) to determine scope and formats. Apply these checks **in order** (first match wins):

1. Full arg string contains `all-projects` → `--all-projects --output <formats>`
2. Full arg string contains `project` (and not already caught above) → `--project-cost --output <formats>`
3. Otherwise → current session `--session ${CLAUDE_SESSION_ID} --output <formats>`

Infer format flags from the argument string: `html` → `html`, `csv` → `csv`, `md` or `markdown` → `md`. Always add `json` alongside any requested format per the post-export audit convention (see `## Optional post-export audit` below).

**Always add `--quiet` to session and project export commands.** When exporting, the per-turn detail lives in the written HTML/JSON, so the full stdout timeline is redundant — and at project scope (or for a long session) it can run to thousands of lines, spilling the run into a harness overflow file that buries the `[export]` path lines you need. `--quiet` collapses stdout to the legend + grand total + footer (plus the `[export]` lines), keeping the run inline. Do **not** add `--quiet` for `--all-projects` — its instance dashboard text is already compact and the flag has no effect there.

**Examples:**

| Full argument string | Command |
|---|---|
| `export session` | `--session ${CLAUDE_SESSION_ID} --quiet --output json` |
| `export session to html` | `--session ${CLAUDE_SESSION_ID} --quiet --output html json` |
| `export session metrics to html` | `--session ${CLAUDE_SESSION_ID} --quiet --output html json` |
| `export to html` | `--session ${CLAUDE_SESSION_ID} --quiet --output html json` |
| `export project` | `--project-cost --quiet --output json` |
| `export project to html` | `--project-cost --quiet --output html json` |
| `export project sessions` | `--project-cost --quiet --output json` |
| `export project sessions to html` | `--project-cost --quiet --output html json` |
| `export entire project's session metrics to html` | `--project-cost --quiet --output html json` |
| `export project metrics to html csv` | `--project-cost --quiet --output html csv json` |

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 279fe3d

uv run python ${CLAUDE_SKILL_DIR}/scripts/session-metrics.py --session ${CLAUDE_SESSION_ID}
uv run python ${CLAUDE_SKILL_DIR}/scripts/session-metrics.py --session <uuid>
uv run python ${CLAUDE_SKILL_DIR}/scripts/session-metrics.py --slug=-home-user-projects-myapp
uv run python ${CLAUDE_SKILL_DIR}/scripts/session-metrics.py --list
uv run python ${CLAUDE_SKILL_DIR}/scripts/session-metrics.py --project-cost
uv run python ${CLAUDE_SKILL_DIR}/scripts/session-metrics.py --quiet --output json

Commands as the repository documents them: shown, never run by us. Our verdict covers commit 279fe3d84db5 only.

Works in which agents?

What its own text says, not a test

AgentStatusMore
Claude CodeMentioned in its text, not testedSkills for Claude Code · About Claude Code
CodexMentioned in its text, not testedSkills for Codex · About Codex
CursorMentioned in its text, not testedSkills for Cursor · About Cursor
“Mentioned” means the skill’s text names the agent. We have not run it there.

Audit history

Every audit, every source change

  1. ✕BLOCK D 68 / 100

    first audit · source 279fe3d84db5

README badge

For maintainers · shows the latest audit

ModelsAtlas: BLOCK DMODELSATLASBLOCK · D
[![ModelsAtlas: BLOCK D](https://modelsatlas.com/skills/centminmod/session-metrics/badge.svg)](https://modelsatlas.com/skills/centminmod/session-metrics/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

Add this badge to your README

[![ModelsAtlas: BLOCK D](https://modelsatlas.com/skills/centminmod/session-metrics/badge.svg)](https://modelsatlas.com/skills/centminmod/session-metrics/)

Questions about Session Metrics

What does the Session Metrics skill do?
Shared starter template configuration and CLAUDE.md memory bank system for Claude Code
Is Session Metrics safe to install?
No — not without reading the findings first. The audit graded it D (68/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What can Session Metrics access on my machine?
The audit observed that it reaches the network, runs shell commands and reads or writes files. Each of those is consistent with what it says it does. Secrets in the source: none found.
Which assistants does Session Metrics work with?
Its documentation mentions claude-code, codex and cursor. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (279fe3d84db5), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.