From green-code
Displays AI carbon footprint (tokens, energy, CO2, trees planted). Use when asked about carbon impact or green-code stats.
How this skill is triggered — by the user, by Claude, or both
Slash command
/green-code:statusThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read the green-code tracking data and display a formatted summary to the user.
Read the green-code tracking data and display a formatted summary to the user.
~/.claude/plugins/data/green-code/usage.json~/.claude/plugins/data/green-code/config.json/green:config to set up the plugin.Present the data in this format (adapt numbers from the JSON):
green-code -- Carbon Footprint
Period: Since {accumulated.since}
Energy: {accumulated.kwh} kWh (estimated)
CO2 emitted: {accumulated.co2_kg} kg (US mix, {config.co2_grams_per_kwh} g/kWh, PUE {config.pue})
Trees needed: {ceil(accumulated.co2_kg / config.threshold_co2_kg)} (at {config.threshold_co2_kg} kg CO2/tree)
Trees planted: {trees.total}
Balance: {trees.total * config.threshold_co2_kg - accumulated.co2_kg} kg CO2
Mode: {config.mode} | Threshold: {config.threshold_co2_kg} kg CO2/tree
Sources: IEA 2024, Luccioni et al. 2024, de Vries 2023
Note: Estimates based on US energy mix. Uncertainty ~x2.
If there are planted trees in trees.planted, show the last 5 entries:
Recent plantings:
{date} -- {count} tree(s), {co2_offset_kg} kg CO2 offset
accumulated.co2_kg is 0 or very small, encourage the user: "Your footprint is minimal so far. Keep coding!"Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jeremiesamson/green-code --plugin green-code