Skip to content
Monitoring
Skill

/carbon-card

Generate shareable PNG report cards of your Claude Code carbon footprint

From plugin
claude-carbon
1553 skills2 hooks
Install
$ npx -y skills add gwittebolle/claude-carbon --skill carbon-card --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/carbon-card

Context preview

The summary Claude sees to decide when to auto-load this skill.

Generate shareable PNG report cards of your Claude Code carbon footprint

SKILL.md

carbon-card.SKILL.md
name: carbon-card
description: Generate shareable PNG report cards of your Claude Code carbon footprint

Run the following bash script and present the output to the user. Show the exported file paths so they can share the PNGs.

#!/usr/bin/env bash
# Locate the install wired into the status line (honours CLAUDE_CONFIG_DIR),
# then fall back to CLAUDE_PLUGIN_ROOT / CLAUDE_CARBON_DIR / the default path.
CFG="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
REPO_DIR=""
if command -v jq >/dev/null 2>&1 && [ -f "$CFG/settings.json" ]; then
  SL_CMD="$(jq -r '.statusLine.command // empty' "$CFG/settings.json" 2>/dev/null)"
  # statusLine.command stores a shell-escaped path: expand ~ and unescape spaces
  SL_CMD="${SL_CMD//\\ / }"; SL_CMD="${SL_CMD/#\~/$HOME}"
  [ -n "$SL_CMD" ] && [ -f "$SL_CMD" ] && REPO_DIR="$(cd "$(dirname "$SL_CMD")/.." 2>/dev/null && pwd)"
fi
[ -z "$REPO_DIR" ] && [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && REPO_DIR="$CLAUDE_PLUGIN_ROOT"
[ -z "$REPO_DIR" ] && REPO_DIR="${CLAUDE_CARBON_DIR:-$HOME/code/claude-carbon}"

bash "$REPO_DIR/scripts/generate-report.sh"

The script prints the export directory on its final line (`Done. <dir>/`) and a `Totals since ...` line just above it. Show the export path to the user so they can share the PNGs.

Then offer a ready-to-paste social post draft (LinkedIn or X) built ONLY from the numbers on the `Totals since ...` line: CO2e total, cost, the car-km equivalence, session count. Write it in the user's working language. Keep the register strictly factual: numbers and equivalences, no self-congratulation, no green-virtue framing, no hashtag pile (two at most). Do not add a credit line for the tool in the draft; the card's footer already carries the repo and tokenclimate.com attribution. If the user asks for changes, iterate on the draft, never on the numbers.

Read more
Ships withclaude-carbon

Track the carbon footprint of your Claude Code sessions. 1. Install (or update): Or, if you have Node.js: Same command to install and to update to the latest version (both run the same installer). 2. Restart Claude Code.

Get the whole plugin
Stats
161
Stars
16
Forks
Active
Maintenance
Shell
Language
MIT
License
1d ago
Last commit
4mo ago
Created

Repo: gwittebolle/claude-carbon