Skip to content
Monitoring
Skill

/carbon-update

Update claude-carbon to the latest version and re-price history (CO2-only)

From plugin
claude-carbon
1553 skills2 hooks
Install
$ npx -y skills add gwittebolle/claude-carbon --skill carbon-update --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-update

Context preview

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

Update claude-carbon to the latest version and re-price history (CO2-only)

SKILL.md

carbon-update.SKILL.md
name: carbon-update
description: Update claude-carbon to the latest version and re-price history (CO2-only)

Run the following bash script exactly as written and present its output to the user. Do not paraphrase. It updates the user's claude-carbon install (dirty-safe `git pull`), refreshes setup, and re-prices stored sessions with the new factors.

#!/usr/bin/env bash
# Locate the install that is actually wired into the status line, then run its updater.
REPO_DIR=""
SETTINGS="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json"
if command -v jq >/dev/null 2>&1 && [ -f "$SETTINGS" ]; then
  SL_CMD="$(jq -r '.statusLine.command // empty' "$SETTINGS" 2>/dev/null)"
  # statusLine.command stores a shell-escaped path: expand ~ and unescape spaces
  SL_CMD="${SL_CMD//\\ / }"; SL_CMD="${SL_CMD/#\~/$HOME}"
  if [ -n "$SL_CMD" ] && [ -f "$SL_CMD" ]; then
    REPO_DIR="$(cd "$(dirname "$SL_CMD")/.." 2>/dev/null && pwd)"
  fi
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}"

if [ -f "${REPO_DIR}/scripts/update.sh" ]; then
  bash "${REPO_DIR}/scripts/update.sh"
else
  echo "claude-carbon updater not found at ${REPO_DIR}/scripts/update.sh"
  echo "Re-run the installer to update:"
  echo "  curl -fsSL https://raw.githubusercontent.com/gwittebolle/claude-carbon/main/install.sh | bash"
fi
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