co2-carbon-footprint

co2-carbon-footprint is a skill for Claude Code, Codex from jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction. It costs 30 tokens per session (3,797 once invoked), scanned A, a copy of co2-carbon-footprint, MIT.

A calculator for estimating carbon emissions from BIM model data. BIM, or building information modelling, is digital project information describing a building’s parts and materials; the calculator uses quantities, material data, and EPDs, which are published environmental impact declarations.

In plain words
What is it for?
Use it to analyse emissions by material, building element, or building system, compare alternatives, identify high-carbon parts, and prepare carbon reports.
Why use it?
It helps quantify embodied carbon—the emissions associated with producing, transporting, constructing, using, and disposing of building materials—when material choices and reporting requirements need comparison.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to analyse emissions by material, building element, or building system, compare alternatives, identify high-carbon parts, and prepare carbon reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/co2-carbon-footprint
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction --skill co2-carbon-footprint
Clone the repo
git clone --depth 1 https://github.com/jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for co2-carbon-footprint

README.md
[![agentmods](https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/co2-carbon-footprint/github.svg)](https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/co2-carbon-footprint)
Your own site
<a href="https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/co2-carbon-footprint"><img src="https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/co2-carbon-footprint/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for co2-carbon-footprint

Your own site · 80×15
<a href="https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/co2-carbon-footprint"><img src="https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/co2-carbon-footprint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,797 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.03797
Opus 5 $0.00015 $0.01899
Sonnet 5 $0.00006 $0.00759
Haiku 4.5 $0.00003 $0.00380

Measured 12d ago against content hash 1589910a771b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

co2-carbon-footprint scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to co2-carbon-footprint — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

1_DDC_Toolkit/BIM-Analysis/co2-carbon-footprint/SKILL.md · 456 lines

How it starts

The opening of the file, as written. The whole thing — 456 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 densities.items():
            if key in material_lower:
                return density

        return 1500  # Default density

    def calculate_from_dataframe(self, df: pd.DataFrame,
                                 stage: LifeCycleStage = LifeCycleStage.A1_A3) -> List[CarbonResult]:
        """Calculate carbon for all elements in DataFrame."""
        self.results = []
        self.warnings = []

        for _, row in df.iterrows():
            self.calculate_element(row.to_dict(), stage)

        return self.results

    def get_summary(self, gfa: float = 0) -> CarbonSummary:
        """Generate carbon footprint summary."""
        by_material = {}
        by_category = {}
        by_stage = {}
        by_level = {}

        for result in self.results:
            # By material
            by_material[result.material] = by_material.get(result.material, 0) + result.total_kgco2

            # By category
            cat = result.category.value
            by_category[cat] = by_category.get(cat, 0) + result.total_kgco2

            # By stage
            stg = result.stage.value
            by_stage[stg] = by_stage.get(stg, 0) + result.total_kgco2

            # By level
            if result.level:
                by_level[result.level] = by_level.get(result.level, 0) + result.total_kgco2

        total_kgco2 = sum(r.total_kgco2 for r in self.results)

        return CarbonSummary(
            total_kgco2=round(total_kgco2, 2),
            total_tonco2=round(total_kgco2 / 1000, 2),
            by_material=by_material,
            by_category=by_category,
            by_stage=by_stage,
            by_level=by_level,
            element_count=len(self.results),
            gfa=gfa,
            kgco2_per_m2=round(total_kgco2 / gfa, 2) if gfa > 0 else 0
        )

    def export_results(self, output_path: str):
        """Export results to Excel."""
        with pd.ExcelWriter(output_path, engine='openpyxl') as writer:
            # Detailed results
            results_df = pd.DataFrame([{
                'Element ID': r.element_id,
                'Element Name': r.element_name,
                'Material': r.material,
                'Category': r.category.value,
                'Quantity': r.quantity,
                'Unit': r.unit,
                'kg CO2e/unit': r.kgco2_per_unit,
                'Total kg CO2e': round(r.total_kgco2, 2),
                'Level': r.level
            } for r in self.results])

            results_df.to_excel(writer, sheet_name='Details', index=False)

            # Summary
            summary = self.get_summary()
            summary_df = pd.DataFrame([
                {'Metric': 'Total kg CO2e', 'Value': summary.total_kgco2},
                {'Metric': 'Total ton CO2e', 'Value': summary.total_tonco2},
                {'Metric': 'Elements Analyzed', 'Value': summary.element_count}
            ])
            summary_df.to_excel(writer, sheet_name='Summary', index=False)

        return output_path

Read the full file on GitHub · 456 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 456 lines · 30 tokens per session scan A 1589910a771b

Subscribe to this mod's changes

co2-carbon-footprint is a skill published in the GitHub repository jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction (2 stars, last pushed 6mo ago), licensed MIT. It adds 30 tokens to every session and 3,797 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to co2-carbon-footprint, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

K-Dense-AI/scientific-agent-skills · 83 tokens

phylogenetics

Build and analyze phylogenetic trees using MAFFT (multiple alignment), IQ-TREE 2 (maximum likelihood), and FastTree (fast NJ/ML). Visualize with ETE3 or FigTree. For evolutionary analysis, microbial genomics, viral phylodynamics, protein family analysis, and molecular clock studies.

K-Dense-AI/scientific-agent-skills · 68 tokens

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

mapping-to-snomed

Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…

maziyarpanahi/openmed · 205 tokens