co2-carbon-footprint
Calculate CO2 emissions and carbon footprint from BIM model data. Analyze embodied carbon by material, element, and building system.
Install / Use
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill co2-carbon-footprintInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of co2-carbon-footprint
co2-carbon-footprint scores 91/100 on our quality scale, 1201st of 4,644 Development & Engineering skills we index (top 26%).
Its SKILL.md is 16 KB long, well organised into 17 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
It has 333 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 44 days ago, so co2-carbon-footprint is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
co2-carbon-footprint compared with similar skills
All 4 of these similar skills score higher than co2-carbon-footprint; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| co2-carbon-footprint (this skill)by datadrivenconstruction | 91 | 333 | 44d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 91.2k | 19d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.4k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 45.0k | 1d ago | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 5d ago | CLAUDE.md |
Frequently asked questions
- How do I install co2-carbon-footprint?
- Run
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill co2-carbon-footprint. The install tabs above show the steps for each supported agent. - Which AI agents does co2-carbon-footprint work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is co2-carbon-footprint safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is co2-carbon-footprint still maintained?
- The repository was last updated 44 days ago, so co2-carbon-footprint is actively maintained.
Skill content
View source on GitHubname: "co2-carbon-footprint" description: "Calculate CO2 emissions and carbon footprint from BIM model data. Analyze embodied carbon by material, element, and building system." homepage: "https://datadrivenconstruction.io" metadata: {"openclaw": {"emoji": "🔍", "os": ["darwin", "linux", "win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"]}}}
CO2 Carbon Footprint Calculator
Business Case
Problem Statement
Sustainability requirements demand carbon tracking:
- Need to quantify embodied carbon
- Material selection impact unclear
- Reporting requirements increasing
- No integration with BIM workflow
Solution
Calculate CO2 emissions from BIM quantities using EPD (Environmental Product Declaration) data and carbon coefficients.
Business Value
- Sustainability - Meet green building requirements
- Design optimization - Identify high-carbon elements
- Reporting - Automated carbon reports
- Decision support - Compare material alternatives
Technical Implementation
import pandas as pd
from datetime import datetime
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass, field
from enum import Enum
class LifeCycleStage(Enum):
"""EN 15978 Life Cycle Stages."""
A1_A3 = "a1_a3" # Product stage
A4 = "a4" # Transport to site
A5 = "a5" # Construction
B1_B7 = "b1_b7" # Use stage
C1_C4 = "c1_c4" # End of life
D = "d" # Beyond system boundary
class MaterialCategory(Enum):
"""Material categories for carbon calculation."""
CONCRETE = "concrete"
STEEL = "steel"
TIMBER = "timber"
ALUMINUM = "aluminum"
GLASS = "glass"
BRICK = "brick"
INSULATION = "insulation"
GYPSUM = "gypsum"
OTHER = "other"
@dataclass
class CarbonCoefficient:
"""Carbon emission coefficient for a material."""
material: str
category: MaterialCategory
kgco2_per_unit: float # kg CO2e per unit
unit: str # kg, m3, m2, etc.
stage: LifeCycleStage
source: str # EPD reference
uncertainty: float = 0.1 # 10% default uncertainty
@dataclass
class CarbonResult:
"""Carbon calculation result for an element."""
element_id: str
element_name: str
material: str
category: MaterialCategory
quantity: float
unit: str
kgco2_per_unit: float
total_kgco2: float
stage: LifeCycleStage
level: str = ""
notes: str = ""
@dataclass
class CarbonSummary:
"""Carbon footprint summary."""
total_kgco2: float
total_tonco2: float
by_material: Dict[str, float]
by_category: Dict[str, float]
by_stage: Dict[str, float]
by_level: Dict[str, float]
element_count: int
gfa: float # Gross Floor Area
kgco2_per_m2: float
class CarbonCoefficientDatabase:
"""Database of carbon emission coefficients."""
def __init__(self):
self.coefficients: List[CarbonCoefficient] = []
self._load_default_coefficients()
def _load_default_coefficients(self):
"""Load standard carbon coefficients (EPD-based)."""
# Concrete products
self.add_coefficient(CarbonCoefficient(
material="Concrete C30/37", category=MaterialCategory.CONCRETE,
kgco2_per_unit=250, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Concrete"
))
self.add_coefficient(CarbonCoefficient(
material="Concrete C40/50", category=MaterialCategory.CONCRETE,
kgco2_per_unit=300, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - High Strength Concrete"
))
self.add_coefficient(CarbonCoefficient(
material="Reinforcement Steel", category=MaterialCategory.STEEL,
kgco2_per_unit=1.99, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Rebar"
))
# Steel products
self.add_coefficient(CarbonCoefficient(
material="Structural Steel", category=MaterialCategory.STEEL,
kgco2_per_unit=2.5, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Structural Steel"
))
self.add_coefficient(CarbonCoefficient(
material="Steel Sheet", category=MaterialCategory.STEEL,
kgco2_per_unit=2.3, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Sheet Metal"
))
# Timber products
self.add_coefficient(CarbonCoefficient(
material="Softwood Timber", category=MaterialCategory.TIMBER,
kgco2_per_unit=-500, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - CLT (carbon sequestration)"
))
self.add_coefficient(CarbonCoefficient(
material="Glulam", category=MaterialCategory.TIMBER,
kgco2_per_unit=-350, unit="m3", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Glued Laminated Timber"
))
# Aluminum
self.add_coefficient(CarbonCoefficient(
material="Aluminum Profile", category=MaterialCategory.ALUMINUM,
kgco2_per_unit=8.0, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Aluminum"
))
# Glass
self.add_coefficient(CarbonCoefficient(
material="Float Glass", category=MaterialCategory.GLASS,
kgco2_per_unit=15.0, unit="m2", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Float Glass"
))
self.add_coefficient(CarbonCoefficient(
material="Double Glazing Unit", category=MaterialCategory.GLASS,
kgco2_per_unit=35.0, unit="m2", stage=LifeCycleStage.A1_A3,
source="Generic EPD - IGU"
))
# Masonry
self.add_coefficient(CarbonCoefficient(
material="Clay Brick", category=MaterialCategory.BRICK,
kgco2_per_unit=0.24, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Clay Brick"
))
# Insulation
self.add_coefficient(CarbonCoefficient(
material="Mineral Wool", category=MaterialCategory.INSULATION,
kgco2_per_unit=1.2, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Mineral Wool"
))
self.add_coefficient(CarbonCoefficient(
material="EPS Insulation", category=MaterialCategory.INSULATION,
kgco2_per_unit=3.5, unit="kg", stage=LifeCycleStage.A1_A3,
source="Generic EPD - EPS"
))
# Gypsum
self.add_coefficient(CarbonCoefficient(
material="Gypsum Board", category=MaterialCategory.GYPSUM,
kgco2_per_unit=2.8, unit="m2", stage=LifeCycleStage.A1_A3,
source="Generic EPD - Plasterboard"
))
def add_coefficient(self, coefficient: CarbonCoefficient):
"""Add carbon coefficient to database."""
self.coefficients.append(coefficient)
def find_coefficient(self, material_name: str,
stage: LifeCycleStage = LifeCycleStage.A1_A3) -> Optional[CarbonCoefficient]:
"""Find matching coefficient for material."""
material_lower = material_name.lower()
# Direct match
for coef in self.coefficients:
if coef.material.lower() == material_lower and coef.stage == stage:
return coef
# Partial match
for coef in self.coefficients:
if material_lower in coef.material.lower() or coef.material.lower() in material_lower:
if coef.stage == stage:
return coef
# Category match
category = self._guess_category(material_name)
for coef in self.coefficients:
if coef.category == category and coef.stage == stage:
return coef
return None
def _guess_category(self, material_name: str) -> MaterialCategory:
"""Guess material category from name."""
name_lower = material_name.lower()
if any(w in name_lower for w in ['concrete', 'cement', 'mortar']):
return MaterialCategory.CONCRETE
if any(w in name_lower for w in ['steel', 'iron', 'metal']):
return MaterialCategory.STEEL
if any(w in name_lower for w in ['wood', 'timber', 'lumber', 'plywood', 'clt']):
return MaterialCategory.TIMBER
if any(w in name_lower for w in ['aluminum', 'aluminium']):
return MaterialCategory.ALUMINUM
if any(w in name_lower for w in ['glass', 'glazing']):
return MaterialCategory.GLASS
if any(w in name_lower for w in ['brick', 'masonry', 'block']):
return MaterialCategory.BRICK
if any(w in name_lower for w in ['insulation', 'wool', 'foam', 'eps', 'xps']):
return MaterialCategory.INSULATION
if any(w in name_lower for w in ['gypsum', 'drywall', 'plaster']):
return MaterialCategory.GYPSUM
return MaterialCategory.OTHER
class CO2FootprintCalculator:
"""Calculate carbon footprint from BIM data."""
def __init__(self, coefficient_db: CarbonCoefficientDatabase = None):
self.db = coefficient_db or CarbonCoefficientDatabase()
self.results: List[CarbonResult] = []
self.warnings: List[str] = []
def calculate_element(self, element: Dict[str, Any],
stage: LifeCycleStage = LifeCycleStage.A1_A3) -> Optional[CarbonResult]:
"""Calculate carbon for single element."""
material = element.get('material', '')
if not material:
self.warnings.append(f"Element {element.get('element_id')} has no material")
return None
coefficient = self.db.find_coefficient(material, stage)
if not coefficient:
self.warnings.append(f"No coefficient found for material: {material}")
return None
# Get quantity in correct unit
quantity = self._get_quantity(element, coefficient.unit)
if quantity is None or quantity <= 0:
return None
total_kgco2 = quantity * coefficient.kgco2_per_unit
result = CarbonResult(
element_id=str(element.get('element_id', '')),
element_name=str(element.get('name', '')),
material=material,
category=coefficient.category,
quantity=quantity,
unit=coefficient.unit,
kgco2_per_unit=coefficient.kgco2_per_unit,
total_kgco2=total_kgco2,
stage=stage,
level=str(element.get('level', ''))
)
self.results.append(result)
return result
def _get_quantity(self, element: Dict[str, Any], unit: str) -> Optional[float]:
"""Get quantity in required unit."""
unit_lower = unit.lower()
if unit_lower == 'm3':
return float(element.get('volume', 0) or 0)
elif unit_lower == 'm2':
return float(element.get('area', 0) or 0)
elif unit_lower in ['kg', 'kilogram']:
# Try weight, then estimate from volume
weight = element.get('weight', 0)
if weight:
return float(weight)
# Estimate from volume with density
volume = element.get('volume', 0)
if volume:
density = self._estimate_density(element.get('material', ''))
return float(volume) * density
elif unit_lower in ['m', 'meter']:
return float(element.get('length', 0) or 0)
return None
def _estimate_density(self, material: str) -> float:
"""Estimate material density in kg/m3."""
material_lower = material.lower()
densities = {
'concrete': 2400,
'steel': 7850,
'timber': 500,
'aluminum': 2700,
'glass': 2500,
'brick': 1800,
'gypsum': 800
}
for key, density in de
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
91.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
45.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
