analytics

analytics is a command for Claude Code from mgd34msu/goodvibes-plugin. It costs 22 tokens per session (876 once invoked), scanned A, original, MIT.

A command set for viewing coding-session usage and activity, including tokens, cost, caching, agent activity, budgets, reports, and tags.

In plain words
What is it for?
Use it to view session summaries, inspect detailed usage, generate HTML analytics reports, check system health, manage budgets, export data, and sync sessions.
Why use it?
It shows how a session is using resources and helps investigate costs, performance, or host issues.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the goodvibes plugin — 6 skills, 5 commands, 4 agents, 9 hooks, 3 MCP servers shipped together

Good fit Use it to view session summaries, inspect detailed usage, generate HTML analytics reports, check system health, manage budgets, export data, and sync sessions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/mgd34msu/goodvibes-plugin/analytics
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/mgd34msu/goodvibes-plugin

Made for: Claude Code.

Or install goodvibes, the plugin that ships this one along with the rest of its 6 skills, 5 commands, 4 agents, 9 hooks, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analytics

README.md
[![agentmods](https://agentmods.dev/badge/commands/mgd34msu/goodvibes-plugin/analytics/github.svg)](https://agentmods.dev/commands/mgd34msu/goodvibes-plugin/analytics)
Your own site
<a href="https://agentmods.dev/commands/mgd34msu/goodvibes-plugin/analytics"><img src="https://agentmods.dev/badge/commands/mgd34msu/goodvibes-plugin/analytics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analytics

Your own site · 80×15
<a href="https://agentmods.dev/commands/mgd34msu/goodvibes-plugin/analytics"><img src="https://agentmods.dev/badge/commands/mgd34msu/goodvibes-plugin/analytics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 876 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00876
Opus 5.5 $0.00009 $0.00350
Sonnet 5.5 $0.00004 $0.00175
Haiku 4.5 $0.00002 $0.00088

Measured 1mo ago against content hash 7eccb95c48bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analytics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/goodvibes/commands/analytics.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analytics

goodvibes analytics: token usage, cost, cache performance, and agent activity, computed from transcript actuals, never tool self-estimates.

Parse the subcommand from $ARGUMENTS (empty = session summary) and make the matching call. If the mcp__analytics__* tools are unavailable, say the goodvibes plugin's analytics server is not running and stop.

Subcommand Call Notes
(none) query { "scope": "all", "data_scope": "current_session" } Present tokens, cache, cost, and agent activity as a readable summary. If empty: "No analytics data yet. Start working and check back after a few tool calls."
status the same query plus "format": "verbose" Verbose session breakdown.
report dashboard { "action": "report" } Writes a self-contained HTML report to <project>/.goodvibes/reports/analytics-report.html and returns the path plus a 3-line stats summary. Send that file to the user with SendUserFile (display: "render"), then relay the summary. Optional scope: session, project, all_projects (default when omitted).
doctor dashboard { "action": "doctor" } Host health + orphaned-process report. Relay any cleanup commands; never run them unasked.
budget <amount> budget { "action": "set", "amount": <n>, "unit": "dollars", "warn_at": [0.5, 0.8, 1.0] } <amount> must parse as a positive number; otherwise ask for one.
budget budget { "action": "check" } Report amount set, used, remaining, percent consumed.
budget clear budget { "action": "clear" }
export [format] export { "format": "<format>", "scope": "current" } format: json | csv | markdown (default). Optional: scope (current, historical, all_projects, session:<id>), sections, output_path, tags.
tag add <name> / tag remove <name> tag with action + value: "<name>" A name is required; ask if missing.
tag list / tag auto tag with the matching action list accepts scope: "all" to cover every session in the global DB.
sync / sync all sync { "scope": "current" } or { "scope": "all" } Incremental (byte-offset tracked). Report files synced, records imported, errors.
config [key] [val] config No key: { "action": "get" }. Key only: add "key". Key + value: { "action": "set", "key", "value" }, coercing the value's natural type (number / boolean / string). { "action": "reload" } re-reads config from disk.

For an unknown subcommand, list the ones above.

Read the full file on GitHub · 44 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 44 lines · 22 tokens per session scan A 7eccb95c48bf

Subscribe to this mod's changes

analytics is a command published in the GitHub repository mgd34msu/goodvibes-plugin (6 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 876 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.