carbon-badge
Generate a shields.io badge of your Claude Code carbon footprint for your READMEs
Skill by gwittebolle
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/gwittebolle-carbon-badge
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/carbon-badge
What's inside
- Skill name
carbon-badge- Description
- Generate a shields.io badge of your Claude Code carbon footprint for your READMEs
- License
- MIT
- Instructions
- 53 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (1)
- SKILL.md
SKILL.md (first lines)
Run the following bash script and present the output to the user.
```bash
#!/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.
# Windows (Git Bash): CLAUDE_* variables and the paths stored in settings.json can
# arrive in the native "C:\Users\..." spelling, which bash cannot open. cygpath
# ships with Git for Windows; everywhere else this is the identity function.
ccp() {
case "${OSTYPE:-}" in msys*|cygwin*) ;; *) printf '%s' "$1"; return 0 ;; esac
case "$1" in
[A-Za-z]:[\\/]*|*\\*) cygpath -u "$1" 2>/dev/null || printf '%s' "$1" ;;
*) printf '%s' "$1" ;;
esac
}
CFG="$(ccp "${CLAUDE_CONFIG_DIR:-$HOME/.claude}")"
# A jq the installer fetched into the data folder (a Mac older than macOS 15 has none)
if ! command -v jq >/dev/null 2>&1 && [ -x "$CFG/claude-carbon/bin/jq" ]; then PATH="$CFG/claude-carbon/bin:$PATH"; fi
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 path, shell-escaped, or in double quotes on Windows:
# unquote, expand ~ and unescape spaces
SL_CMD="${SL_CMD#\"}"; SL_CMD="${SL_CMD%\"}"
SL_CMD="${SL_CMD//\\ / }"; SL_CMD="${SL_CMD/#\~/$HOME}"; SL_CMD="$(ccp "$SL_CMD")"
[ -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="$(ccp "$CLAUDE_PLUGIN_ROOT")"
[ -z "$REPO_DIR" ] && [ -n "${CLAUDE_CARBON_DIR:-}" ] && REPO_DIR="$(ccp "$CLAUDE_CARBON_DIR")"
if [ -z "$REPO_DIR" ]; then
# Pure marketplace installs reach here: no statusLine.command in settings.json and
# no CLAUDE_PLUGIN_ROOT in a skill's bash env. Pick the newest cached plugin copy,
# keeping only candidates that ship the badge script.
CACHE_LATEST=""
for D in "$CFG/plugins/cache"/*/claude-carbon/*/; do
[ -f "${D}scripts/generate-badge.sh" ] || continue
if [ -z "$CACHE_LATEST" ] || [ "$(printf '%s\n%s\n' "$CACHE_LATEST" "$D" | sort -V | tail -1)" = "$D" ]; then
CACHE_LATEST="$D"
fi
done
[ -n "$CACHE_LATEST" ] && REPO_DIR="${CACHE_LATEST%/}"
fi
[ -z "$REPO_DIR" ] && REPO_DIR="$HOME/code/claude-carbon"
bash "$REPO_DIR/scripts/generate-badge.sh"
```
The script prints a ready-to-paste markdown snippet, the raw badge URL and a short note on where the badge belongs. Show all of it exactly as printed — never recompute, reformat or re-escape the number, the month or the URL. The badge is one developer's total, dated with the month it was generated, and it links to the methodology. It belongs in the user's profile README or a personal project, not in a team or organisation repository. The badge is a static image, so re-running `/carbon-badge` is how they refresh the figure and its month.
If the script is missing (an install that predates the badge), suggest `/carbon-update`.From gwittebolle/claude-carbon, MIT.
More from gwittebolle/claude-carbon
- 0.780score
carbon-card
gwittebolle
Generate shareable PNG report cards of your Claude Code carbon footprint
SkillAFreshness: A★ 226Claude Code +9 - 0.780score
carbon-update
gwittebolle
Update claude-carbon to the latest version (a clone install also re-prices its history, CO2-only)
SkillAFreshness: A★ 226Claude Code +9 - 0.779score
carbon-panel
gwittebolle
Open the carbon pane, your CO2 molecule and the warming stripes of your sessions
SkillAFreshness: A★ 226Claude Code +9 - 0.777score
carbon-report
gwittebolle
Display CO2 emissions report for Claude Code sessions
SkillAFreshness: A★ 226Claude Code +9 - 0.776score
carbon-pr
gwittebolle
Post the development footprint of the current branch as a sticky PR comment
SkillAFreshness: A★ 226Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 226
- Forks
- 18
- Open issues
- 0
- Last commit (this folder)
- Oct 21, 2026 (7 days ago)
- Last release
- Oct 21, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/gwittebolle/claude-carbon
- Website
- tokenclimate.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from gwittebolle
- 0.780score
carbon-card
gwittebolle
Generate shareable PNG report cards of your Claude Code carbon footprint
SkillAFreshness: A★ 226Claude Code +9 - 0.780score
carbon-update
gwittebolle
Update claude-carbon to the latest version (a clone install also re-prices its history, CO2-only)
SkillAFreshness: A★ 226Claude Code +9 - 0.779score
carbon-panel
gwittebolle
Open the carbon pane, your CO2 molecule and the warming stripes of your sessions
SkillAFreshness: A★ 226Claude Code +9 - 0.777score
carbon-report
gwittebolle
Display CO2 emissions report for Claude Code sessions
SkillAFreshness: A★ 226Claude Code +9 - 0.776score
carbon-pr
gwittebolle
Post the development footprint of the current branch as a sticky PR comment
SkillAFreshness: A★ 226Claude Code +9
Cite this page
carbon-badge skill. Agent Mart. https://agentmart.dev/skills/gwittebolle-carbon-badge (last updated 2026-10-24)