DEV Community

S M Tahosin
S M Tahosin

Posted on

EcoBot: A Personal Carbon Footprint Tracker Built with OpenClaw

OpenClaw Challenge Submission 🦞

This is a submission for the OpenClaw Challenge.

What I Built

EcoBot is an OpenClaw skill that turns your personal AI assistant into an environmental impact advisor. It tracks your daily habits, estimates your carbon footprint, and gives actionable tips to live greener.

Features:

  • Carbon Footprint Calculator — answer questions about transport, diet, energy, and shopping to get an annual CO2 estimate with letter grade
  • Eco Tip of the Day — practical sustainability tips with estimated CO2 savings
  • Product Eco Check — uses OpenClaw's web_search to look up environmental impact of any product
  • Habit Logger — tracks green actions in a local JSON file using read/write tools
  • Weekly Green Report — summarizes your eco progress and trends over time

How I Used OpenClaw

EcoBot is built as a pure SKILL.md — no plugin code needed. It leverages OpenClaw's built-in tools:

Skill Architecture

---
name: ecobot
description: Personal carbon footprint tracker and green living advisor.
---
# EcoBot Skill
When the user asks about their carbon footprint...
Enter fullscreen mode Exit fullscreen mode

Tools Used:

  1. web_search — Fetches real-time carbon data for products and activities
  2. read / write — Maintains a persistent eco habit log at ~/.openclaw/workspace/eco_log.json
  3. exec — Runs calculations when needed

What Makes It Work

The beauty of OpenClaw skills is that they're just instructions in Markdown. No build step, no dependencies, no API keys to manage. The skill file tells the agent when and how to act:

  • When someone says "I biked to work" → log it with CO2 savings
  • When someone asks "what's my footprint?" → walk through the assessment
  • When someone mentions a product → search for its environmental impact

The agent already has the tools. The skill just teaches it the domain knowledge.

Installation

# Copy skill to workspace
cp -r skills/ecobot ~/.openclaw/workspace/skills/
# Restart gateway
openclaw gateway restart
# Test it
openclaw agent --message "What's my carbon footprint?"
Enter fullscreen mode Exit fullscreen mode

Demo

Here's what a conversation looks like:

User: What's my carbon footprint?

EcoBot: Let's figure that out! I'll ask a few quick questions:

1. How do you mainly get around?
   - Gas car, Electric car, Public transit, or Bike/Walk

User: I drive a gas car, about 30km daily

EcoBot: Got it. What about your diet?

User: I eat meat a few times a week

EcoBot: And your home energy — fossil fuels, mixed grid, or renewable?

User: Mixed grid

EcoBot: Last one — shopping habits?

User: Average, I'd say

EcoBot: Here's your assessment:

🌍 Your Eco Score: C+ (52/100)
📊 Estimated Annual CO2: ~8,300 kg

Breakdown:
- Transport: 4,600 kg (55%) ⚠️
- Diet: 2,200 kg (27%) ⚠️
- Energy: 1,200 kg (14%) ✓
- Shopping: 300 kg (4%) ✓

Tips:
1. Carpooling 2x/week could save ~900 kg CO2/year
2. One meat-free day per week saves ~200 kg CO2/year
3. Switching to LED bulbs saves ~100 kg CO2/year

Shall I log this and track your progress?
Enter fullscreen mode Exit fullscreen mode
User: I biked to work today!

EcoBot: 🚲 Logged! That's ~2.3 kg CO2 saved vs driving.
You've biked 3 times this week — that's 6.9 kg saved!
Enter fullscreen mode Exit fullscreen mode

What I Learned

  1. Skills are surprisingly powerful — a single Markdown file can create a complete feature with personality, domain knowledge, and tool orchestration
  2. Built-in tools eliminate boilerplateweb_search, read, write meant zero API integration work
  3. The agent generalizes well — even with simple instructions, OpenClaw handles edge cases like partial information or follow-up questions naturally
  4. Persistent state is easy — using read/write to maintain a JSON log gives the skill memory across conversations

GitHub logo x-tahosin / openclaw-ecobot

EcoBot - OpenClaw skill for personal carbon footprint tracking and green living advice

EcoBot - OpenClaw Skill

A personal carbon footprint tracker and green living advisor, built as an OpenClaw skill.

What It Does

  • Carbon Footprint Check — estimates your annual CO2 based on daily habits
  • Eco Tip of the Day — actionable sustainability tips with CO2 savings estimates
  • Product Eco Check — looks up environmental impact of products via web search
  • Habit Logger — tracks your green actions over time in a local JSON log
  • Weekly Green Report — summarizes your eco progress and trends

Install

Copy the skill to your OpenClaw workspace:

cp -r skills/ecobot ~/.openclaw/workspace/skills/
openclaw gateway restart
Enter fullscreen mode Exit fullscreen mode

Usage

> "What's my carbon footprint?"
> "Give me an eco tip"
> "How bad is fast fashion for the environment?"
> "I biked to work today"
> "Show me my weekly green report"

Built for

OpenClaw Challenge on DEV.to






Top comments (0)