Logo: Build And Verify

Build And Verify

Communautéit
daveebbelaar
build-and-verify

Build a SwiftUI macOS app from the command line, install it, and check light and dark window snapshots of every page before calling a change done. Use after any UI code change, when a build fails, or when the user asks to run, screenshot, or check the app.

Iwwersiicht

Editeurdaveebbelaar
Repositorybama
Skill-Nummbuild-and-verify
Stären
952
Forks
136
Matgeliwwert Dateien
2
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    daveebbelaar huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Build And Verify an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/daveebbelaar/bama/tree/main/skills/ship/build-and-verify
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/daveebbelaar/bama.git /tmp/bama
mkdir -p .claude/skills
cp -r /tmp/bama/skills/ship/build-and-verify .claude/skills/build-and-verify
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Build And Verify an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Build And Verify automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Build And Verify net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Build and verify

A change is done when four things are true:

  1. ./build.sh finishes with no errors.
  2. You looked at the light and dark snapshots of every page you touched.
  3. The snapshots match what the user story or reference screenshot asks for.
  4. The grid checks pass (layout-grid skill).

App not made from the new-mac-app template (Xcode, XcodeGen, a menu bar utility, Swift 5)? Map the commands below with existing-app.md first.

Do not report a UI change as done from the code alone. SwiftUI code that compiles can still render an empty sidebar, clipped text, or unreadable dark mode.

1. Build

bash
./build.sh            # release build, installs ~/Applications/<AppName>.app
./build.sh --debug    # faster build while iterating
./build.sh --open     # also restarts the app so the user sees the new build

Read the errors, fix them, and build again. Fix the first error first: later errors often come from it. If a new file is "not in scope" right after you created it, run swift package clean --scratch-path ~/Library/Developer/<AppName>/build.

2. Snapshot

Run the installed binary directly with a test database and a folder for the images. The app opens, walks through every sidebar page and every Settings tab in light and dark mode, saves one PNG per page and mode, and quits.

bash
tools/snap.sh
# SNAPSHOT /tmp/<AppName>-shots/all-light.png
# ...
# SNAPSHOT done /tmp/<AppName>-shots

tools/snap.sh deletes the old test store (with its -wal and -shm files) and the saved window state first, then runs with sample data (APP_SEED=1). Without that, seed data goes stale, and one crashed run leaves a "reopen windows?" alert that hangs every later run.

Use APP_SNAPSHOT_PAGES=today,inbox to limit the pages. Add settings to include the Settings tabs.

In every image, look for three bugs agents often miss: a focus ring or selected text that nobody asked for, a scroll bar with nothing to scroll, and an empty band under short content. The fixes are in mac-design, "Windows open calm".

To see scroll bars as people with a mouse see them, add -AppleShowScrollBars Always after the binary path. It changes only this run.

Always use APP_STORE with a path in /tmp. Never take snapshots against the user's real database in ~/Library/Application Support/<AppName>/.

Seed data

Empty pages only show empty states. The template's Sources/<AppName>/SeedData.swift 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.

Screen Recording permission

Snapshots use screencapture -l <window>, which shows glass, sidebars, and materials exactly as on screen. It needs Screen Recording permission for the app that runs the command (Terminal, Ghostty, or Claude). If a snapshot line ends with (fallback: ...), the permission is missing and sidebars and glass render blank. Ask the user to allow it in System Settings > Privacy & Security > Screen & System Audio Recording, then restart the terminal.

Missing snapshots

If every snapshot fails, or screencapture says "could not create image from window", the display is probably asleep: an unattended Mac turns it off. The template's snapshot mode wakes the display itself. For captures from outside the app (like window-shot.sh), run caffeinate -u -t 2 first.

If some states print "no window" while others work, another app hid yours during the run. Computer use does this to apps it does not control, and so does Hide Others. The template's snapshot mode un-hides the app and brings the window forward before each capture. Run it again, and avoid using computer use in another session at the same time.

3. Check the grid

bash
tools/grid-lint.sh
swift tools/check-layout.swift /tmp/<AppName>-shots/*-layout.json

Both print PASS. On a FAIL, call the Skill tool with layout-grid: it has the rules, the overlay, and a table of fixes.

4. Look

Open every PNG with the Read tool and check, in this order:

  • Nothing is blank, clipped, or overlapping. Text fits. Sidebars show their items.
  • Dark mode is readable. No fixed white or black surfaces.
  • The page matches the story or the reference screenshot (layout, labels, order).
  • The mac-design rules hold: glass only on controls, one accent, SF Symbols, system text styles, 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.

5. Interaction checks

Snapshots show state, not behavior. Run tools/selftest.sh (exit 0 when every check passes) and add a check for each new action. The test-mac-app skill covers unit tests, the self-test, key events, the menu check from outside, and a debug bridge.

Inactive windows

Gray traffic lights mean the window was not key when it was captured: sidebar text, selection, and toggles look dimmer than in use. A snapshot of an inactive window does not count as reviewed. Run the snapshots again while nobody else uses the screen, and do not "fix" dim text you only see there.

Debug output and private screens

A GUI app started with its output going to a file buffers print, and the lines are lost when the process is killed. Write debug lines to stderr (FileHandle.standardError.write) behind an environment flag.

Do not take full-screen captures to check your app: they show the user's other windows. Capture your own window, or add a mode to the app that renders the state you want to see (prefilled text, an open sheet).

6. Commit

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.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Build And Verify?

Build a SwiftUI macOS app from the command line, install it, and check light and dark window snapshots of every page before calling a change done. Use after any UI code change, when a build fails, or when the user asks to run, screenshot, or check the app.

Firwat Build And Verify op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Build And Verify besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Build And Verify an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/daveebbelaar/bama/tree/main/skills/ship/build-and-verify an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Build And Verify benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Build And Verify benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Build And Verify domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Build And Verify gratis?

Jo. daveebbelaar huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇