tokenomics

tokenomics is a skill for Claude Code from arozumenko/sdlc-skills. It costs 177 tokens per session (6,789 once invoked), scanned A, original, MIT.

An optional usage-recording system for coding-agent sessions. It stores session time, token use, cost, activity, and case identifiers in JSON files committed to a Git repository, including data from Claude Code, Copilot CLI, and the VS Code Copilot sidebar.

In plain words
What is it for?
Use it to track how much time, model usage, and money coding-agent work consumes, and how many cases the team automates. Recording starts only after someone explicitly runs its installation script.
Why use it?
Normal usage records may expire or remain on one engineer’s computer. This creates a shared history that can survive transcript cleanup and be reviewed by the team.

Skill for Claude Code

Written for Claude Code: SessionEnd hook event. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

Part of the sdlc-skills plugin — 53 skills shipped together

Good fit Use it to track how much time, model usage, and money coding-agent work consumes, and how many cases the team automates. Recording starts only after someone explicitly runs its installation script.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arozumenko/sdlc-skills/tokenomics
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.

Any agent
npx skills add arozumenko/sdlc-skills --skill tokenomics
Clone the repo
git clone --depth 1 https://github.com/arozumenko/sdlc-skills

Made for: Claude Code.

Or install sdlc-skills, the plugin that ships this one along with the rest of its 53 skills.

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 tokenomics

README.md
[![agentmods](https://agentmods.dev/badge/skills/arozumenko/sdlc-skills/tokenomics/github.svg)](https://agentmods.dev/skills/arozumenko/sdlc-skills/tokenomics)
Your own site
<a href="https://agentmods.dev/skills/arozumenko/sdlc-skills/tokenomics"><img src="https://agentmods.dev/badge/skills/arozumenko/sdlc-skills/tokenomics/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 tokenomics

Your own site · 80×15
<a href="https://agentmods.dev/skills/arozumenko/sdlc-skills/tokenomics"><img src="https://agentmods.dev/badge/skills/arozumenko/sdlc-skills/tokenomics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,789 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 187
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium MCP Rug Pull · line 356
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00177 $0.06789
Opus 5 $0.00088 $0.03395
Sonnet 5 $0.00035 $0.01358
Haiku 4.5 $0.00018 $0.00679

Measured 9d ago against content hash 29651dc22e5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tokenomics 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 9d ago.

The scan reads SKILL.md. This mod also ships 17 executable files (hooks/otel-sink.mjs, hooks/otel-sink.test.mjs, hooks/scope-hook.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

bundles/test-automation/skills/tokenomics/SKILL.md · 437 lines

How it starts

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

Tokenomics — durable team usage telemetry

The efficiency-audit skill answers "what did this cost" by reading live transcripts — precise, but transcripts expire (~30 days) and live on each engineer's machine, so the answer is only available to whoever runs it, soon enough, where the work happened.

This skill closes that gap with a capture layer: an optionally-enabled hook that writes one JSON line per finished session into a git-committed ledger (.agents/telemetry/automation/usage-<user>.jsonl). Ledger lines are grounded in the same sources efficiency-audit trusts (transcript token records, ccusage dollars, Copilot's billed credits) but are captured at the moment they exist — so the team's usage history survives transcript cleanup and accumulates through ordinary git push/pull. A report script then answers: how much time, tokens and money did the team spend, and how many cases did it automate.

Installing this skill does NOT start capturing. Telemetry activates only when someone runs the install script below — that's the opt-in.

Updating an old install: re-run the same script. It is idempotent and also migrates the flat-era layout — usage-*.jsonl, scopes/, live/, config.json sitting at the telemetry ROOT move into automation/ automatically (readers look only there; un-migrated history would silently drop out of every report). Same-named newer data in automation/ wins — nothing is ever clobbered.

Quick start

# 1. Enable capture in this repo (all three hosts; idempotent; --remove undoes it)
node .claude/skills/tokenomics/scripts/install-hooks.mjs            # Claude-installed copy
node .github/skills/tokenomics/scripts/install-hooks.mjs            # Copilot-installed copy
#    --host claude|copilot|vscode   default wires Claude hooks + the Copilot hooks
#                                   file. `vscode` is OPT-IN (a folderOpen task in
#                                   shared .vscode/tasks.json; VS Code asks each
#                                   teammate once to allow auto-tasks) — every sweep
#                                   already walks the sidebar store, so it is only
#                                   needed in a SIDEBAR-ONLY repo. --remove strips
#                                   it either way.
#    --local       Claude only: settings.local.json (just you, not the team)
#    --git-hook    optional belt-and-braces: a background post-commit sweep
#    --doctor      health-check wiring, stores, ccusage, OTel flow (--fix starts the sink)
#    --otel [--endpoint URL]   opt into OpenTelemetry (see below); --otel-remove undoes

# 2. Backfill what's still on this machine (optional, one-time)
node .claude/skills/tokenomics/hooks/telemetry-capture.mjs --sweep --all

# 3. One commit to main (the installer prints it): registers the telemetry
#    submodule. From then on hooks commit+push the records to the `telemetry`
#    branch automatically — nobody hand-commits telemetry again.
#    Teammates: git clone --recurse-submodules

# 4. The report — one repo or several, a window, markdown / JSON / HTML
node .claude/skills/tokenomics/scripts/install-hooks.mjs --pull  # merge the team's pushes first
node .claude/skills/tokenomics/scripts/team-report.mjs
node .claude/skills/tokenomics/scripts/team-report.mjs ~/work/repoA ~/work/repoB --since 2026-08-01 --json
node .claude/skills/tokenomics/scripts/team-report.mjs --html --out team.html # shareable self-contained page
node .claude/skills/tokenomics/scripts/team-report.mjs --role test-automation-engineer   # sessions involving that agent

# 5. Per-batch cost — what a batch delivered and what it cost, per case
node .claude/skills/tokenomics/scripts/team-report.mjs --batch <slug>            # markdown
node .claude/skills/tokenomics/scripts/team-report.mjs --batch <slug> --html --out batch.html
node .claude/skills/tokenomics/scripts/team-report.mjs --batches                 # every batch with a receipt

# 6. Hyperfactory dataset export — one submission row per batch
#    identity comes from .agents/telemetry/automation/factory-profile.json (copy
#    templates/factory-profile.template.json there and fill it in once);
#    every `work-scope.mjs close` ALSO auto-appends the batch's row to
#    .agents/telemetry/automation/export/runs.json and prints the §7 checks
node .claude/skills/tokenomics/scripts/build-tokenomics-export.mjs --batch <slug>        # build/refresh one row + print its checks
node .claude/skills/tokenomics/scripts/build-tokenomics-export.mjs --submission          # datasets/<factory-id>/{runs.json,submission.md} + § 7 checklist status
node .claude/skills/tokenomics/scripts/build-tokenomics-export.mjs --submission --anon   # same, identifiers anonymized (T-WI-###) for the public PR
node .claude/skills/tokenomics/scripts/build-tokenomics-export.mjs --compare a/cost.json b/cost.json

Read the full file on GitHub · 437 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. 9d ago First seen · 437 lines · 177 tokens per session scan A 29651dc22e5b

Subscribe to this mod's changes

tokenomics is a skill published in the GitHub repository arozumenko/sdlc-skills (20 stars, last pushed 4d ago), licensed MIT. It adds 177 tokens to every session and 6,789 once invoked, about $0.0009 per session on Opus 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-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens