From green-code
Display your AI carbon footprint - tokens consumed, energy estimated, CO2 emitted, and trees planted. Use when the user asks about their carbon impact or wants to see green-code stats.
npx claudepluginhub jeremiesamson/green-code --plugin green-codeThis skill uses the workspace's default tool permissions.
Read the green-code tracking data and display a formatted summary to the user.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
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!"