carbon-calculator

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

A calculator for the embodied carbon of construction materials—the emissions produced before a material is used, including its manufacture and supply. It uses emission factors to calculate and compare material impacts.

In plain words
What is it for?
Use it to assess concrete, steel, timber, glass, insulation, and other materials, compare alternatives, track CO2 emissions, and prepare sustainability reports.
Why use it?
Construction teams need consistent figures to compare materials, set carbon targets, and report emissions. Calculating each material from its quantity and factor makes those comparisons possible.

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 assess concrete, steel, timber, glass, insulation, and other materials, compare alternatives, track CO2 emissions, and prepare sustainability reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/carbon-calculator
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 carbon-calculator
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 carbon-calculator

README.md
[![agentmods](https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/carbon-calculator/github.svg)](https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/carbon-calculator)
Your own site
<a href="https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/carbon-calculator"><img src="https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/carbon-calculator/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 carbon-calculator

Your own site · 80×15
<a href="https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/carbon-calculator"><img src="https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/carbon-calculator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,343 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.00024 $0.03343
Opus 5 $0.00012 $0.01672
Sonnet 5 $0.00005 $0.00669
Haiku 4.5 $0.00002 $0.00334

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

Security

Grade A, and why

carbon-calculator 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 8d 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 carbon-calculator — 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/Sustainability/carbon-calculator/SKILL.md · 419 lines

How it starts

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

Carbon Calculator

Business Case

Problem Statement

Sustainability requirements demand:

  • Tracking embodied carbon
  • Comparing material options
  • Meeting carbon targets
  • Reporting emissions

Solution

Calculate and track embodied carbon for construction materials using standard emission factors.

Technical Implementation

import pandas as pd
from typing import Dict, Any, List, Optional
from dataclasses import dataclass
from enum import Enum


class MaterialCategory(Enum):
    CONCRETE = "concrete"
    STEEL = "steel"
    ALUMINUM = "aluminum"
    TIMBER = "timber"
    BRICK = "brick"
    GLASS = "glass"
    INSULATION = "insulation"
    PLASTIC = "plastic"
    COPPER = "copper"
    OTHER = "other"


@dataclass
class CarbonFactor:
    material: str
    category: MaterialCategory
    ec_factor: float  # kgCO2e per unit
    unit: str
    source: str


@dataclass
class MaterialInput:
    material_code: str
    material_name: str
    quantity: float
    unit: str
    category: MaterialCategory


@dataclass
class CarbonResult:
    material_code: str
    material_name: str
    quantity: float
    unit: str
    ec_factor: float
    embodied_carbon: float  # kgCO2e
    category: str


# Embodied carbon factors (kgCO2e per unit)
CARBON_FACTORS = {
    # Concrete
    'concrete_c20': CarbonFactor('Concrete C20', MaterialCategory.CONCRETE, 240, 'm3', 'ICE Database'),
    'concrete_c30': CarbonFactor('Concrete C30', MaterialCategory.CONCRETE, 290, 'm3', 'ICE Database'),
    'concrete_c40': CarbonFactor('Concrete C40', MaterialCategory.CONCRETE, 350, 'm3', 'ICE Database'),
    'concrete_c50': CarbonFactor('Concrete C50', MaterialCategory.CONCRETE, 410, 'm3', 'ICE Database'),

    # Steel
    'steel_rebar': CarbonFactor('Rebar', MaterialCategory.STEEL, 1.99, 'kg', 'ICE Database'),
    'steel_section': CarbonFactor('Steel Section', MaterialCategory.STEEL, 1.55, 'kg', 'ICE Database'),
    'steel_sheet': CarbonFactor('Steel Sheet', MaterialCategory.STEEL, 2.03, 'kg', 'ICE Database'),
    'steel_stainless': CarbonFactor('Stainless Steel', MaterialCategory.STEEL, 6.15, 'kg', 'ICE Database'),

    # Aluminum
    'aluminum_general': CarbonFactor('Aluminum General', MaterialCategory.ALUMINUM, 9.16, 'kg', 'ICE Database'),
    'aluminum_recycled': CarbonFactor('Aluminum Recycled', MaterialCategory.ALUMINUM, 1.81, 'kg', 'ICE Database'),

    # Timber
    'timber_softwood': CarbonFactor('Softwood Timber', MaterialCategory.TIMBER, 0.31, 'kg', 'ICE Database'),
    'timber_hardwood': CarbonFactor('Hardwood Timber', MaterialCategory.TIMBER, 0.46, 'kg', 'ICE Database'),
    'timber_glulam': CarbonFactor('Glulam', MaterialCategory.TIMBER, 0.51, 'kg', 'ICE Database'),
    'timber_clt': CarbonFactor('CLT', MaterialCategory.TIMBER, 0.44, 'kg', 'ICE Database'),
    'timber_plywood': CarbonFactor('Plywood', MaterialCategory.TIMBER, 0.65, 'kg', 'ICE Database'),

    # Masonry
    'brick_common': CarbonFactor('Common Brick', MaterialCategory.BRICK, 0.24, 'kg', 'ICE Database'),
    'block_concrete': CarbonFactor('Concrete Block', MaterialCategory.BRICK, 0.10, 'kg', 'ICE Database'),

    # Glass
    'glass_float': CarbonFactor('Float Glass', MaterialCategory.GLASS, 1.44, 'kg', 'ICE Database'),
    'glass_double': CarbonFactor('Double Glazing', MaterialCategory.GLASS, 35.0, 'm2', 'ICE Database'),

    # Insulation
    'insul_mineral': CarbonFactor('Mineral Wool', MaterialCategory.INSULATION, 1.28, 'kg', 'ICE Database'),
    'insul_eps': CarbonFactor('EPS', MaterialCategory.INSULATION, 3.29, 'kg', 'ICE Database'),
    'insul_xps': CarbonFactor('XPS', MaterialCategory.INSULATION, 3.29, 'kg', 'ICE Database'),

    # Other
    'copper_pipe': CarbonFactor('Copper Pipe', MaterialCategory.COPPER, 2.71, 'kg', 'ICE Database'),
    'pvc_pipe': CarbonFactor('PVC Pipe', MaterialCategory.PLASTIC, 3.10, 'kg', 'ICE Database'),
}


class CarbonCalculator:
    """Calculate embodied carbon for construction."""

    def __init__(self, project_name: str):
        self.project_name = project_name
        self.materials: List[MaterialInput] = []
        self.results: List[CarbonResult] = []
        self.custom_factors: Dict[str, CarbonFactor] = {}

    def add_custom_factor(self,
                          code: str,
                          name: str,
                          category: MaterialCategory,
                          ec_factor: float,
                          unit: str,
                          source: str = "Custom"):
        """Add custom carbon factor."""

        self.custom_factors[code] = CarbonFactor(
            material=name,
            category=category,
            ec_factor=ec_factor,
            unit=unit,
            source=source
        )

    def get_factor(self, material_code: str) -> Optional[CarbonFactor]:
        """Get carbon factor for material."""

        # Check custom first
        if material_code in self.custom_factors:
            return self.custom_factors[material_code]

        # Check standard factors
        code_lower = material_code.lower().replace('-', '_').replace(' ', '_')
        return CARBON_FACTORS.get(code_lower)

    def add_material(self,
                     material_code: str,
                     material_name: str,
                     quantity: float,
                     unit: str,
                     category: MaterialCategory = MaterialCategory.OTHER):
        """Add material to calculation."""

        self.materials.append(MaterialInput(
            material_code=material_code,
            material_name=material_name,
            quantity=quantity,
            unit=unit,
            category=category
        ))

    def calculate(self) -> List[CarbonResult]:
        """Calculate embodied carbon for all materials."""

        self.results = []

        for mat in self.materials:
            factor = self.get_factor(mat.material_code)

            if factor:
                # Check unit compatibility
                if factor.unit == mat.unit:
                    ec = mat.quantity * factor.ec_factor
                else:
                    # Assume conversion needed - simplified
                    ec = mat.quantity * factor.ec_factor
            else:
                # Use default factor based on category
                default_factors = {
                    MaterialCategory.CONCRETE: 300,
                    MaterialCategory.STEEL: 1.8,
                    MaterialCategory.ALUMINUM: 9.0,
                    MaterialCategory.TIMBER: 0.4,
                    MaterialCategory.BRICK: 0.2,
                    MaterialCategory.GLASS: 1.5,
                    MaterialCategory.INSULATION: 2.0,
                    MaterialCategory.OTHER: 1.0
                }
                ec_factor = default_factors.get(mat.category, 1.0)
                ec = mat.quantity * ec_factor

            self.results.append(CarbonResult(
                material_code=mat.material_code,
                material_name=mat.material_name,
                quantity=mat.quantity,
                unit=mat.unit,
                ec_factor=factor.ec_factor if factor else 0,
                embodied_carbon=round(ec, 2),
                category=mat.category.value
            ))

        return self.results

    def get_total_carbon(self) -> float:
        """Get total embodied carbon (kgCO2e)."""
        return sum(r.embodied_carbon for r in self.results)

    def get_carbon_by_category(self) -> Dict[str, float]:
        """Get carbon breakdown by category."""

        by_category = {}
        for r in self.results:
            if r.category not in by_category:
                by_category[r.category] = 0
            by_category[r.category] += r.embodied_carbon

        return {k: round(v, 2) for k, v in by_category.items()}

    def compare_alternatives(self,
                              original_code: str,
                              original_qty: float,
                              alternative_code: str,
                              alternative_qty: float) -> Dict[str, Any]:
        """Compare carbon impact of material alternatives."""

        original_factor = self.get_factor(original_code)
        alt_factor = self.get_factor(alternative_code)

        if not original_factor or not alt_factor:
            return {}

        original_carbon = original_qty * original_factor.ec_factor
        alt_carbon = alternative_qty * alt_factor.ec_factor
        savings = original_carbon - alt_carbon

        return {
            'original_material': original_factor.material,
            'original_carbon': round(original_carbon, 2),
            'alternative_material': alt_factor.material,
            'alternative_carbon': round(alt_carbon, 2),
            'carbon_savings': round(savings, 2),
            'savings_percent': round(savings / original_carbon * 100, 1) if original_carbon > 0 else 0
        }

    def generate_report(self) -> Dict[str, Any]:
        """Generate carbon report."""

        if not self.results:
            self.calculate()

        total = self.get_total_carbon()
        by_category = self.get_carbon_by_category()

        # Find top contributors
        sorted_results = sorted(self.results, key=lambda x: x.embodied_carbon, reverse=True)
        top_5 = sorted_results[:5]

        # Convert to tonnes
        total_tonnes = total / 1000

        return {
            'project': self.project_name,
            'total_kgCO2e': round(total, 2),
            'total_tCO2e': round(total_tonnes, 2),
            'material_count': len(self.results),
            'by_category': by_category,
            'top_contributors': [
                {
                    'material': r.material_name,
                    'carbon': r.embodied_carbon,
                    'percentage': round(r.embodied_carbon / total * 100, 1) if total > 0 else 0
                }
                for r in top_5
            ]
        }

    def suggest_reductions(self) -> List[Dict[str, Any]]:
        """Suggest carbon reduction opportunities."""

        if not self.results:
            self.calculate()

        suggestions = []

        for r in self.results:
            # Steel -> Timber
            if r.category == 'steel' and r.embodied_carbon > 1000:
                suggestions.append({
                    'material': r.material_name,
                    'current_carbon': r.embodied_carbon,
                    'suggestion': 'Consider timber alternative where structurally feasible',
                    'potential_reduction': '60-80%'
                })

            # Standard concrete -> Low carbon
            if r.category == 'concrete' and r.embodied_carbon > 5000:
                suggestions.append({
                    'material': r.material_name,
                    'current_carbon': r.embodied_carbon,
                    'suggestion': 'Use low-carbon concrete mix with SCMs',
                    'potential_reduction': '20-40%'
                })

            # Virgin aluminum -> Recycled
            if r.category == 'aluminum':
                suggestions.append({
                    'material': r.material_name,
                    'current_carbon': r.embodied_carbon,
                    'suggestion': 'Specify recycled aluminum content',
                    'potential_reduction': '70-80%'
                })

        return suggestions

    def export_to_excel(self, output_path: str) -> str:
        """Export carbon calculation to Excel."""

        if not self.results:
            self.calculate()

        report = self.generate_report()

        with pd.ExcelWriter(output_path, engine='openpyxl') as writer:
            # Summary
            summary_df = pd.DataFrame([{
                'Project': self.project_name,
                'Total kgCO2e': report['total_kgCO2e'],
                'Total tCO2e': report['total_tCO2e'],
                'Materials': report['material_count']
            }])
            summary_df.to_excel(writer, sheet_name='Summary', index=False)

            # Details
            details_df = pd.DataFrame([
                {
                    'Material Code': r.material_code,
                    'Material': r.material_name,
                    'Quantity': r.quantity,
                    'Unit': r.unit,
                    'EC Factor': r.ec_factor,
                    'Embodied Carbon (kgCO2e)': r.embodied_carbon,
                    'Category': r.category
                }
                for r in self.results
            ])
            details_df.to_excel(writer, sheet_name='Materials', index=False)

            # By Category
            cat_df = pd.DataFrame([
                {'Category': k, 'kgCO2e': v}
                for k, v in report['by_category'].items()
            ])
            cat_df.to_excel(writer, sheet_name='By Category', index=False)

            # Suggestions
            suggestions = self.suggest_reductions()
            if suggestions:
                sug_df = pd.DataFrame(suggestions)
                sug_df.to_excel(writer, sheet_name='Reduction Ideas', index=False)

        return output_path

Read the full file on GitHub · 419 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. 8d ago First seen · 419 lines · 24 tokens per session scan A f97b87df60d8

Subscribe to this mod's changes

carbon-calculator 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 24 tokens to every session and 3,343 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to carbon-calculator, 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