Green Claude: digital sobriety for Claude Code
🇫🇷 Lire en français

Green Claude helps Claude Code write code that uses fewer resources, with eco-design rules and a local audit tool.
The project brings responsible digital, or green IT, by design: Claude applies the rules while it writes the code, when the choices are made and still cost nothing to change. An audit after launch finds the same defects when fixing them costs far more. Many of these rules are plain farmer's common sense, which software has often lost along the way: you don't take the tractor out to plant three radishes (a whole library for a single function), and you don't walk back to the well for every bucket (one SQL query per row displayed).
A project by the Institut du Numérique Responsable: 131 general rules, 137 rules for 24 languages and frameworks, 13 responsible-use practices and 30 token sobriety rules. The approach is presented on the INR website (in French): Écoconcevoir avec un assistant de code.
The skill guides the model when loaded; its application is not guaranteed on every response. The audit flags candidates for review, without certifying RGESN compliance or measuring energy savings. Optional hooks run the audit after supported code-writing operations.
The rules draw on RGESN 2024, GR491, the Green Software Foundation and the W3C Web Sustainability Guidelines. A version portable to other assistants is being developed in regles-ecoconception-ia.
Installation · Usage · Languages and frameworks · Limits and hooks · Contributing · License
Installation
Via the Claude Code plugin manager (recommended)
/plugin marketplace add Institut-du-Numerique-Responsable/green-claude
/plugin install green-claude@green-claude
Claude Code then handles updates (/plugin update green-claude) without a manual git pull.
The same marketplace lists the INR's other plugins for Claude Code. Perf Sentinel writes integration tests that catch N+1 queries and redundant or slow I/O before production:
/plugin install perf-sentinel@green-claude
Via install.sh
git clone https://github.com/Institut-du-Numerique-Responsable/green-claude.git
cd green-claude
./install.sh
The script installs the skill into ~/.claude/skills/green-claude and offers audit, cache and framing hooks separately. The plugin manager does not configure these hooks.
Prerequisite: jq, needed by the audit script and the hooks (brew install jq / sudo apt install jq).
Claude.ai and Claude API
From a local clone, build the archives:
bash skills/green-claude/scripts/package-skill.sh # writes into dist/
| Channel | Archive | How to install |
|---|
| Claude.ai | dist/green-claude-claude-ai.zip | Settings → Capabilities → Skills → Upload skill (code execution must be enabled) |
| Claude API | dist/green-claude-api.zip | client.beta.skills.create(files=files_from_dir("green-coding")) |
The archives contain the same skill, with a description adapted to each channel. There it is named green-coding: Claude.ai and the API reject a skill name that contains "claude". Running the audit requires bash and jq in the execution environment.
Usage
Three ways to use it:
| You want to... | What you do |
|---|
| Have Claude write sober code by default | Install the skill; explicitly request its use when needed |
| Audit an existing file | Just ask: "eco-design audit of this file" |
| See the full checklist | Type /green-claude |
The audit uses local patterns and detectors, without calling a model for detection. Interpreting its results with Claude consumes tokens.
Real example
This entirely ordinary piece of code:
import _ from 'lodash';
app.get('/api/users', (req, res) => {
db.query('SELECT * FROM users', (err, rows) => {
res.json(rows);
});
});