impact
Skill9 starsChanged 8 months agoMITView on GitHub
Show the environmental cost of this coding session — CO2 emitted, water consumed, and what a smarter model choice would have saved.
- Reads credentials
9 other projects use a version of this.
Adopted by
Most recently taken up by
- talayash/spring-fleettheir own version, first seen Sep 29, 2026
- gonimar/claude-web-studiotheir own version, first seen Sep 27, 2026
- shammlo/zoth-skillstheir own version, first seen Sep 24, 2026
- Jsnnmsc/10000x-engineertheir own version, first seen Sep 3, 2026
- drafthq/drafttheir own version, first seen Jul 30, 2026
- Anuj7411/sipcodetheir own version, first seen Jun 17, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- mbwsims/claude-universe★ 72same name
- Anuj7411/sipcode★ 46same name
- drafthq/draft★ 40same name
- gonimar/claude-web-studio★ 5same name
- BostonOrange/claude-code-framework★ 2same name
- talayash/spring-fleet★ 2same name
- Jsnnmsc/10000x-engineer★ 1same name
- ajsai47/aic-agi★ 0same name
- shammlo/zoth-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- historySkill
- sync-modelsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 14 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
If the file is empty or missing, tell the user the status line hasn't recorded data yet.
- Distinctive: line 35
Read the cached recommendation using the same session ID from step 1:
- Distinctive: line 40
If the file is empty, missing, or stale, run the recommend script.
- Distinctive: line 45
If that doesn't find a file, try:
- Distinctive: line 59
Read the model cache to get pricing and energy data for the recommended model:
- Distinctive: line 86
Use these refreshed numbers for the bill below.
- Distinctive: line 93
Do NOT use abstract comparisons like grams of coal, ml of gasoline, or "a tree needs X days." Use: miles driven in a car going nowhere, …
- Distinctive: line 98
Not Diamond optimizes for the cheapest model that can handle the task accurately.
- Distinctive: line 100
If the recommended model is cheaper than current:
- Distinctive: line 105
If the recommended model is more expensive than current:
- Distinctive: line 110
If the recommended model IS the current model, say: "not diamond agrees: [current model] was the right call."
- Very specific: line 112
If no_api_key error: show the impact numbers, then add: "set NOTDIAMOND_API_KEY to see what a cheaper model would have saved.
- Very specific: line 117
Read anomalous turns from ~/.ecoguilt/history.jsonl for the current session:
- Distinctive: line 123
If any exist, show each one.
- Distinctive: line 133
If none: "no anomalies this session."
- Very specific: line 135
If ~/.ecoguilt/history.jsonl doesn't exist yet: omit the section silently (Stop hook hasn't fired yet).
- Distinctive: line 137
Footer: Add a small note at the end: "*as of last tool use — the status line includes this response's tokens.*"
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Show the environmental impact of this coding session.
Step 1: Find the session and get the numbers
The status line writes state to /tmp/ecoguilt-{session_id}.json and a per-cwd pointer at /tmp/ecoguilt-cwd-{hash}.txt. Use the pointer to find the correct session for this working directory:
CWD_HASH=$(echo -n "$PWD" | md5 2>/dev/null || echo -n "$PWD" | md5sum 2>/dev/null | cut -d' ' -f1)
SESSION_ID=$(cat "/tmp/ecoguilt-cwd-${CWD_HASH}.txt" 2>/dev/null)
if [ -n "$SESSION_ID" ]; then
STATE_FILE="/tmp/ecoguilt-${SESSION_ID}.json"
else
STATE_FILE=$(ls -t /tmp/ecoguilt-*.json 2>/dev/null | grep -v 'models\|test\|recommend\|cwd' | head -1)
SESSION_ID=$(echo "$STATE_FILE" | sed 's|/tmp/ecoguilt-||; s|\.json||')
fi
echo "STATE: $STATE_FILE"; cat "$STATE_FILE" 2>/dev/null || echo '{}'If the file is empty or missing, tell the user the status line hasn't recorded data yet.
The file contains: input_tokens, output_tokens, total_tokens, total_kwh, co2_g, water_ml, model, cost_usd, input_kwh_per_token, output_kwh_per_token.
These numbers are the single source of truth — they match what the status line displays. Do NOT recalculate energy, CO2, or water from tokens. Use the values from this file directly.
Step 2: Get Not Diamond's recommendation
Read the cached recommendation using the same session ID from step 1:
cat "/tmp/ecoguilt-${SESSION_ID}-recommend.json" 2>/dev/null || echo '{}'If the file is empty, missing, or stale, run the recommend script. First find the transcript:
ls -t ~/.claude/projects/*/${SESSION_ID}.jsonl 2>/dev/null | head -1If that doesn't find a file, try:
ls -t ~/.claude/projects/*/*.jsonl 2>/dev/null | head -1Then:
bash ${CLAUDE_SKILL_DIR}/../../scripts/recommend.sh "<transcript_path>" 2>/dev/null || echo '{"error": "failed"}'The response is JSON with model, provider, and messages_sent, or {"error": "no_api_key"} if the user doesn't have NOTDIAMOND_API_KEY set.
Step 3: Calculate the comparison
Read the model cache to get pricing and energy data for the recommended model:
cat /tmp/ecoguilt-models.json 2>/dev/null || echo '[]'This file is auto-generated by sync-models.sh from the user's models.json + Not Diamond's API. Each entry has: id, provider, display, input_price ($/1M tokens), output_price ($/1M tokens), input_kwh_per_token, output_kwh_per_token, available.
The session state file has: input_tokens, output_tokens, input_kwh_per_token, output_kwh_per_token, cost_usd.
For the recommended model, look up its entry in the model cache by id, then calculate using pricing ratio scaling (more accurate than token-based estimates due to context caching):
- cur_avg_price = (current input_price + current output_price) / 2
- rec_avg_price = (recommended input_price + recommended output_price) / 2
- cost = state.cost_usd × (rec_avg_price / cur_avg_price)
- kWh = state.total_kwh × (rec_avg_price / cur_avg_price)
- CO2 = kWh × 0.39 × 1000 (grams)
- water = kWh × 1800 (ml)
- miles driven (400g CO2 per mile)
- bottles of water (500ml each)
Step 4: Re-read state before presenting
The state file updates on every status line render. Since steps 1–3 consumed tokens (running bash commands), the file is now stale. Re-read it so the bill matches the status line:
cat "$STATE_FILE" 2>/dev/null || echo '{}'Use these refreshed numbers for the bill below. Recalculate the recommended model's comparison against the updated token counts.
Step 5: Present the bill
Section 1 — what you used: State the raw numbers one per line: tokens, kWh, CO2, water, cost. Then the visual comparisons (miles driven, bottles of water, lightbulb hours, etc). Each line should be a scene the reader can picture.
Do NOT use abstract comparisons like grams of coal, ml of gasoline, or "a tree needs X days." Use: miles driven in a car going nowhere, bottles of water poured down a drain, lightbulbs left on in empty rooms, smartphone charges.
IMPORTANT: each comparison must describe a DIFFERENT resource. Do not repeat the same resource in two different ways (e.g. "2 bottles of water" and "half a day's drinking water" are the same thing — pick one). One line per resource: one for CO2, one for water, one for energy.
Section 2 — not diamond's verdict: Not Diamond optimizes for the cheapest model that can handle the task accurately. Its recommendation overrides naive cost comparison — if it suggests a more expensive model, that means accuracy requires it for this task.
If the recommended model is cheaper than current:
- "not diamond says: [display name] could have handled this."
- Show the same metrics recalculated for that model using pricing ratio scaling
- The delta: "that's Xg less CO2. X fewer bottles of water. $X cheaper."
If the recommended model is more expensive than current:
- "not diamond says: [display name] would be more accurate. that's a $X tradeoff."
- Show the metrics recalculated for that model
- The delta: "that's Xg more CO2. X more bottles of water. $X more expensive — but not diamond thinks this task needs it."
If the recommended model IS the current model, say: "not diamond agrees: [current model] was the right call."
If no_api_key error: show the impact numbers, then add:
"set NOTDIAMOND_API_KEY to see what a cheaper model would have saved. get a key at notdiamond.ai"
Section 3 — anomalies this session:
Read anomalous turns from ~/.ecoguilt/history.jsonl for the current session:
grep "\"session_id\":\"${SESSION_ID}\"" "$HOME/.ecoguilt/history.jsonl" 2>/dev/null | jq -c 'select(.anomaly != null)' | sort -t'"' -k2If any exist, show each one. Use the directional breakdown from the anomaly record:
⚠ turn 4 output_spike out:8,234 / in:412 +$0.18 "write a comprehensive test suite for all..."
⚠ turn 7 input_spike in:9,102 / out:380 +$0.09 "paste the full logs below:"
⚠ turn 9 cache_break 82% → 12% +$0.31 "can you refactor this entire module..."For output_spike/input_spike: show turn_output_tokens and turn_input_tokens from the anomaly object.
For cache_break: show prev_cache_efficiency → turn_cache_efficiency as percentages.
If none: "no anomalies this session."
If ~/.ecoguilt/history.jsonl doesn't exist yet: omit the section silently (Stop hook hasn't fired yet).
Footer: Add a small note at the end: "as of last tool use — the status line includes this response's tokens."
Tone: Deadpan. The numbers do the talking. No softening, no "great job for checking!" — just the bill and what could have been different.
$ARGUMENTS
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

