/bawa:build-and-verifyfrom bawa
Builds a WinUI 3 app, installs it, and captures light/dark snapshots of every page to verify UI changes. Use after any UI code change or when a build fails.
Ships in bawa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A change is done when four things are true:
./build.ps1 finishes with no errors and no warnings.layout-grid skill).App not made from the new-windows-app template (a Visual Studio
solution, MSIX, WPF, WinForms)? Map the commands below with
existing-app.md first.
Do not report a UI change as done from the code alone. XAML that compiles can still crash at launch, render an empty list, clip text, or be unreadable in dark mode.
./build.ps1 # release build, installs %LOCALAPPDATA%\Programs\<AppName>
./build.ps1 -Dev # debug build, faster while iterating
./build.ps1 -Open # also starts the new build so the user sees it
Read the errors, fix them, and build again. Fix the first error first:
later errors often come from it. build.ps1 closes a running copy first,
because Windows locks the files of a running app.
tools/snap.ps1
# SNAPSHOT C:\Users\<you>\AppData\Local\Temp\<AppName>-shots-<checkout>\all-light.png
# ...
# SNAPSHOT done C:\Users\<you>\AppData\Local\Temp\<AppName>-shots-<checkout>
The app opens on a fresh test store with sample data (APP_SEED=1),
switches to every navigation page and Settings in light and dark, saves one
PNG per page and mode, and quits. Each PNG gets a -layout.json for the
grid check.
tools/snap.ps1 -Pages all,settings limits the pages. -Accent green
shows another accent. -Grid draws the grid and the probes.
In every image, look for three bugs agents often miss: a text box with a
caret that nobody asked for, a scroll bar with nothing to scroll, and an
empty band under short content. The fixes are in windows-design,
"Windows open calm".
Always use APP_STORE with a path in %TEMP%. Never take snapshots
against the user's real database in %LOCALAPPDATA%\<AppName>\.
Snapshot mode calls PrintWindow with PW_RENDERFULLCONTENT on the app's
own window, so Mica, the title bar, and every control look as on screen,
even when another window covers it. It crops the invisible resize border
with DWMWA_EXTENDED_FRAME_BOUNDS. No permission is needed. Before each
capture it brings the window to the front, so the title bar is active and
Mica is full strength. Never take full-screen captures to check your app:
they show the user's other windows.
A window with SetWindowDisplayAffinity(WDA_EXCLUDEFROMCAPTURE) (a
recording capsule, a toast that must stay out of a video) comes out solid
black in PrintWindow too. In snapshot mode, set it to WDA_NONE before
the capture and back after.
A page taller than the window shows only its first screen. Add a snapshot surface for the lower part (scroll the page first) when it matters.
Empty pages only show empty states. SeedData.cs fills an empty test
store when APP_SEED=1 is set. Grow it with the app: 10 to 20 items with
long and short titles, dates in the past and future, every priority and
status, and only what a person can create in the app.
CRASH ... in the output: the app died; the line names the exception.
Fix it before anything else.TIMEOUT: the run hung, usually on an open ContentDialog or an
await that never returns. The tool kills it after 180 s.0xC000027B with no CRASH line: the crash came
before the log was ready, in the App constructor. Look in Event Viewer
Windows Logs > Application for the faulting module.
SetThreadExecutionState; a locked PC still renders nothing. Unlock
it and run again.PNGs are in physical pixels, so at 125% a 1100 epx window is 1375 pixels wide. That is expected. Compare layouts in epx (the layout files), not in PNG pixels.
tools/grid-lint.ps1
tools/check-layout.ps1
Both print PASS. On a FAIL, call the Skill tool with layout-grid: it has
the rules, the overlay, and a table of fixes.
Open every PNG with the Read tool and check, in this order:
windows-design rules hold: Mica on the window, cards for content,
one accent, Segoe Fluent Icons, the type ramp, sentence case, empty
states that invite the first action.Describe what you see in one or two sentences per page in your report, and name the PNG paths so the user can open them.
Snapshots show state, not behavior. Run tools/selftest.ps1 (exit 0 when
every check passes) and add a check for each new action. The
test-windows-app skill covers unit tests, the self-test, keyboard
accelerators, UI Automation from outside, and a debug bridge.
A WinUI app has no dependable stdout: a redirected handle often stays
empty, and a pipe can keep the reader waiting after the app quits. Write
agent output with AgentLog.Line, which also appends to the file in
APP_LOG. tools/common.ps1 sets it and prints the file.
When the build is clean and the snapshots look right, commit with a message that says what the user can now do: "Add tasks from the quick-add panel", not "Update views".
Done when the four conditions at the top hold and the change is committed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub daveebbelaar/bawa --plugin bawa22 skills in this plugin
/agent-cliOptional command line and MCP server for a Windows app, so Claude Code, Codex, and scripts can drive it (list, add, change, search, act) through the running app. Use when the user wants agents to work with their app or its data, asks for a CLI, an MCP server, or automation for the app, or says "Claude should be able to use my app"./app-briefOne-page brief (docs/BRIEF.md) for a new Windows app, written before any code. Use when the user has an app idea, wants to replace an app they pay for, or the research and clone skills are done./app-iconWindows app icon drawn as an SVG (Icon/AppIcon.svg), rendered by tools/make-icon.ps1 into a multi-size AppIcon.ico and AppIcon.png, and reviewed on light and dark taskbar and Start backgrounds, with hand-tuned small sizes. Use when the user wants an app icon, a better icon, or a taskbar or Start icon./bawaBuild any Windows app. Start here to pick the next skill for a native Windows app./cloneWalk through any existing app (native Windows app with computer use, web app with a browser), screenshot every screen, menu, and dialog, write a screen index, and turn it into user stories. Use when the user wants to clone, rebuild, replace, or copy the design of an app, or says "screenshot every screen"./csharp-winuiC# 14 and WinUI 3 code rules for Windows apps, including threading, x:Bind, observable models, SQLite, Win32 interop, and fixes for common build and launch errors. Use when writing, reviewing, or debugging C# or XAML in a WinUI app, or on XamlParseException, 0xC000027B crashes, binding, or threading errors.Other plugins' skills for the same job