From sustainable-code-skill-setup
Measure the SCI (Software Carbon Intensity) for a specific operation, endpoint, or feature. Use when the user asks to measure carbon, energy consumption, or SCI for their code. Requires the sustainable-code MCP server for calculations, or falls back to manual estimation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sustainable-code-skill-setup:gc-measure-sciThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Compute the [Software Carbon Intensity](https://sci-guide.greensoftware.foundation/) for $ARGUMENTS.
Compute the Software Carbon Intensity for $ARGUMENTS.
Identify the functional unit R — what counts as "one operation"? (API request, page load, file processed, user session, CI run, etc.)
Measure energy E (kWh per operation):
performance.now() to estimate energy per operationauto_prepend_filehyperfine, profiler output) and convert to energy using TDP-based estimationDetermine carbon intensity I (gCO2eq/kWh):
grid_carbon_intensity MCP tool with the deployment region's country codeEstimate embodied carbon M (gCO2eq per operation):
Calculate SCI:
sci_calculate MCP tool with:
wallTimeMs (required): wall-clock execution time in millisecondscarbonIntensity: grid intensity in gCO2eq/kWh (from step 3)devicePowerW: device power in watts (default: 18W for M1 Pro)embodiedTotalG: total embodied emissions in gCO2eq (default: 211000)lifetimeHours: expected device lifetime in hours (default: 11680)SCI = ((E x I) + M) / RReport results:
## SCI Measurement: [operation name]
| Variable | Value | Source |
|----------|-------|--------|
| E (energy) | ? kWh | [method used] |
| I (carbon intensity) | ? gCO2eq/kWh | [region/source] |
| M (embodied) | ? gCO2eq | [estimation method] |
| R (functional unit) | 1 [unit] | [definition] |
| **SCI** | **? gCO2eq/[unit]** | |
### Recommendations
- [concrete actions to reduce SCI]
### Methodology and sources
- Formula: SCI = ((E x I) + M) / R — [Green Software Foundation SCI Specification v1.0](https://sci-guide.greensoftware.foundation/)
- Grid carbon intensity: [value] gCO2eq/kWh — [Ember Global Electricity Review](https://ember-energy.org/) [year]
- Device power: [value] W — [source]
- Embodied carbon: [value] gCO2eq — [source]
- Measurement tool: [tool name and version]
sci_compare MCP tool with:
baselineSciMg: previous SCI value in mgCO2eqcurrentSciMg: new SCI value in mgCO2eqbaselineLabel: description of baseline (e.g., "before optimization")currentLabel: description of current (e.g., "after tree-shaking")After presenting the SCI measurement report, automatically run /gc-verify in quick mode. This triggers a Chain-of-Verification (CoVe) process: extract claims from the report, generate adversarial questions, answer each independently, and present findings under a ## Verification (CoVe) heading.
/gc-setup insteadProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub fullo/claude-plugins-marketplace --plugin sustainable-code-skill-setup