electron-overlay-dimming

electron-overlay-dimming is a skill for Claude Code, Codex from sonichi/sutando. It costs 67 tokens per session (639 once invoked), scanned A, original, MIT.

A reusable pattern for Electron, a framework for building desktop apps with web technologies, that dims always-on-top overlay windows when the app loses focus. The overlays return to their configured opacity when one of them is focused again.

In plain words
What is it for?
Use it when building Electron apps with one or more persistent overlay windows. It helps implement focus-based dimming and restoration in the app's main process.
Why use it?
It keeps overlays from blocking the user's view while they work in another app. It also prevents flicker when the user switches between overlay windows and preserves each window's chosen opacity.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building Electron apps with one or more persistent overlay windows. It helps implement focus-based dimming and restoration in the app's main process.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sonichi/sutando/electron-overlay-dimming
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sonichi/sutando --skill electron-overlay-dimming
Clone the repo
git clone --depth 1 https://github.com/sonichi/sutando

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for electron-overlay-dimming

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonichi/sutando/electron-overlay-dimming/github.svg)](https://agentmods.dev/skills/sonichi/sutando/electron-overlay-dimming)
Your own site
<a href="https://agentmods.dev/skills/sonichi/sutando/electron-overlay-dimming"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/electron-overlay-dimming/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for electron-overlay-dimming

Your own site · 80×15
<a href="https://agentmods.dev/skills/sonichi/sutando/electron-overlay-dimming"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/electron-overlay-dimming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 639 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.00639
Opus 5.5 $0.00027 $0.00256
Sonnet 5.5 $0.00013 $0.00128
Haiku 4.5 $0.00007 $0.00064

Measured 1mo ago against content hash bd1546a98b77, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

electron-overlay-dimming scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/electron-overlay-dimming/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Electron Overlay Auto-Dimming

A small, self-contained pattern for always-on-top Electron overlays: the overlays stay readable while in use but fade out of the way when the user clicks into another application, and restore when focus returns to an overlay. First shipped in the benchmark-overlay app.

Behaviour

  • App loses focus (no overlay window is focused) → every overlay window's opacity drops to a dim level (~0.2).
  • Focus returns to any overlay → every overlay restores to its configured opacity (not blindly to 1.0 — it respects any per-overlay opacity the user set).

Why it's not naive

Two pitfalls the pattern handles:

  1. Inter-overlay clicks. Clicking from overlay A to overlay B fires a blur then a focus. Dimming on raw blur would flicker. The fix: on blur, defer ~80 ms and only dim if BrowserWindow.getFocusedWindow() is then null — i.e. the app truly lost focus, not just one window.
  2. Configured opacity. Overlays may each have a user-set base opacity. Auto-dim must dim from and restore to that value, so opacity is always computed as appDimmed ? DIM_OPACITY : overlay.config.opacity.

Reference implementation (main process)

const DIM_OPACITY = 0.2;
let appDimmed = false;

function effectiveOpacity(o) {
  return appDimmed ? DIM_OPACITY : o.config.opacity;
}

function applyOpacityAll() {
  for (const o of Object.values(OVERLAYS)) {
    if (o.win && !o.win.isDestroyed()) o.win.setOpacity(effectiveOpacity(o));
  }
}

app.on('browser-window-focus', () => {
  if (appDimmed) { appDimmed = false; applyOpacityAll(); }
});

app.on('browser-window-blur', () => {
  // Defer so an A→B overlay click doesn't briefly dim.
  setTimeout(() => {
    if (!appDimmed && !BrowserWindow.getFocusedWindow()) {
      appDimmed = true;
      applyOpacityAll();
    }
  }, 80);
});

Any code path that sets a window's opacity (e.g. a config handler) must route through effectiveOpacity() so opacity changes made while dimmed don't undim the window.

Read the full file on GitHub · 73 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 73 lines · 67 tokens per session scan A bd1546a98b77

Subscribe to this mod's changes

electron-overlay-dimming is a skill published in the GitHub repository sonichi/sutando (400 stars, last pushed today), licensed MIT. It adds 67 tokens to every session and 639 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

frontend-design

Design-quality layer for frontend code — typography, color, motion, spatial composition, and avoiding generic "AI slop" aesthetics. Use this as a companion when you are already writing or styling frontend code and want it to look distinctive and production-grade. For building an app, dashboard, tracker, calculator…

vellum-ai/vellum-assistant · 96 tokens

liquid-glass

Apple Liquid Glass design system. Use when building UI with translucent, depth-aware glass morphism following Apple's design language. Provides CSS tokens, component patterns, dark/light mode, and animation specs.

fengshao1227/ccg-workflow · 43 tokens

adapt

Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.

fengshao1227/ccg-workflow · 51 tokens

gmail

Manage Gmail email — drafting, sending, organizing, filters, vacation replies, and inbox analysis.

vellum-ai/vellum-assistant · 20 tokens

app-builder

Build and edit small, personal visual tools and artifacts — dashboards, trackers, calculators, data visualizations, charts, simple landing pages, and slide decks the user wants for THEMSELVES. This is the right skill whenever the user asks to "visualize this," "make a chart," or "build an artifact" for their own use…

vellum-ai/vellum-assistant · 162 tokens

assistant-migration

Migrate from ChatGPT, Claude, OpenClaw, Hermes, Manus, and other AI assistants into Vellum by inspecting their data exports, conversation archives, files, prompts, custom instructions, memory, saved memories, tools, GPTs, workflows, integrations, and relationships, then mapping as much as safely possible into Vellum…

vellum-ai/vellum-assistant · 90 tokens