Track your AI carbon footprint and plant trees to compensate via Tree-Nation
npx claudepluginhub jeremiesamson/green-code --plugin green-codeConfigure the green-code plugin - set Tree-Nation API key, planter ID, mode (auto/manual), CO2 threshold, and energy mix. Use when the user wants to set up or modify green-code settings.
Plant trees via Tree-Nation to offset your AI carbon footprint. Use when the user wants to compensate their CO2 emissions. Accepts optional tree count argument.
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.
Track your AI carbon footprint and plant trees to compensate.
/plugin marketplace add jsamson/green-code
/plugin install green-code@green-code-marketplace
On first launch, the plugin asks for your Tree-Nation API token and preferences.
| Command | Description |
|---|---|
/green:status | View your carbon footprint and tree balance |
/green:plant | Plant trees to offset accumulated CO2 |
/green:plant 3 | Plant a specific number of trees |
/green:config | View current configuration |
/green:config mode auto | Switch to auto-plant mode |
At each session end, the plugin reads ~/.claude/stats-cache.json and computes the delta since the last check.
| Token type | Wh per token | Rationale |
|---|---|---|
| Output (generation) | 0.002 | Full GPU forward pass + sampling |
| Input (fresh) | 0.0005 | Prefill, parallelizable |
| Cache creation | 0.0005 | Same as prefill |
| Cache read | 0.00002 | Memory I/O, minimal compute |
Trees are planted via the Tree-Nation REST API. You need a Tree-Nation account and API token.
stats-cache.json may not update in real-time in all Claude Code versionsjq (JSON processor) -- install: sudo apt install jq / brew install jqbc (calculator) -- usually pre-installed on Linux/macOScurl -- usually pre-installedMIT
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Persistent memory system for Claude Code - seamlessly preserve context across sessions
Intelligent prompt optimization using skill-based architecture. Enriches vague prompts with research-based clarifying questions before Claude Code executes them