/green-stats:reportfrom green-stats
Report Claude Code token usage and estimated energy/CO2 for a time window, broken down by model, day or source (host or devcontainer). Collects new transcript data incrementally first. Use when the user asks how many tokens they used, their Claude usage, or the energy or carbon footprint of their Claude usage.
Ships in green-stats. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keep this lean: one script call, relay its output. The user cares about the numbers, not commentary.
test -f "${GREEN_STATS_HOME:-$HOME/.local/share/green-stats}/config.json" && echo configured || echo missing
If missing, run the green-stats:setup skill first, then continue.
--days 7, "this year" → days since Jan 1. Default: omit --days (uses default_days from config).--by day, "by container" / "by machine" / "by source" → --by source, otherwise --by model.Read "script" from the config.
bash (default):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/green-stats.sh" report --days N --by X
powershell:
pwsh -File "<GREEN_STATS_HOME>/green-stats.ps1" report --days N --by X
Show the script output verbatim in a code block. Add at most one sentence of interpretation, e.g. which model or source dominates.
/green-stats:update-model can assign them a tier.The same report runs without Claude: bash <plugin>/scripts/green-stats.sh report.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jaksa76/green-stats --plugin green-stats3 skills in this plugin
/setupFirst-run setup for green-stats — detects the environment (shell, tools, docker/podman), asks the user where and how to collect Claude Code usage, writes the config, and ports the collector to PowerShell if bash is unavailable. Use on first use, or when the user wants to reconfigure green-stats (e.g. enable/disable devcontainer collection)./update-modelView or update green-stats' energy estimation model — per-token Wh coefficients per model tier, PUE, grid carbon intensity — optionally researching newer published estimates, and assign tiers to models the report lists as unmapped. Use when the user wants to see, tune, refresh or question the energy/CO2 assumptions.