Install any skill in seconds. Free to start, no credit card required.
Get Started Free →sonichi/electron-overlay-dimming
Reusable pattern for focus-based auto-dimming of Electron overlay windows — when the app loses focus, all overlay windows fade to a low opacity; when an overlay regains focus, they return to their configured opacity.
Passed 21 of 22 test cases with the skill, and 15 of 22 without it.
and 4 more in the full report
7 fixed14 passed either way0 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
In the `browser-window-focus` handler for an Electron overlay app, what exact state change must occur before calling `applyOpacityAll()` to restore window transparency?
| Checked | Without skill | With skill |
|---|---|---|
| The appDimmed flag is set to false prior to calling applyOpacityAll. | Missed | Passed |
The instructions your model reads when the skill loads.
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.
Two pitfalls the pattern handles:
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.appDimmed ? DIM_OPACITY : overlay.config.opacity.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));
test cases passed, vs 15 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.