Co2 Carbon Footprint logo

Co2 Carbon Footprint

Community
datadrivenconstruction
co2-carbon-footprint

Calculate and track CO2 emissions and carbon footprint for construction projects.

Overview

Publisherdatadrivenconstruction
RepositoryDDC_Skills_for_AI_Agents_in_Construction
Skill nameco2-carbon-footprint
Stars
365
Forks
91
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by datadrivenconstruction on GitHub. Read the source before you install it.

Installation

Install the Co2 Carbon Footprint AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/main/1_DDC_Toolkit/Sustainability/co2-carbon-footprint
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction.git /tmp/DDC_Skills_for_AI_Agents_in_Construction
mkdir -p .claude/skills
cp -r /tmp/DDC_Skills_for_AI_Agents_in_Construction/1_DDC_Toolkit/Sustainability/co2-carbon-footprint .claude/skills/co2-carbon-footprint
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Co2 Carbon Footprint in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Co2 Carbon Footprint on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Co2 Carbon Footprint is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CO2 Carbon Footprint Tracker

Technical Implementation

python
import pandas as pd
from datetime import date
from typing import Dict, Any, List
from dataclasses import dataclass, field
from enum import Enum


class EmissionScope(Enum):
    SCOPE_1 = "scope_1"  # Direct emissions
    SCOPE_2 = "scope_2"  # Indirect from energy
    SCOPE_3 = "scope_3"  # Value chain emissions


class MaterialCategory(Enum):
    CONCRETE = "concrete"
    STEEL = "steel"
    ALUMINUM = "aluminum"
    TIMBER = "timber"
    GLASS = "glass"
    INSULATION = "insulation"
    OTHER = "other"


@dataclass
class EmissionFactor:
    material: str
    category: MaterialCategory
    factor: float  # kg CO2e per unit
    unit: str
    source: str


@dataclass
class EmissionEntry:
    entry_id: str
    material: str
    quantity: float
    unit: str
    emission_factor: float
    total_kgco2: float
    scope: EmissionScope
    lifecycle_stage: str  # A1-A3, A4, A5, etc.


class CarbonFootprintTracker:
    def __init__(self, project_name: str, gfa_m2: float):
        self.project_name = project_name
        self.gfa_m2 = gfa_m2
        self.entries: List[EmissionEntry] = []
        self.factors = self._load_default_factors()
        self._counter = 0

    def _load_default_factors(self) -> Dict[str, EmissionFactor]:
        factors = {
            'concrete_m3': EmissionFactor('Concrete C30/37', MaterialCategory.CONCRETE, 250, 'm3', 'EPD Generic'),
            'steel_kg': EmissionFactor('Structural Steel', MaterialCategory.STEEL, 2.5, 'kg', 'EPD Generic'),
            'rebar_kg': EmissionFactor('Reinforcement', MaterialCategory.STEEL, 1.99, 'kg', 'EPD Generic'),
            'aluminum_kg': EmissionFactor('Aluminum', MaterialCategory.ALUMINUM, 8.0, 'kg', 'EPD Generic'),
            'timber_m3': EmissionFactor('CLT Timber', MaterialCategory.TIMBER, -500, 'm3', 'EPD Generic'),
            'glass_m2': EmissionFactor('Double Glazing', MaterialCategory.GLASS, 35, 'm2', 'EPD Generic'),
        }
        return factors

    def add_material(self, material_key: str, quantity: float,
                    lifecycle_stage: str = "A1-A3") -> EmissionEntry:
        if material_key not in self.factors:
            return None

        self._counter += 1
        factor = self.factors[material_key]
        total = quantity * factor.factor

        entry = EmissionEntry(
            entry_id=f"EM-{self._counter:04d}",
            material=factor.material,
            quantity=quantity,
            unit=factor.unit,
            emission_factor=factor.factor,
            total_kgco2=total,
            scope=EmissionScope.SCOPE_3,
            lifecycle_stage=lifecycle_stage
        )
        self.entries.append(entry)
        return entry

    def add_custom_emission(self, description: str, quantity: float, unit: str,
                           factor: float, scope: EmissionScope,
                           stage: str = "A1-A3") -> EmissionEntry:
        self._counter += 1
        entry = EmissionEntry(
            entry_id=f"EM-{self._counter:04d}",
            material=description,
            quantity=quantity,
            unit=unit,
            emission_factor=factor,
            total_kgco2=quantity * factor,
            scope=scope,
            lifecycle_stage=stage
        )
        self.entries.append(entry)
        return entry

    def get_total_emissions(self) -> float:
        return sum(e.total_kgco2 for e in self.entries)

    def get_kgco2_per_m2(self) -> float:
        if self.gfa_m2 == 0:
            return 0
        return self.get_total_emissions() / self.gfa_m2

    def get_by_category(self) -> Dict[str, float]:
        by_category = {}
        for entry in self.entries:
            # Simplified category mapping
            for cat in MaterialCategory:
                if cat.value in entry.material.lower():
                    by_category[cat.value] = by_category.get(cat.value, 0) + entry.total_kgco2
                    break
            else:
                by_category['other'] = by_category.get('other', 0) + entry.total_kgco2
        return by_category

    def get_by_stage(self) -> Dict[str, float]:
        by_stage = {}
        for entry in self.entries:
            stage = entry.lifecycle_stage
            by_stage[stage] = by_stage.get(stage, 0) + entry.total_kgco2
        return by_stage

    def get_summary(self) -> Dict[str, Any]:
        total = self.get_total_emissions()
        return {
            'project': self.project_name,
            'gfa_m2': self.gfa_m2,
            'total_kgco2': round(total, 2),
            'total_tonco2': round(total / 1000, 2),
            'kgco2_per_m2': round(self.get_kgco2_per_m2(), 2),
            'entries_count': len(self.entries),
            'by_stage': self.get_by_stage()
        }

    def export_report(self, output_path: str):
        data = [{
            'ID': e.entry_id,
            'Material': e.material,
            'Quantity': e.quantity,
            'Unit': e.unit,
            'Factor': e.emission_factor,
            'kg CO2e': round(e.total_kgco2, 2),
            'Stage': e.lifecycle_stage
        } for e in self.entries]
        pd.DataFrame(data).to_excel(output_path, index=False)

Quick Start

python
tracker = CarbonFootprintTracker("Office Tower", gfa_m2=25000)

# Add materials
tracker.add_material('concrete_m3', 5000)
tracker.add_material('steel_kg', 500000)
tracker.add_material('rebar_kg', 150000)
tracker.add_material('timber_m3', 200)

summary = tracker.get_summary()
print(f"Total: {summary['total_tonco2']} ton CO2e")
print(f"Per m2: {summary['kgco2_per_m2']} kg CO2e/m2")

Resources

  • DDC Book: Chapter 3.3 - CO2 Estimation

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Co2 Carbon Footprint AI skill do?

Calculate and track CO2 emissions and carbon footprint for construction projects.

Why use Co2 Carbon Footprint on TypingMind?

Because you install it once and use it with any model. Co2 Carbon Footprint is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Co2 Carbon Footprint in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/main/1_DDC_Toolkit/Sustainability/co2-carbon-footprint. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Co2 Carbon Footprint?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Co2 Carbon Footprint?

As many as you like. As long as a model supports skills, you can use Co2 Carbon Footprint with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Co2 Carbon Footprint AI skill free?

Yes. It is published on GitHub by datadrivenconstruction under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇