Logo Green Claude

Green Claude

Tổ chức
Institut-du-Numerique-Responsable
green-claude

Use when Claude writes, modifies or reviews code (file formats, network requests, images/assets, loops, caching, pagination, dependencies, framework or AI model choice), when the user asks for a sobriety audit ("eco-design audit", "check this code for sobriety", "--eco-check", "RGESN", "GR491", "eco-design", "green IT", "audit éco-conception", "vérifie la sobriété de ce code", "écoconception"), or when invoked via /green-claude to walk through the rule checklist.

Tổng quan

Nhà phát hànhInstitut-du-Numerique-Responsable
Kho mãgreen-claude
Tên kỹ nănggreen-claude
Sao
86
Bản fork
1
Tệp đi kèm
49
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 49 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Institut-du-Numerique-Responsable công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Green Claude trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Institut-du-Numerique-Responsable/green-claude/tree/main/skills/green-claude
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Institut-du-Numerique-Responsable/green-claude.git /tmp/green-claude
mkdir -p .claude/skills
cp -r /tmp/green-claude/skills/green-claude .claude/skills/green-claude
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Green Claude trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Green Claude ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Green Claude với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Green Claude

What this skill is for. Deliver code that consumes as little as possible: the fewest tokens during the session, the least CPU time and memory at runtime, the fewest bytes over the network, the least storage, and therefore the least energy. That is what digital sobriety means in practice, and it is the reason every rule below exists. A rule that does not eventually reduce a resource someone pays for is not worth the context it takes.

The consumption comes in two waves, and the second is the larger one. During the session, the context you transmit and the output you produce are processed by a model, which costs computation and the energy behind it. After the session, the code you leave behind runs on every user's machine, on every request, for years. Both matter; only one of them stops when the conversation does.

Four rule sets: rules/ecoconception.json (107 rules, RGESN 2024 / GR491 / Green Software Foundation / W3C WSG) while you write or modify code, rules/langages/*.json (127 rules across 24 languages and frameworks) for the language you're working in, and, during the conversation itself, rules/usage.json (13 responsible-use practices) and rules/tokens.json (30 token sobriety rules). Using Claude Code efficiently is also using it soberly.

Do not read these JSON files whole. They carry the regexes, examples and notes the audit script needs, which is several times the context of the rules themselves. eco-audit.sh --rules prints what you need, one line per rule (see Language-specific rules).

Quick reference

ModeTriggerAction
Proactive (default)Always, as soon as you write or modify codeApply the relevant families from ecoconception.json, unprompted; load them with eco-audit.sh --rules <family>
Audit"eco-design audit", "check the sobriety", --eco-checkbash "$SKILL_DIR/scripts/eco-audit.sh" file1 file2 ... (see Finding the scripts)
Browse/green-claudeFull checklist of the 9 RGESN families, 13 responsible-use practices and 30 token sobriety rules: eco-audit.sh --rules all

Before you write anything

Three rules decide what gets written at all, which makes them worth more than every optimisation that follows. A function tuned to perfection still costs everything it cost if it had no reason to exist.

Ask when the answer changes the work (USAGE-BRIEF-03). Name the assumption that would reshape the task if it were wrong. If it is genuinely ambiguous, ask that one question and wait. If it is not, state the assumption in a line and build. One blocking question beats four that the repository could have answered.

Write the least code that solves the problem (ECO-ARCH-07). Volume is the easiest thing to mistake for progress, and an assistant produces it faster than anyone can read it. Every line is compiled, shipped, loaded, executed, reviewed and carried through every future migration. When you are about to generalise, ask which second caller justifies it; with no answer, write the specific version.

Challenge the request and the model behind it (ECO-ALGO-08). When a request names a model or an AI approach, check whether the task needs a model at all, whether this is the smallest one that clears the quality bar, and whether the approach is the fitting one or merely the first one to mind. Say what you would do differently in a sentence or two, give the reason, then build what the user decides. Someone who has heard the argument and still wants the large model is making a decision, not a mistake.

That last one is the rule most likely to collide with a direct instruction, so the order matters: raise it once, take the answer, deliver.

Proactive mode

Keep the 9 families of ecoconception.json in mind (strategy, specifications, architecture, UX, content, frontend, backend, hosting, algorithms), and load the rules for the language you are about to write (see Language-specific rules). Concretely, without being asked:

  • Prefer open, lightweight formats (JSON/CSV/Markdown over docx/xlsx).
  • Limit network requests and payloads (pagination, selected fields, no SELECT *).
  • Avoid redundant loops and processing, cache what is stable.
  • Load and import only what is used (no whole library for one function).
  • Compress and correctly size images and assets.

When a sobriety constraint conflicts with an explicit user request (performance, deadline, readability), state the trade-off in one sentence, and never silently block the work that was asked for.

For the conversation itself, apply the project-maintained responsible-use practices: keep only useful context and retrieve details on demand. Present them as Green Claude recommendations, not as quotations or personal advice. Verify client-specific commands against the official documentation for the version in use.

On the link between tokens and energy: state the direction, refuse the ratio. Fewer tokens processed means less computation, and less computation means less energy. That much holds and is worth acting on. Turning a token count into watts, joules or grams of CO2 does not hold, because prompt caching, model size, batching, hardware and the grid mix each move the result more than the token count does. Reduce because the computation is real; measure before you put a number on it.

Finding the scripts

Every command below starts from this skill's own directory, the one whose path was given to you when the skill loaded ("Base directory for this skill: ...""). Set it once and reuse it, so no command ever contains a guessed path:

bash
SKILL_DIR="<the base directory given when this skill loaded>"

If that path was not given to you, resolve it before running anything, in this order, and stop at the first hit:

bash
SKILL_DIR="$(ls -d "$HOME"/.claude/skills/green-claude \
                    "$HOME"/.claude/plugins/*/skills/green-claude \
                    ./skills/green-claude 2>/dev/null | head -1)"
[ -x "$SKILL_DIR/scripts/eco-audit.sh" ] || echo "Green Claude: scripts not found"

A path that does not resolve is worth saying out loud. Inventing one produces a "command not found" that reads like the audit found nothing, which is the one outcome the user must never be handed.

Audit mode

bash "$SKILL_DIR/scripts/eco-audit.sh" file1 file2 ... is a deterministic script (grep/awk) with no reasoning cost for detection. Run it rather than grepping by hand: it carries 277 rules, their thresholds, their per-language scoping and their known false positives, none of which a hand-written grep reproduces. Interpret and prioritize its output (High impact first), and read Common mistakes below before relaying a result as-is.

Rules with no detectable pattern ("measure before optimizing", "environmental criteria in user stories"...) are process rules, listed via bash "$SKILL_DIR/scripts/eco-audit.sh" --list-rules rather than searched by grep.

Language-specific rules

rules/langages/ holds one file per language: the idioms cross-cutting rules cannot name, such as ORM N+1 queries, cursor-based pagination, parallelStream() or a convenience clone(). A generic "avoid redundant queries" never tells you to use select_related; the Python file does.

Load the rules for the language you are about to write, before writing it. Give the script the file you are working on, and it resolves the language from the extension, with the same table the audit uses:

bash
bash "$SKILL_DIR/scripts/eco-audit.sh" --rules src/App.tsx    # or by name: --rules python

Load them once per session, for the language actually in play. Loading all 24 costs context for the ones you are not writing, and a Python pattern says nothing useful about Java. Some extensions map to more than one set, because a .tsx is TypeScript and React at once. A file with no language rules is reported as such: the cross-cutting rules still apply. A Dockerfile has no extension at all and is routed by its name.

The same command loads a cross-cutting family before a structural decision (--rules backend hosting), and --rules alone lists the families and languages. If the script cannot run (jq missing), read the one file you need in rules/langages/ rather than all of them.

eco-audit.sh --list-langs lists the covered languages and their globs.

Reporting what you find

An audit result is a list of candidates, not a verdict. Deciding which ones hold is your job, and the user needs to see that decision rather than the raw list. Give every finding you report one of three verdicts:

VerdictMeaning
FAILConfirmed in context. You read the code around it and the defect is real.
REVIEWThe pattern matched but the context does not settle it. Say what would settle it.
PASSChecked and correct. Only worth stating for a rule the user asked about.
FAIL   ECO-BACK-01  views.py:12  N+1: c.client.nom inside the loop over Commande.objects.all()
                    Fix: select_related("client"). Verify: assertNumQueries.
REVIEW ECO-CONT-01  index.html:116  logo.jpg is 1024x529 for a 192x99 display slot
                    Settles it: whether a 2x screen needs the extra resolution.

Two things make this worth the keystrokes. A REVIEW you cannot resolve is useful information, whereas a candidate relayed as a defect costs the user time and costs the audit its credibility. And naming what would settle a REVIEW turns it into a task someone can pick up.

When a rule carries an example, the audit prints the corrected form under Write. Use it: it says what the fix looks like rather than describing it, and it saves rebuilding that shape from the recommendation every time.

Writing your replies

Keep replies simple and direct, in whatever language you write. A sober reply costs fewer tokens and less reading time.

  • Never use an em dash (—), in any language. Use a comma, a colon or a full stop.
  • Deliver the idea instead of announcing it. Drop openers such as "Here is the key point:" and state the point.
  • No pseudo-cleft sentences. Write "The cache matters", never "What matters is the cache".
  • No emphatic presentatives ("C'est X qui…", "Il y a X qui…", "It is X that…") and no detached fake subordinate clauses ("Because the query runs in a loop.").
  • No epanorthosis ("not X, but Y", "X, or rather Y"), no verbal anaphora (repeating the same opening across sentences), no binary antithesis ("less X, more Y").
  • No counted announcements ("Two things…", "Three reasons…") and no announced lists ("Here are the steps:"). Give the items directly.
  • If the stop-slop skill is installed, run it on your reply before sending. It catches the AI writing patterns these rules do not list.

Token sobriety

rules/tokens.json holds the 30 NR-TOK rules of the Institut du Numérique Responsable. Print them with eco-audit.sh --rules tokens when a session starts on real work. Always apply the mandatory ones:

  • NR-TOK-007: start from the files the task names, never the whole repository.
  • NR-TOK-011: a summary keeps errors verbatim, and negations, numbers, units, paths, identifiers, commands and code exactly.
  • NR-TOK-015: locate the cause before editing; no chain of trial fixes.
  • NR-TOK-016: edit the lines that change, never the whole file.
  • NR-TOK-022: stop once the acceptance criteria pass.
  • NR-TOK-027: no saving justifies a loss of security, correctness, accessibility, maintainability or clarity.
  • NR-TOK-030: after a task that ran tools or changed files, end with the short report printed by --rules tokens. Skip it for a plain question. Never invent a metric: write "unavailable".

NR-TOK-023 to 026 and NR-TOK-028 apply when the environment allows them (model choice, cache, metrics). The others apply by default.

Recording a decision

A candidate you dismiss once will come back on the next run, and the run after that. Dismissed six times, it teaches everyone to skim past the audit, which costs more than the rule ever saved.

.green-claude/decisions.md at the repository root closes the question:

ECO-CONT-01  docs/index.html  ACCEPTED  logo.jpg kept as the og:image fallback
ECO-SH-05    install.sh       TODO      two mktemp with no trap

ACCEPTED silences that rule for that file, and only there. TODO stays visible, because a debt taken on deliberately is not an exemption. The audit says how many findings it hid and where the file lives, so nothing disappears without a trace.

Propose an entry when you and the user settle a trade-off, and read the file before relaying a finding the team has already answered. Suggest it, and let the user write it: a decision recorded on their behalf is a decision they never made.

While writing code, stay quiet: apply the rules and mention only what the user would otherwise be surprised by. One line at the end, naming the rule id, beats a running commentary on every rule you honoured.

When a rule conflicts with what the user explicitly asked for, state the trade-off in one sentence, propose the lighter option, and deliver what was asked. A user who requested two-second polling with their eyes open is making a decision, not a mistake.

Browse mode (/green-claude)

Checklist of the 9 RGESN families, the 13 responsible-use practices and the 30 token sobriety rules, with each rule's title and recommendation. Useful for a design review before any code is written. Print it with bash "$SKILL_DIR/scripts/eco-audit.sh" --rules all rather than reading the JSON files.

Common mistakes

A hit from the audit script is a candidate, not a confirmed violation. When a Note line comes with a result, read it before relaying anything to the user: it explains the precise limit of that rule's pattern or detector (known false positive, threshold, scope). It lives in the rule itself, so it stays current, unlike a separate list here that would go stale with every new rule.

Guaranteed application

Loading this skill remains the model's decision: it happens often, not every time. For a check that depends on no one, the repository ships hooks/green-claude-audit.sh, wired as PostToolUse on Write|Edit|MultiEdit. Claude Code runs it after every code file written and hands you back the patterns it found. It only audits what the write added, and stays silent when it finds nothing.

What this skill does NOT do

The "zero token" response cache cannot be handled by a skill: it has to be wired through UserPromptSubmit/Stop hooks, which intercept the request before it reaches the model (see hooks/ at the repository root). Caching is explicitly opt-in per request with [cache] , for self-contained factual questions only. Ordinary prompts always reach Claude. Cached replies are displayed to the user but are not added to Claude's conversation context. The model choice (Haiku/Sonnet/Opus) can be changed mid-session with /model: this skill won't do it for you, but nothing stops you from suggesting a lighter model when a task is plainly out of proportion with it.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Green Claude làm được gì?

Use when Claude writes, modifies or reviews code (file formats, network requests, images/assets, loops, caching, pagination, dependencies, framework or AI model choice), when the user asks for a sobriety audit ("eco-design audit", "check this code for sobriety", "--eco-check", "RGESN", "GR491", "eco-design", "green IT", "audit éco-conception", "vérifie la sobriété de ce code", "écoconception"), or when invoked via /green-claude to walk through the rule checklist.

Vì sao nên dùng Green Claude trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Green Claude là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Green Claude trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Institut-du-Numerique-Responsable/green-claude/tree/main/skills/green-claude. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Green Claude?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Green Claude với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Green Claude với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Green Claude có miễn phí không?

Kỹ năng này được Institut-du-Numerique-Responsable phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇