A collection of Agent Skills and MCP tools that audit software projects for environmental sustainability, accessibility, and quality, then implement measurable improvements.
| Command | What it does |
|---|---|
/gc-setup |
Full 9-phase sustainability audit (SCI, WSG, a11y, performance, testing, baselines) |
/gc-dev |
Daily development companion — green check before commit, feature planning, PR review |
/gc-measure-sci |
Measure SCI carbon intensity for a specific operation or endpoint |
/gc-check-sustainability |
Quick sustainability check (WSG, green hosting, code patterns) |
/gc-estimate-emissions |
Estimate CO2 emissions per page view or across a sitemap |
When activated, the skill guides your AI agent through a 9-phase workflow:
- Explore — understand the codebase, stack, and architecture
- Energy & Carbon (SCI) — measure carbon intensity per operation using the Green Software Foundation SCI formula
- WSG Compliance — evaluate against all 80 W3C Web Sustainability Guidelines 1.0
- Accessibility — set up Lighthouse CI auditing with WCAG 2.1 AA thresholds
- Performance & Resource Efficiency — bundle size, lazy loading, caching, fonts, images
- Testing & Quality — test infrastructure, coverage, critical path tests
- Prioritize — rank actions by impact x feasibility (P0-P3)
- Establish Baselines — measurable targets for every dimension
- Sustainability-Aware CLAUDE.md — encode sustainability into the development workflow
| Area | Standard / Tool |
|---|---|
| Carbon measurement | SCI (Software Carbon Intensity) |
| SCI profiling (JS/TS) | SCI Profiler — zero-dependency TypeScript library |
| SCI profiling (PHP) | SCI Profiler PHP — zero-code-changes, framework-agnostic |
| Page emissions | Sustainable Web Design (SWD) v4 model |
| Web sustainability | W3C WSG 1.0 (80 guidelines) |
| Accessibility | WCAG 2.1 AA via Lighthouse CI |
| Performance | Lighthouse performance scores, bundle budgets |
| Green patterns | Green Software Foundation patterns catalog |
| Static analysis | Creedengo green code rules |
| CI energy tracking | eco-ci-energy-estimation for pipeline measurement |
| Cloud carbon | Cloud Carbon Footprint |
Clone the repository and copy the skills into your project:
git clone https://github.com/fullo/sustainable-code-skill-setup.git ~/.gc-tools
cp -r ~/.gc-tools/skills-agent/* .claude/skills/Or install globally (available across all projects):
git clone https://github.com/fullo/sustainable-code-skill-setup.git ~/.gc-tools
cp -r ~/.gc-tools/skills-agent/* ~/.claude/skills/To update later:
cd ~/.gc-tools && git pull
cp -r skills-agent/* ~/.claude/skills/ # or .claude/skills/ for project-localYour .claude/skills/ directory will contain:
.claude/skills/
gc-setup/ # Full 9-phase audit
SKILL.md
references/ # 8 reference files loaded on-demand
gc-measure-sci/ # Quick SCI measurement
SKILL.md
gc-dev/ # Daily dev companion
SKILL.md
gc-check-sustainability/ # Quick sustainability check
SKILL.md
gc-estimate-emissions/ # Page/sitemap emissions
SKILL.md
The MCP plugin gives your agent access to 8 sustainability measurement tools. This enhances the skills with real-time calculations but is not required — all skills include manual fallback instructions.
If you already cloned in Step 1, just build the MCP plugin:
cd ~/.gc-tools/mcp-plugin
npm install && npm run buildThen add to your project's .claude/settings.json (replace $HOME with your actual home directory path):
{
"mcpServers": {
"sustainable-code": {
"command": "node",
"args": ["/Users/yourname/.gc-tools/mcp-plugin/dist/index.js"]
}
}
}Tip: Run
echo $HOMEto get your home directory path. For example, on macOS it's typically/Users/yourname, on Linux/home/yourname.
Verify the tools are working by restarting Claude Code and asking:
"Use the grid_carbon_intensity tool to check Italy's carbon intensity"
If the agent returns a gCO2eq/kWh value, the MCP server is working correctly.
| Tool | Used by | Description |
|---|---|---|
sci_calculate |
/gc-setup, /gc-measure-sci |
Compute SCI carbon intensity per functional unit |
swd_estimate |
/gc-setup, /gc-estimate-emissions |
Estimate page-level CO2 via SWD v4 model |
swd_batch |
/gc-setup, /gc-estimate-emissions |
Estimate emissions for multiple pages at once |
check_green_hosting |
/gc-setup, /gc-check-sustainability |
Check if a domain uses green hosting |
grid_carbon_intensity |
/gc-setup, /gc-measure-sci |
Look up grid carbon intensity by country |
wsg_compliance_score |
/gc-setup, /gc-check-sustainability |
Score a WSG compliance JSON file |
creedengo_check |
/gc-setup, /gc-check-sustainability |
Check source files against green code rules |
sci_compare |
/gc-setup, /gc-measure-sci |
Compare two SCI measurements |
sustainable-code-skill-setup/
README.md # This file
CONTRIBUTING.md # How to contribute
LICENSE # MIT
skills-agent/ # Copy this into .claude/skills/
gc-setup/ # /gc-setup — full 9-phase audit
SKILL.md
references/ # 8 reference files loaded on-demand
gc-dev/ # /gc-dev — daily dev companion
SKILL.md
gc-measure-sci/ # /gc-measure-sci — SCI measurement
SKILL.md
gc-check-sustainability/ # /gc-check-sustainability — quick check
SKILL.md
gc-estimate-emissions/ # /gc-estimate-emissions — page emissions
SKILL.md
examples/ # Walkthroughs and reference docs
01-first-audit.md # Full /gc-setup example
02-measure-sci.md # SCI measurement example
03-page-emissions.md # Page emissions example
04-daily-workflow.md # Daily dev workflow
05-mcp-tools-reference.md # Complete MCP tools reference
sample-wsg-compliance.json # Sample WSG compliance file
mcp-plugin/ # MCP server (optional, Step 2)
src/tools/ # 8 tool implementations
src/tools/__tests__/ # Test suite (72 tests)
src/lib/ # Shared constants and types
scripts/ # Validation and CI helpers
This skill follows the Agent Skills open format and works with 30+ AI agents and tools, including:
- Claude Code
- Cursor
- Windsurf
- Cline
- Any agent supporting the agentskills.io specification
The examples/ directory contains complete walkthroughs and reference documentation:
| Example | Description |
|---|---|
| First Audit | Full /gc-setup walkthrough on a Next.js app |
| Measure SCI | SCI measurement for an API endpoint (with and without MCP) |
| Page Emissions | Single page and full sitemap emissions estimation |
| Daily Workflow | How /gc-dev integrates into your development cycle |
| MCP Tools Reference | Complete reference for all 8 MCP tools with parameters and examples |
See CONTRIBUTING.md for how to contribute, commit conventions, and data update procedures.