gui-debug

A method for checking the exact pixels of a macOS app window after changing its appearance. It captures only the target window and reads the colors and transparency of individual pixels.

In plain words
What is it for?
It helps test and diagnose rendering and window-frame changes in macOS desktop applications without typing into the app automatically.
Why use it?
It verifies visual changes precisely instead of relying only on a full-screen screenshot or visual judgment. It is intended for issues such as blur, opacity, rounded corners, symbols, and colors.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/natsukium/dotfiles/gui-debug
Any agent
npx skills add natsukium/dotfiles --skill gui-debug
Clone the repo
git clone --depth 1 https://github.com/natsukium/dotfiles

Made for: Claude Code, Codex.

Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00089 $0.00986
Opus 5 $0.00044 $0.00493
Sonnet 5 $0.00018 $0.00197
Haiku 4.5 $0.00009 $0.00099

Measured 2d ago against content hash 2b3b23fe4d4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gui-debug 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 2d 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.

modules/features/coding-agents/common/skills-darwin/gui-debug/SKILL.md · 77 lines

How it starts

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

macOS GUI debugging

Verify a rendering or window-chrome change by launching the app, capturing just its window, and probing pixels. None of this needs Accessibility permission. (System Events / keystroke injection does need it and is usually blocked — don't plan on typing into the window unattended.) Screen Recording permission is required for screenshots: if screencapture -x /tmp/full.png produces a non-black image, you have it.

Throughout, replace MyApp with the app's window-owner name (what shows in the menu bar / Activity Monitor) and myapp with the process name for pkill -x.

Launch → window id → capture

./path/to/MyApp 2>/tmp/app.log & sleep 4   # or: open -a MyApp
WID=$(osascript -l JavaScript -e '
ObjC.import("CoreGraphics");
const list = ObjC.castRefToObject($.CGWindowListCopyWindowInfo($.kCGWindowListOptionOnScreenOnly, $.kCGNullWindowID));
const arr = ObjC.deepUnwrap(list);
const w = arr.filter(x => x.kCGWindowOwnerName === "MyApp")[0];
w ? w.kCGWindowNumber : "none";')
screencapture -o -l$WID /tmp/app-win.png   # window only, no drop shadow
  • ObjC.castRefToObject is required — ObjC.deepUnwrap on the raw CFArrayRef fails with "Ref has incompatible type".
  • screencapture -o -l<id> captures the window's own composited content with per-pixel alpha: a translucent background shows its real alpha (e.g. 153 for opacity = 0.6), and rounded-corner pixels read fully transparent. This is the ground truth for transparency / corner-clip checks — a full-screen capture is not.
  • A tiling WM (or the app itself) may resize the window after launch — re-read kCGWindowBounds instead of assuming a fixed size. The post-resize capture also catches relayout bugs (AppKit reorders sublayers on the first layout pass).

Pixel probe — exact RGBA, no Python

osascript -l JavaScript -e '
ObjC.import("AppKit");
const rep = $.NSBitmapImageRep.imageRepWithContentsOfFile("/tmp/app-win.png");
function p(x,y){const c=rep.colorAtXY(x,y);return [c.redComponent,c.greenComponent,c.blueComponent,c.alphaComponent].map(v=>Math.round(v*255)).join(",");}
const h = rep.pixelsHigh*1, w = rep.pixelsWide*1;
JSON.stringify({w:w,h:h,center:p(Math.floor(w/2),Math.floor(h/2)),tl:p(2,2),bl:p(2,h-3),br:p(w-3,h-3)});'

Read the full file on GitHub · 77 lines

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. 2d ago First seen · 77 lines · 89 tokens per session scan A 2b3b23fe4d4d

Subscribe to this mod's changes

gui-debug is a skill published in the GitHub repository natsukium/dotfiles (103 stars, last pushed 2d ago), licensed CC0-1.0. It adds 89 tokens to every session and 986 once invoked, about $0.0004 per session on Opus 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

deep-research-team

This skill should be used when the user asks for "deep research", "research team", "comprehensive analysis", "research report", "investigate thoroughly", "compare X vs Y in depth", or needs synthesis across multiple sources with verification. It spawns a coordinated team of researcher agents across multiple rounds…

malob/nix-config · 132 tokens

audit-permissions

This skill should be used when the user asks to "audit claude permissions", "audit permissions", "review local claude settings", "promote permissions to global", "clean up claude settings", "find permission patterns", or wants to identify project-local Claude Code permissions that should be added to global…

malob/nix-config · 67 tokens

new-cask

This skill should be used when the user asks to "add a cask to homebrew", "create a homebrew cask", "add an app to homebrew", "new cask for", "homebrew cask for", "package an app for homebrew", "submit to homebrew-cask", "make a cask", "contribute a cask", or wants to package a macOS application for Homebrew.

malob/nix-config · 93 tokens

AI SDK Documentation

This skill should be used when working with Vercel AI SDK, AI Gateway, streamText, generateText, generateObject, streamObject, tool calling, or AI SDK providers. Also relevant for "ai-sdk", "@ai-sdk/" packages, or questions about AI SDK patterns, configuration, and best practices.

malob/nix-config · 68 tokens

icon-lookup

Workaround for Claude Code filtering BMP PUA Unicode (U+E000-U+F8FF). Supplementary PUA Nerd Font icons like 󰊤 󱃾 󰁹 (U+F0000+, e.g. nf-md-github, nf-md-kubernetes, nf-md-battery) can be written directly. BMP PUA icons (Powerline, Font Awesome, Devicons) require placeholder syntax like {{ U+E0A0 }} or {{ nf-fa-star…

malob/nix-config · 140 tokens

malo-find-skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

malob/nix-config · 69 tokens