test-mac-app
Skill1.7k starsChanged 11 days agoMITView on GitHub
Test a macOS app at three levels, from Swift Testing unit tests and an in-app self-test to a debug bridge that lets an agent drive the running app and read its state, plus computer use for real clicks. Use when adding logic, fixing a bug, before a release, or when the user asks for tests, end-to-end checks, or "make sure it works".
1 other project uses a version of this, 1 of them edited.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- Stijnus/dsh-rev-engedited, first seen Nov 8, 2026
Who's talking about daveebbelaar/bama
- Dave Ebbelaar“This Free Repo Lets Claude Code Build Any Mac App”YouTube · Oct 26, 2026 · 121k views
- tamhn“Claude Giờ Làm Được MỌI Ứng Dụng Mac (Skill Miễn Phí)”YouTube · Oct 29, 2026 · 8.1k views
- Claudical“App Store 대신 말로 만드는 Mac 앱 | Claude Code 플러그인 BAMA”YouTube · Nov 3, 2026 · 1.9k views
- Daksh“BAMA AI Agent builds native Mac apps from screenshots #shorts”YouTube · Oct 28, 2026 · 742 views
- Tech by Thilak“Claude can now clone Mac apps (BAMA, free and open source)”YouTube · Nov 2, 2026 · 310 views
The biggest 5 of 42 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 42
Talked about on GitHub, YouTube and the web (42 times).
On GitHub · 20
- Nov 5, 2026agent-skills.github.daveebbelaar.bama: 0-unstable-2026-11-01 → 1.1.1 — sudosubin/agents.nix0 reactions
- Nov 5, 2026claude-code-plugins.github.daveebbelaar.bama: 0-unstable-2026-11-01 → 1.1.1 — sudosubin/agents.nix0 reactions
- Nov 1, 2026claude-code-plugins.github.daveebbelaar.bama: 0-unstable-2026-10-29 → 0-unstable-2026-11-01 — sudosubin/agents.nix0 reactions
- Nov 1, 2026agent-skills.github.daveebbelaar.bama: 0-unstable-2026-10-29 → 0-unstable-2026-11-01 — sudosubin/agents.nix0 reactions
- Nov 1, 2026[GitHub Radar] 2026-11-01: 3 repo đáng xem — mrxcode-debug/pdt-github-hot-radar0 reactions
15 more on GitHub
- Oct 30, 2026H: Mac app (SwiftUI shell around the Rust binary), replaces the AppleScript droplet — fastermadman/PDFable0 reactions · 1 comment
- Oct 29, 2026agent-skills.github.daveebbelaar.bama: 0-unstable-2026-10-27 → 0-unstable-2026-10-29 — sudosubin/agents.nix0 reactions
- Oct 29, 2026claude-code-plugins.github.daveebbelaar.bama: 0-unstable-2026-10-27 → 0-unstable-2026-10-29 — sudosubin/agents.nix0 reactions
- Oct 28, 2026[Candidate] daveebbelaar/bama/skills/design/layout-grid - layout-grid — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 28, 2026[Candidate] daveebbelaar/bama/skills/design/design-system - design-system — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 28, 2026[Candidate] daveebbelaar/bama/skills/design/design-kit - design-kit — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 27, 2026agent-skills.github.daveebbelaar.bama: init at 0-unstable-2026-10-27 — sudosubin/agents.nix0 reactions
- Oct 27, 2026[Candidate] daveebbelaar/bama/skills/design/design-from-app - design-from-app — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 27, 2026[Candidate] daveebbelaar/bama/skills/design/app-icon - app-icon — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 27, 2026[Candidate] daveebbelaar/bama/skills/code/swift-swiftui - swift-swiftui — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 27, 2026claude-code-plugins.github.daveebbelaar.bama: 0-unstable-2026-10-26 → 0-unstable-2026-10-27 — sudosubin/agents.nix0 reactions
- Oct 27, 2026[Candidate] daveebbelaar/bama/skills/code/performance - performance — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 27, 2026[Candidate] daveebbelaar/bama/skills/code/os-integrations - os-integrations — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 27, 2026[Candidate] daveebbelaar/bama/skills/code/improve-architecture - improve-architecture — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 27, 2026claude-code-plugins.github.daveebbelaar.bama: init at 0-unstable-2026-10-26 — sudosubin/agents.nix0 reactions
On YouTube · 13
- Oct 26, 2026This Free Repo Lets Claude Code Build Any Mac App — Dave Ebbelaar121k views · 118 comments
- Oct 29, 2026Claude Giờ Làm Được MỌI Ứng Dụng Mac (Skill Miễn Phí) — tamhn8.1k views · 5 comments
- Nov 3, 2026App Store 대신 말로 만드는 Mac 앱 | Claude Code 플러그인 BAMA — Claudical1.9k views · 1 comment
- Oct 28, 2026BAMA AI Agent builds native Mac apps from screenshots #shorts — Daksh742 views
- Nov 2, 2026Claude can now clone Mac apps (BAMA, free and open source) — Tech by Thilak310 views
8 more on YouTube
- Oct 29, 2026Claude Code Mac App: One Sentence In, a Working App Out (Free BAMA Repo) — Simply AI217 views
- Oct 29, 2026Clone any native Mac app using AI agents 🚀 — LookOnThisGit117 views · 1 comment
- Nov 1, 2026AI Se Apni Mac App? 🖥️ — Suresh52 views
- Nov 2, 2026See an app you like? Claude Code rebuilds it as a Mac app (BAMA) — RocketLauncher Code40 views
- Oct 27, 2026Your AI can now build real Mac apps #shorts — No Short Answers36 views · 1 comment
- Oct 27, 2026BAMA: Agent Skills That Build Native Mac Apps #Shorts — Brix AI30 views
- Oct 29, 2026BAMA + 2 more repos · hotin.ai daily Oct 29, 2026 #Shorts — HotInAI27 views
- Nov 4, 2026bama: Rebuild any Mac app instantly — Dail Finds Dev | Repos, Tools, Sites2 views
On the web · 9
- Oct 30, 2026Build your own Mac app with Claude Code | aruntastic — aruntastic.com
- Oct 26, 2026This Free Repo Lets Claude Code Build Any Mac App · CHOOSETO.AI — chooseto.ai
- Oct 24, 2026daveebbelaar/bama - The Skill Leaderboard — skillleaderboard.com
- Feb 15, 2026Product TEA Test: GAMMA - by TEA (The Era Arc) and Sam Li — tea2025.substack.com
- Dec 28, 2025My Experience Using the BMAD Framework on a Personal Project (Patience Required) — dev.to
4 more on the web
- Dec 6, 2025Finding My Brain Again in the Middle of the AI Fire hose | by Shay Dratler — dratler-shay.medium.com
- Sep 14, 2025#6 - ChatGPT Agent, Youware, Gamma - by Brandon — behindonai.substack.com
- Jul 16, 2025My 15 favorite apps I use daily. We spend hours each day on our phones… | by Bex Jeanson — userbexperiencedesign.medium.com
- Aug 11, 2023Last Day with @daveebbelaar here at Termene.ro in Nuba, Mamaia. I got some great insight on how to code an AI Agent that can take notes for your meetings and organise them … | David Podut — linkedin.com
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- Stijnus/dsh-rev-eng★ 196% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- agent-cliSkill
- improve-architectureSkill
- os-integrationsSkill
- performanceSkill
- swift-swiftuiSkill
- app-iconSkill
- design-from-appSkill
- design-kitSkill
- design-systemSkill
- layout-gridSkill
- mac-designSkill
- ux-designSkill
- cloneSkill
- researchSkill
- user-storiesSkill
- build-and-verifySkill
- improve-loopSkill
- app-briefSkill
- bamaSkill
- new-mac-appSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 63
Always point it at a store in /tmp.
- Distinctive: line 67
Every action's Shortcuts title equals its menu title.
- Very specific: line 68
Every SF Symbol name exists (NSImage(systemSymbolName:accessibilityDescription:)).
- Distinctive: line 69
Every URL action round-trips.
- Distinctive: line 73
Smoke step: start every background timer, sampler, and observer for a few seconds, then print PASS.
- Very specific: line 106
Test typing by typing: send key events through NSApp.sendEvent and check what the field received.
- Very specific: line 124
Do not test SwiftUI menu state from inside the app.
- Very specific: line 130
Check the real menu from outside, through Accessibility, on a seeded test copy.
- Distinctive: line 137
Write these steps into the app's CLAUDE.md, so every agent runs them after touching commands.
- Very specific: line 145
Before each run, delete ~/Library/Saved Application State/<bundle id>.savedState.
- Very specific: line 146
After a crash, the next launch shows a "reopen windows?" alert that blocks every later run with no output.
- Very specific: line 149
Delete the old test store and its -wal and -shm files before a seeded run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test a Mac app
Three levels, cheapest first. Each new story gets the cheapest level that can prove its acceptance criteria. A bug fix starts with a test that fails.
| Level | Proves | Speed |
| Unit tests (Swift Testing) | Rules, parsing, data | Seconds |
Self-test (--selftest) | The app's real functions on a test store | Seconds |
| Key events and menu audit (inside the self-test) | Keyboard flows and every shortcut, without the screen | Seconds |
| Debug bridge + computer use | Global shortcuts, panels, permissions, other apps | Minutes |
Snapshots (build-and-verify skill) prove how it looks. This skill proves
how it behaves.
1. Unit tests
Logic lives in a library target (<App>Kit) with no SwiftUI, so tests run
without the app.
import Testing
@testable import AppKitCore
@Test("Natural dates", arguments: [("tomorrow 9am", 1, 9), ("next fri", 5, nil)])
func parses(_ phrase: String, dayOffset: Int, hour: Int?) throws {
let result = try #require(DateParser.parse(phrase, now: .fixed))
#expect(result.dayOffset == dayOffset)
#expect(result.hour == hour)
}swift test --scratch-path ~/Library/Developer/<App>/test-build- Fix the clock (
now:parameter) and the store path in every test. - A parser that removes text from what the user typed needs at least 20 negative rows: real titles that contain date or time words ("Watch Friday Night Lights"). Add consistency rows for related phrases ("next week" and "next friday"), and a tested way to undo a parsed part.
- Table tests for anything with many cases. Keep the table in
docs/research/<topic>.mdtoo, and add a row there before changing behavior. A date parser easily needs 100 rows.
2. Self-test
A launch flag that runs the same functions the UI calls, prints PASS or FAIL per step, and exits 0 or 1:
APP_STORE=/tmp/<App>-self.store ~/Applications/<App>.app/Contents/MacOS/<App> --selftest
# PASS add task
# PASS complete task
# PASS undoAlways point it at a store in /tmp. Never at the user's data.
Checks worth adding to any self-test:
- Every action's Shortcuts title equals its menu title.
- Every SF Symbol name exists (
NSImage(systemSymbolName:accessibilityDescription:)). - Every URL action round-trips.
- For every page: New Item creates a row that is visible and focused on that page. After an action removes the selected row, selection moves to the next row.
- Smoke step: start every background timer, sampler, and observer for a few seconds, then print PASS. It is the only check that catches crashes on background queues.
A single-instance app (menu bar utility) cannot launch a second copy with
--selftest. Make it a bridge command instead. Xcode and XcodeGen apps
without a library target: see
../build-and-verify/existing-app.md
for a test target with no host app.
Key events and menu audit
The self-test can press real keys without computer use:
let event = NSEvent.keyEvent(with: .keyDown, location: .zero, modifierFlags: [],
timestamp: 0, windowNumber: window.windowNumber, context: nil,
characters: "\r", charactersIgnoringModifiers: "\r", isARepeat: false, keyCode: 36)!
NSApp.sendEvent(event) // Return in the focused list
NSApp.mainMenu?.performKeyEquivalent(with: commandK) // a menu shortcutSend events with the flags a real keyboard sends. Arrow keys always carry
.numericPad and .function; an event built with modifierFlags: []
passes a check that the real keyboard fails. In app code, compare only the
modifiers people hold down:
let held = event.modifierFlags.intersection(.deviceIndependentFlagsMask)
.subtracting([.numericPad, .function, .capsLock])
if event.keyCode == 124, held.isEmpty { browseInto() } // → with nothing heldTest typing by typing: send key events through NSApp.sendEvent and check
what the field received. Never set the model's text instead. Setting the
text skips focus, and a field that never gets the keyboard still passes.
Two apps shipped a typing bug this way: letters went to a panel instead of
its filter field, and a typed name landed inside the selected placeholder
text.
Walk NSApp.mainMenu and check every command's title, key equivalent,
modifiers, and symbol against the command map. One loop turns "every
action has a menu item and a shortcut" into a check per item.
Focus the list after making the window key (window.makeKey(), then
makeFirstResponder(list)). NSApp.sendEvent sends a key event to the key
window, so a key event is lost when no window is key. A search field in the
toolbar can take focus first, and then list keys and menu items miss the list.
Menu check (from outside)
Do not test SwiftUI menu state from inside the app. Its items carry no
action selector, isEnabled updates on SwiftUI's schedule, and the checks
fail whenever another app is in front, which is always true while an agent
works. In the self-test, check what the commands receive (the selection
passed into them) and run the actions the items call.
Check the real menu from outside, through Accessibility, on a seeded test
copy. Computer use app_menu works in the background:
- Nothing selected: To-Do > Complete is reported disabled.
- Click a row (
app_click), then To-Do > Complete: the row is done and the next row is selected (app_screenshot).
Write these steps into the app's CLAUDE.md, so every agent runs them
after touching commands.
Runs that never hang
- Quit through
NSApp.terminate, with the exit code set inapplicationWillTerminate. Close open sheets first, or terminate is refused and the run waits forever. - Before each run, delete
~/Library/Saved Application State/<bundle id>.savedState. After a crash, the next launch shows a "reopen windows?" alert that blocks every later run with no output. Do not use-ApplePersistenceIgnoreState: SwiftUI then opens no window at all. - Delete the old test store and its
-waland-shmfiles before a seeded run. Seed data only fills an empty store. - Print line-buffered (
setvbuf(stdout, nil, _IOLBF, 0)), so a crash keeps the PASS lines before it.
3. Debug bridge
For behavior a self-test cannot reach: global shortcuts, floating panels, window control, permissions, timing. The running app listens for commands and writes its state to a file. Code shape: ../../code/os-integrations/recipes.md (Debug bridge).
swift scripts/<app>ctl.swift status # writes and prints status.json
swift scripts/<app>ctl.swift windowLeft # runs an action by name
swift scripts/<app>ctl.swift snapshot:launcher # draws a window to a PNG
swift scripts/<app>ctl.swift captureProbe:/tmp/a.png # runs, logs timing, cancelsCommands worth adding:
status: permissions, feature flags, open panels, counts, last error.- One command per action, by the same name as the menu item and URL.
snapshot:<window>: captures one of the app's windows with ScreenCaptureKit (code in ../build-and-verify/existing-app.md).appearance:light|dark|system: switches the app's appearance for snapshots.selftest: the self-test as a command, for an app that is already running.<feature>File:<path>: opens an editor or card on a test file, with no clipboard or data change.<feature>Probe: runs a slow path and logs the time of each step (see theperformanceskill).
Compile the bridge in debug builds, or behind a launch flag in release.
4. Computer use
Last resort, for what only a person can do: a real key press in another
app, drag and drop from Finder, a permission prompt. See the clone skill
for setup. Tell the user to keep off the mouse while it runs. Capture your
own window, never the full screen.
Debug output
A GUI app's print is buffered and lost when the process is killed. Write
debug lines to stderr (FileHandle.standardError.write) behind an
environment flag (APP_DEBUG=1).
Done when every acceptance line of the story maps to a passing test, self-test step, bridge command, or a named manual check, and the bug fix has a test that failed before the fix.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

