Greenbelt — Development skill for Claude Code
Greenbelt is Claude Code hooks that track token usage across Claude Code sessions and plants trees to reduce your CO2 impact.
How to install Greenbelt
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mikhail-tokarev/greenbelt and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Greenbelt does
Greenbelt is Claude Code hooks that track token usage across Claude Code sessions and plants trees to reduce your CO2 impact.
Alternatives in Development
- Doctor — Environment diagnostics with interactive fixes — providers, auth, RTK, hooks, token optimization 2.8k ★
- Cc Bar — Native macOS menu bar app: track quota, usage and cost for Codex (multi-account) and Claude Code, from your me 119 ★
- Xc MCP — XCode CLI MCP: Convenience wrapper for Xcode CLI tools & iOS Simulator 82 ★
README
Greenbelt 🌱
Greenbelt tracks token usage across Claude Code sessions and plants trees whenever your token usage crosses a configurable threshold (1M tokens by default). It uses [Ecologi API](https://ecologi.com/) and runs as a Claude Code hook — no manual steps required after setup.
[Ecologi](https://ecologi.com) is a climate action platform that helps individuals and businesses take measurable, credible action for climate and nature. Fund tree planting from €0.80 (£0.60) per tree. File a feature request if you want to use a different provider.
Get started
Copy and paste the AI prompt:
Clone https://github.com/mikhail-tokarev/greenbelt into the ~/.claude folder and add the hooks as described in README.md
**1. Register the hooks**
Add the following to your Claude Code settings (`~/.claude/settings.json`):
[!IMPORTANT] Replace `/path/to/greenbelt` with the absolute path where you cloned the repo.
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "python3 /path/to/greenbelt/session_hook.py"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "python3 /path/to/greenbelt/session_hook.py"
}
]
}
]
}
}
**2. Configure Ecologi**
On the first run, Greenbelt creates `~/.claude/greenbelt.toml` automatically:
provider = "ecologi"
threshold = 1_000_000 # plant trees every 1M tokens
[ecologi]
api_key = "" # get it from https://app.ecologi.com/impact-api
Fill in your [Ecologi API](https://app.ecologi.com/impact-api) key. Adjust `threshold` to control how often trees are planted.
**That's it.** From this point on, Greenbelt runs silently in the background. At the start of each session it shows how many trees you've planted so far.
Uninstall
- Remove the hooks — delete the
SessionStartand `SessionEnd
Related Skills
Context Budget
Analyze context window usage across agents, skills, MCP servers, and rules to find optimization opportunities.
Claude Session Visualizer
new Live visualization dashboard for Claude Code sessions with execution trees, token cost tracking, thinking
Token Guard
Automatic Claude Code hooks to reduce token waste — block heavy files, context warnings, cost logging
ClaudeTokenSAP
⚡ Claude Code plugin to reduce token usage by up to 70% with smart compression for logs, JSON, and large conte
Tokenmiser
Reduce Claude Code token usage by 80 percent with automated codebase indexing and smart ignore rules for effic
Run Co 2 Welcome Flow
Run Track Co2: Welcome + First Value — sixth-grade readable playbook for community
Related Agents
Context Optimizer
Meta utility agent for token and context optimization. Spawn when needing to compress agent prompts, optimize
Performance Monitor
Monitor agent execution, track token usage, measure response quality, and optimize workflows
Usage Scout
Read-only scout for session, token, and cost code in this FastAPI tracker. Use when the user asks where usage