Agent skill

Carbon Badge

by gwittebolle in gwittebolle/claude-carbon

Generate a shields.io badge of your Claude Code carbon footprint for your READMEs

MITAuto-check passedDevelopment

Install Carbon Badge

skills CLI
$ npx skills add gwittebolle/claude-carbon --skill carbon-badge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gwittebolle/claude-carbon carbon-badge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gwittebolle/claude-carbon.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/carbon-badge .claude/skills/carbon-badge && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
carbon-badge
GitHub stars
211
Token cost
~712 tokens
SKILL.md length
119 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Generate a shields.io badge of your Claude Code carbon footprint for your READMEs

  • Tasks that involve Technical documentation
  • Calls jq and bash

What it does

Carbon Badge is an agent skill from gwittebolle/claude-carbon. Generate a shields.io badge of your Claude Code carbon footprint for your READMEs

Its SKILL.md is about 710 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. The repository describes itself as: claude-carbon: track the carbon footprint of your Claude Code sessions. The licence is MIT.

When your agent uses it

  • Tasks that involve Technical documentation

Example prompts

  • “/carbon-badge”

What it can do on your machine

Read from SKILL.md and the folder at commit d7313ff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Carbon Badge loads about 712 tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 119 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~712

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gwittebolle/claude-carbon at commit d7313ff, republished under its MIT licence (© gwittebolle). 119 words, ~712 tokens.

Download SKILL.mdSave it as .claude/skills/carbon-badge/SKILL.md (or your agent's skills folder).
name
carbon-badge
description
Generate a shields.io badge of your Claude Code carbon footprint for your READMEs

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}")"
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}"; 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.

© gwittebolle, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/carbon-badge of gwittebolle/claude-carbon.

Open the folder on GitHubat commit d7313ff

Compare with similar skills

Carbon Badge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Carbon Badge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Carbon Badge this skillgwittebolle/claude-carbon211—~712Automated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design49k1 repos~7.6kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.5kAutomated safety check: PassGPL-3.0
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    49k GitHub starsUsed in 1 repo~7.6k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check: notes
  • Dark Architecture Diagram Builder

    Cocoon-AI/architecture-diagram-generator

    Creates dark-themed system, cloud, security and network architecture diagrams as self-contained HTML files with inline SVG and CSS.

    7.4k GitHub starsUsed in 1 repo~2.1k tokens
    DevelopmentAuto-check passed

More from gwittebolle/claude-carbon

  • Carbon Card

    gwittebolle/claude-carbon

    Generate shareable PNG report cards of your Claude Code carbon footprint

    211 GitHub stars~967 tokensUpdated 2 days ago
    Auto-check passed
  • Carbon PR

    gwittebolle/claude-carbon

    Post the development footprint of the current branch as a sticky PR comment

    211 GitHub stars~745 tokensUpdated 2 days ago
    Auto-check passed
  • Carbon Report

    gwittebolle/claude-carbon

    Display CO2 emissions report for Claude Code sessions. An agent skill from gwittebolle/claude-carbon.

    211 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Carbon Badge

What does Carbon Badge do?

Generate a shields.io badge of your Claude Code carbon footprint for your READMEs. Carbon Badge is an agent skill from gwittebolle/claude-carbon.

When should I use Carbon Badge?

Carbon Badge fits situations like: tasks that involve Technical documentation.

How do I install Carbon Badge in Claude Code?

Run `npx skills add gwittebolle/claude-carbon --skill carbon-badge -a claude-code`. Or copy the skill folder (skills/carbon-badge in gwittebolle/claude-carbon) into .claude/skills/carbon-badge in your project. Claude Code loads it when a task matches its description.

How do I install Carbon Badge in Codex?

Run `npx skills add gwittebolle/claude-carbon --skill carbon-badge -a codex`. Or copy the skill folder (skills/carbon-badge in gwittebolle/claude-carbon) into .agents/skills/carbon-badge in your project. Codex loads it when a task matches its description.

Can I use Carbon Badge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gwittebolle/claude-carbon --skill carbon-badge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/carbon-badge, .gemini/skills/carbon-badge, .github/skills/carbon-badge and .opencode/skills/carbon-badge in your project.

What does Carbon Badge need to run?

Going by SKILL.md and its folder, Carbon Badge needs the command-line tools its instructions call (jq and bash).

Does Carbon Badge access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Carbon Badge safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Carbon Badge use?

Carbon Badge is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Carbon Badge use?

About 712 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Carbon Badge?

Skills that share tags, products or a category with Carbon Badge: Diagram Design (cathrynlavery/diagram-design, 49k stars), Simple English (moeru-ai/airi, 50k stars), Doc Sync (JetBrains/ideavim, 10k stars) and Mailspring App Screenshots (Foundry376/Mailspring, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Carbon Badge?

gwittebolle (a GitHub user) maintains it in gwittebolle/claude-carbon, which has 211 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.

Source: gwittebolle/claude-carbon on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.