lifecycle-carbon-calculator
Calculate embodied carbon and lifecycle emissions for construction materials and projects. Support sustainable design decisions with carbon data.
What this skill does
# Lifecycle Carbon Calculator for Construction
## Overview
Calculate embodied carbon (EC) and lifecycle carbon emissions for construction materials, assemblies, and projects. Support sustainable design decisions and carbon reduction targets.
## Business Case
Carbon calculation supports:
- **Regulatory Compliance**: Meet carbon reporting requirements
- **Green Certifications**: LEED, BREEAM, Living Building Challenge
- **Design Optimization**: Choose lower-carbon alternatives
- **Sustainability Goals**: Track progress toward net-zero
## Technical Implementation
```python
from dataclasses import dataclass, field
from typing import List, Dict, Any, Optional
from enum import Enum
import pandas as pd
class LifecycleStage(Enum):
A1_A3 = "Product Stage (A1-A3)" # Raw materials, transport, manufacturing
A4 = "Transport to Site (A4)"
A5 = "Construction (A5)"
B1_B7 = "Use Stage (B1-B7)" # Maintenance, repair, replacement
C1_C4 = "End of Life (C1-C4)" # Demolition, transport, disposal
D = "Beyond Lifecycle (D)" # Reuse, recycling potential
@dataclass
class MaterialCarbon:
material_id: str
name: str
category: str
unit: str
carbon_a1_a3: float # kgCO2e per unit
carbon_a4: float
carbon_a5: float
carbon_b: float
carbon_c: float
carbon_d: float # Usually negative (credit)
density: float # kg/m³ if applicable
source: str
epd_url: str = ""
@dataclass
class AssemblyCarbon:
assembly_id: str
name: str
materials: List[Dict[str, Any]]
total_carbon: float
carbon_by_stage: Dict[str, float]
@dataclass
class ProjectCarbon:
project_id: str
name: str
gross_area: float
assemblies: List[AssemblyCarbon]
total_embodied_carbon: float
carbon_per_area: float
carbon_by_stage: Dict[str, float]
carbon_by_category: Dict[str, float]
benchmark_comparison: Dict[str, Any]
class LifecycleCarbonCalculator:
"""Calculate lifecycle carbon for construction."""
# Sample material carbon data (kgCO2e per unit)
DEFAULT_MATERIALS = {
'concrete_30mpa': MaterialCarbon(
material_id='C30', name='Concrete 30MPa', category='Concrete',
unit='m³', carbon_a1_a3=300, carbon_a4=5, carbon_a5=2,
carbon_b=0, carbon_c=10, carbon_d=-20, density=2400,
source='EPD Database'
),
'concrete_40mpa': MaterialCarbon(
material_id='C40', name='Concrete 40MPa', category='Concrete',
unit='m³', carbon_a1_a3=350, carbon_a4=5, carbon_a5=2,
carbon_b=0, carbon_c=10, carbon_d=-20, density=2400,
source='EPD Database'
),
'steel_rebar': MaterialCarbon(
material_id='REBAR', name='Steel Reinforcing Bar', category='Steel',
unit='kg', carbon_a1_a3=1.99, carbon_a4=0.05, carbon_a5=0.02,
carbon_b=0, carbon_c=0.05, carbon_d=-0.5, density=7850,
source='WorldSteel EPD'
),
'steel_structural': MaterialCarbon(
material_id='STEEL', name='Structural Steel', category='Steel',
unit='kg', carbon_a1_a3=1.55, carbon_a4=0.05, carbon_a5=0.03,
carbon_b=0, carbon_c=0.05, carbon_d=-0.8, density=7850,
source='AISC EPD'
),
'timber_clt': MaterialCarbon(
material_id='CLT', name='Cross-Laminated Timber', category='Timber',
unit='m³', carbon_a1_a3=-500, carbon_a4=10, carbon_a5=5,
carbon_b=0, carbon_c=50, carbon_d=-100, density=500,
source='AWC EPD'
),
'gypsum_board': MaterialCarbon(
material_id='GYP', name='Gypsum Board 12.5mm', category='Finishes',
unit='m²', carbon_a1_a3=3.2, carbon_a4=0.2, carbon_a5=0.1,
carbon_b=0, carbon_c=0.3, carbon_d=-0.1, density=10,
source='EUROGYPSUM EPD'
),
'insulation_mineral': MaterialCarbon(
material_id='INS_MW', name='Mineral Wool Insulation', category='Insulation',
unit='m³', carbon_a1_a3=45, carbon_a4=2, carbon_a5=1,
carbon_b=0, carbon_c=5, carbon_d=-2, density=40,
source='EURIMA EPD'
),
'glass_double': MaterialCarbon(
material_id='GLASS', name='Double Glazed Unit', category='Glazing',
unit='m²', carbon_a1_a3=35, carbon_a4=1, carbon_a5=0.5,
carbon_b=0, carbon_c=2, carbon_d=-5, density=25,
source='Glass for Europe EPD'
),
'aluminum': MaterialCarbon(
material_id='ALU', name='Aluminum Profile', category='Metals',
unit='kg', carbon_a1_a3=8.0, carbon_a4=0.1, carbon_a5=0.05,
carbon_b=0, carbon_c=0.1, carbon_d=-4.0, density=2700,
source='EAA EPD'
),
}
# Building type benchmarks (kgCO2e/m²)
BENCHMARKS = {
'Office': {'typical': 500, 'good': 350, 'best': 200},
'Residential': {'typical': 400, 'good': 280, 'best': 150},
'Retail': {'typical': 450, 'good': 320, 'best': 180},
'Industrial': {'typical': 350, 'good': 250, 'best': 150},
'Healthcare': {'typical': 700, 'good': 500, 'best': 350},
}
def __init__(self):
self.materials: Dict[str, MaterialCarbon] = dict(self.DEFAULT_MATERIALS)
self.assemblies: Dict[str, AssemblyCarbon] = {}
def add_material(self, material: MaterialCarbon):
"""Add or update a material."""
self.materials[material.material_id] = material
def calculate_material_carbon(self, material_id: str, quantity: float,
stages: List[LifecycleStage] = None) -> Dict:
"""Calculate carbon for a material quantity."""
if material_id not in self.materials:
raise ValueError(f"Unknown material: {material_id}")
material = self.materials[material_id]
if stages is None:
stages = list(LifecycleStage)
carbon_by_stage = {}
total = 0
for stage in stages:
if stage == LifecycleStage.A1_A3:
carbon = material.carbon_a1_a3 * quantity
elif stage == LifecycleStage.A4:
carbon = material.carbon_a4 * quantity
elif stage == LifecycleStage.A5:
carbon = material.carbon_a5 * quantity
elif stage == LifecycleStage.B1_B7:
carbon = material.carbon_b * quantity
elif stage == LifecycleStage.C1_C4:
carbon = material.carbon_c * quantity
elif stage == LifecycleStage.D:
carbon = material.carbon_d * quantity
else:
carbon = 0
carbon_by_stage[stage.value] = carbon
total += carbon
return {
'material_id': material_id,
'material_name': material.name,
'quantity': quantity,
'unit': material.unit,
'total_carbon': total,
'carbon_by_stage': carbon_by_stage
}
def create_assembly(self, assembly_id: str, name: str,
components: List[Dict]) -> AssemblyCarbon:
"""Create an assembly from multiple materials."""
total_carbon = 0
carbon_by_stage = {stage.value: 0 for stage in LifecycleStage}
material_details = []
for comp in components:
material_id = comp['material_id']
quantity = comp['quantity']
result = self.calculate_material_carbon(material_id, quantity)
total_carbon += result['total_carbon']
for stage, carbon in result['carbon_by_stage'].items():
carbon_by_stage[stage] += carbon
material_details.append({
'material': result['material_name'],
'quantity': quantity,
'unit': result['unit'],
'carbon': result['total_carbon']
})
assembly = AssemblyCarbon(
assembly_id=assembly_id,
name=name,
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.