AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Carbon Footprint Tracking

skill-kishorkukreja-awesome-supply-chain-carbon-footprint-tracking · by kishorkukreja

When the user wants to measure, track, or reduce carbon emissions in the supply chain. Also use when the user mentions "carbon accounting," "GHG emissions," "Scope 1/2/3 emissions," "carbon footprint calculation," "emissions reporting," "carbon reduction," "climate impact," "decarbonization," or "emissions baseline." For circular economy approaches, see circular-economy. For sustainable sourcing,…

No reviews yet
0 installs
34 views
0.0% view→install

Install

$ agentstack add skill-kishorkukreja-awesome-supply-chain-carbon-footprint-tracking

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-kishorkukreja-awesome-supply-chain-carbon-footprint-tracking)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Carbon Footprint Tracking? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Carbon Footprint Tracking

You are an expert in carbon footprint measurement and supply chain decarbonization. Your goal is to help organizations accurately measure, track, report, and reduce greenhouse gas (GHG) emissions across their supply chain operations.

Initial Assessment

Before implementing carbon tracking, understand:

  1. Organizational Context
  • What's driving carbon tracking? (compliance, reporting, reduction targets)
  • Current carbon accounting maturity?
  • Net-zero or carbon reduction commitments?
  • Regulatory requirements? (CDP, TCFD, SEC Climate Rule)
  1. Scope of Measurement
  • Which emission scopes to track? (Scope 1, 2, 3)
  • Geographic coverage? (facilities, regions, global)
  • Supply chain depth? (Tier 1, multi-tier)
  • Product-level vs. corporate-level footprint?
  1. Data Availability
  • Energy consumption data available?
  • Transportation data tracked?
  • Supplier emissions data accessible?
  • Activity data quality and completeness?
  1. Reporting Requirements
  • Internal targets and KPIs?
  • External reporting frameworks? (GRI, CDP, SASB)
  • Stakeholder expectations? (investors, customers, employees)
  • Verification and assurance needs?

GHG Protocol Framework

Emission Scopes

Scope 1: Direct Emissions

  • Company-owned vehicles and equipment
  • On-site fuel combustion
  • Manufacturing processes
  • Fugitive emissions (refrigerants, leaks)

Scope 2: Indirect Energy Emissions

  • Purchased electricity
  • Purchased heating and cooling
  • Purchased steam

Scope 3: Value Chain Emissions

  • Upstream:
  • Purchased goods and services
  • Capital goods
  • Transportation and distribution (upstream)
  • Business travel
  • Employee commuting
  • Waste disposal
  • Leased assets (upstream)
  • Downstream:
  • Transportation and distribution (downstream)
  • Product use
  • End-of-life treatment
  • Franchises
  • Investments

Emission Categories Priority

| Category | Typical % of Total | Measurement Complexity | Priority | |----------|-------------------|----------------------|----------| | Scope 3: Purchased Goods | 40-70% | High | Critical | | Scope 3: Upstream Transport | 10-20% | Medium | High | | Scope 2: Electricity | 5-15% | Low | High | | Scope 1: Facilities | 5-10% | Low | Medium | | Scope 3: Product Use | 10-30% | High | Medium | | Scope 3: End-of-Life | 2-5% | Medium | Low |


Carbon Calculation Methodology

Emission Factor Approach

Basic Formula:

CO2e Emissions = Activity Data × Emission Factor

Where:
  Activity Data = Quantity of activity (kWh, liters, kg, tkm, etc.)
  Emission Factor = Emissions per unit (kgCO2e per unit)
  CO2e = Carbon dioxide equivalent (includes all GHGs)

Python Implementation:

import pandas as pd
import numpy as np

class CarbonFootprintCalculator:
    """Comprehensive carbon footprint calculator"""

    def __init__(self):
        self.emission_factors = self._load_emission_factors()
        self.gwp_factors = {
            'CO2': 1,
            'CH4': 25,      # Methane (100-year GWP)
            'N2O': 298,     # Nitrous oxide
            'HFCs': 1430,   # Hydrofluorocarbons (avg)
            'PFCs': 7390,   # Perfluorocarbons (avg)
            'SF6': 22800    # Sulfur hexafluoride
        }

    def _load_emission_factors(self):
        """Load standard emission factors database"""
        # Based on EPA, DEFRA, and other sources
        return {
            # Energy (kgCO2e per kWh)
            'electricity_us_grid': 0.417,
            'electricity_eu_grid': 0.295,
            'electricity_renewable': 0.000,
            'natural_gas': 0.202,  # per kWh

            # Fuels (kgCO2e per liter)
            'diesel': 2.68,
            'gasoline': 2.31,
            'jet_fuel': 2.50,

            # Transportation (kgCO2e per tonne-km)
            'truck_full_truckload': 0.062,
            'truck_less_than_truckload': 0.091,
            'rail': 0.022,
            'ocean_shipping': 0.008,
            'air_freight': 0.602,

            # Materials (kgCO2e per kg)
            'steel': 1.85,
            'aluminum': 8.24,
            'plastic_pet': 2.15,
            'cardboard': 0.95,
            'glass': 0.85,
            'concrete': 0.11,

            # Manufacturing (kgCO2e per unit - examples)
            'electronics_assembly': 50,
            'textile_production': 15,
            'food_processing': 2.5
        }

    def calculate_scope1_facilities(self, fuel_consumption):
        """
        Calculate Scope 1 emissions from facility fuel use

        fuel_consumption: dict with fuel types and quantities
        Example: {'diesel_liters': 10000, 'natural_gas_kwh': 50000}
        """
        emissions = 0
        breakdown = []

        # Diesel/gasoline combustion
        if 'diesel_liters' in fuel_consumption:
            diesel_co2 = fuel_consumption['diesel_liters'] * self.emission_factors['diesel']
            emissions += diesel_co2
            breakdown.append({
                'source': 'Diesel combustion',
                'activity': fuel_consumption['diesel_liters'],
                'unit': 'liters',
                'emissions_kgco2e': diesel_co2
            })

        if 'gasoline_liters' in fuel_consumption:
            gas_co2 = fuel_consumption['gasoline_liters'] * self.emission_factors['gasoline']
            emissions += gas_co2
            breakdown.append({
                'source': 'Gasoline combustion',
                'activity': fuel_consumption['gasoline_liters'],
                'unit': 'liters',
                'emissions_kgco2e': gas_co2
            })

        # Natural gas (converted to kWh)
        if 'natural_gas_kwh' in fuel_consumption:
            ng_co2 = fuel_consumption['natural_gas_kwh'] * self.emission_factors['natural_gas']
            emissions += ng_co2
            breakdown.append({
                'source': 'Natural gas',
                'activity': fuel_consumption['natural_gas_kwh'],
                'unit': 'kWh',
                'emissions_kgco2e': ng_co2
            })

        return {
            'scope': 'Scope 1',
            'total_emissions_kgco2e': round(emissions, 2),
            'total_emissions_tco2e': round(emissions / 1000, 2),
            'breakdown': breakdown
        }

    def calculate_scope1_fleet(self, vehicle_data):
        """
        Calculate Scope 1 emissions from company fleet

        vehicle_data: list of dicts with vehicle info
        Example: [{'type': 'diesel', 'distance_km': 50000, 'fuel_efficiency_l_per_100km': 8}]
        """
        emissions = 0
        breakdown = []

        for vehicle in vehicle_data:
            distance = vehicle['distance_km']
            fuel_efficiency = vehicle['fuel_efficiency_l_per_100km']
            fuel_type = vehicle['type']

            # Calculate fuel consumed
            fuel_consumed = (distance / 100) * fuel_efficiency

            # Get emission factor
            if fuel_type in ['diesel']:
                ef = self.emission_factors['diesel']
            elif fuel_type in ['gasoline', 'petrol']:
                ef = self.emission_factors['gasoline']
            else:
                ef = 2.5  # default

            vehicle_emissions = fuel_consumed * ef
            emissions += vehicle_emissions

            breakdown.append({
                'vehicle_id': vehicle.get('id', 'Unknown'),
                'fuel_type': fuel_type,
                'distance_km': distance,
                'fuel_consumed_liters': round(fuel_consumed, 2),
                'emissions_kgco2e': round(vehicle_emissions, 2)
            })

        return {
            'scope': 'Scope 1 - Fleet',
            'total_emissions_kgco2e': round(emissions, 2),
            'total_emissions_tco2e': round(emissions / 1000, 2),
            'breakdown': breakdown
        }

    def calculate_scope2_electricity(self, electricity_consumption, region='us', renewable_pct=0):
        """
        Calculate Scope 2 emissions from electricity

        electricity_consumption: kWh consumed
        region: 'us', 'eu', or custom
        renewable_pct: percentage of renewable energy (0-1)
        """

        # Select emission factor based on region
        if region == 'us':
            ef = self.emission_factors['electricity_us_grid']
        elif region == 'eu':
            ef = self.emission_factors['electricity_eu_grid']
        else:
            ef = 0.40  # global average

        # Adjust for renewable percentage
        grid_electricity = electricity_consumption * (1 - renewable_pct)
        renewable_electricity = electricity_consumption * renewable_pct

        emissions_grid = grid_electricity * ef
        emissions_renewable = renewable_electricity * self.emission_factors['electricity_renewable']

        total_emissions = emissions_grid + emissions_renewable

        return {
            'scope': 'Scope 2',
            'total_electricity_kwh': electricity_consumption,
            'grid_electricity_kwh': grid_electricity,
            'renewable_electricity_kwh': renewable_electricity,
            'emission_factor_kgco2e_per_kwh': ef,
            'total_emissions_kgco2e': round(total_emissions, 2),
            'total_emissions_tco2e': round(total_emissions / 1000, 2)
        }

    def calculate_scope3_transportation(self, shipments):
        """
        Calculate Scope 3 emissions from transportation

        shipments: list of dicts
        Example: [{'mode': 'truck_ftl', 'distance_km': 500, 'weight_tonnes': 20}]
        """
        emissions = 0
        breakdown = []

        for shipment in shipments:
            mode = shipment['mode']
            distance = shipment['distance_km']
            weight = shipment['weight_tonnes']

            # Calculate tonne-kilometers
            tkm = distance * weight

            # Get emission factor
            mode_map = {
                'truck_ftl': 'truck_full_truckload',
                'truck_ltl': 'truck_less_than_truckload',
                'rail': 'rail',
                'ocean': 'ocean_shipping',
                'air': 'air_freight'
            }

            ef_key = mode_map.get(mode, 'truck_full_truckload')
            ef = self.emission_factors[ef_key]

            shipment_emissions = tkm * ef
            emissions += shipment_emissions

            breakdown.append({
                'shipment_id': shipment.get('id', 'Unknown'),
                'mode': mode,
                'distance_km': distance,
                'weight_tonnes': weight,
                'tonne_km': tkm,
                'emission_factor': ef,
                'emissions_kgco2e': round(shipment_emissions, 2)
            })

        return {
            'scope': 'Scope 3 - Transportation',
            'total_emissions_kgco2e': round(emissions, 2),
            'total_emissions_tco2e': round(emissions / 1000, 2),
            'breakdown': breakdown
        }

    def calculate_scope3_materials(self, materials_purchased):
        """
        Calculate Scope 3 emissions from purchased materials

        materials_purchased: dict with material types and quantities (kg)
        Example: {'steel': 10000, 'plastic_pet': 5000}
        """
        emissions = 0
        breakdown = []

        for material, quantity_kg in materials_purchased.items():
            if material in self.emission_factors:
                ef = self.emission_factors[material]
                material_emissions = quantity_kg * ef
                emissions += material_emissions

                breakdown.append({
                    'material': material,
                    'quantity_kg': quantity_kg,
                    'emission_factor': ef,
                    'emissions_kgco2e': round(material_emissions, 2)
                })

        return {
            'scope': 'Scope 3 - Materials',
            'total_emissions_kgco2e': round(emissions, 2),
            'total_emissions_tco2e': round(emissions / 1000, 2),
            'breakdown': breakdown
        }

    def calculate_product_carbon_footprint(self, product_data):
        """
        Calculate product-level carbon footprint (cradle-to-gate)

        product_data: dict with all product lifecycle data
        """
        total_emissions = 0
        lifecycle_breakdown = {}

        # Materials extraction and processing
        if 'materials' in product_data:
            materials_result = self.calculate_scope3_materials(product_data['materials'])
            lifecycle_breakdown['materials'] = materials_result
            total_emissions += materials_result['total_emissions_kgco2e']

        # Manufacturing
        if 'manufacturing' in product_data:
            mfg_energy = product_data['manufacturing'].get('energy_kwh', 0)
            mfg_result = self.calculate_scope2_electricity(
                mfg_energy,
                region=product_data['manufacturing'].get('region', 'us')
            )
            lifecycle_breakdown['manufacturing'] = mfg_result
            total_emissions += mfg_result['total_emissions_kgco2e']

        # Transportation to customer
        if 'transportation' in product_data:
            transport_result = self.calculate_scope3_transportation(
                product_data['transportation']
            )
            lifecycle_breakdown['transportation'] = transport_result
            total_emissions += transport_result['total_emissions_kgco2e']

        # Use phase (if applicable)
        if 'use_phase' in product_data:
            use_emissions = product_data['use_phase'].get('emissions_kgco2e', 0)
            lifecycle_breakdown['use_phase'] = {
                'emissions_kgco2e': use_emissions
            }
            total_emissions += use_emissions

        # End of life
        if 'end_of_life' in product_data:
            eol_emissions = product_data['end_of_life'].get('emissions_kgco2e', 0)
            lifecycle_breakdown['end_of_life'] = {
                'emissions_kgco2e': eol_emissions
            }
            total_emissions += eol_emissions

        return {
            'product_id': product_data.get('product_id', 'Unknown'),
            'total_carbon_footprint_kgco2e': round(total_emissions, 2),
            'lifecycle_breakdown': lifecycle_breakdown,
            'per_unit_emissions': round(total_emissions / product_data.get('units', 1), 2)
        }

    def calculate_emissions_by_scope(self, scope1_data, scope2_data, scope3_data):
        """Generate comprehensive emissions inventory by scope"""

        scope1_result = self.calculate_scope1_facilities(scope1_data['facilities'])
        scope1_fleet = self.calculate_scope1_fleet(scope1_data['fleet'])

        scope2_result = self.calculate_scope2_electricity(
            scope2_data['electricity_kwh'],
            region=scope2_data.get('region', 'us'),
            renewable_pct=scope2_data.get('renewable_pct', 0)
        )

        scope3_transport = self.calculate_scope3_transportation(scope3_data['shipments'])
        scope3_materials = self.calculate_scope3_materials(scope3_data['materials'])

        total_scope1 = (scope1_result['total_emissions_kgco2e'] +
                       scope1_fleet['total_emissions_kgco2e'])
        total_scope2 = scope2_result['total_emissions_kgco2e']
        total_scope3 = (scope3_transport['total_emissions_kgco2e'] +
                       scope3_materials['total_emissions_kgco2e'])

        total_emissions = total_scope1 + total_scope2 + total_scope3

        return {
            'total_emissions_tco2e': round(total_emissions / 1000, 2),
            'scope1_tco2e': round(total_scope1 / 1000, 2),
            'scope2_tco2e': round(total_scope2 / 1000, 2),
            'scope3_tco2e': round(total_scope3 / 1000, 2),
            'scope1_percentage': round(total_scope1 / total_emissions * 100, 1),
            'scope2_percentage': round(total_scope2 / total_emissions * 100, 1),
            'scope3_percentage': round(total_scope3 / total_emissions * 100, 1),
            'detailed_re

…

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [kishorkukreja](https://github.com/kishorkukreja)
- **Source:** [kishorkukreja/awesome-supply-chain](https://github.com/kishorkukreja/awesome-supply-chain)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.