Tooluck logoTooluck
SKILL.md

test-mac-app

Agent skill fromdaveebbelaar/bama

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".

How to install test-mac-app

install test-mac-app
# install the bama pack with the skills CLI
npx skills add daveebbelaar/bama

# or add only this skill to Claude Code: copy the folder

skills/ship/test-mac-app/

# into

~/.claude/skills/test-mac-app/ (all projects)

.claude/skills/test-mac-app/ (one project)

skills/ship/test-mac-app/SKILL.md

MITFull file
1# Test a Mac app
2
3Three levels, cheapest first. Each new story gets the cheapest level that
4can prove its acceptance criteria. A bug fix starts with a test that fails.
5
6| Level | Proves | Speed |
7| --- | --- | --- |
8| Unit tests (Swift Testing) | Rules, parsing, data | Seconds |
9| Self-test (`--selftest`) | The app's real functions on a test store | Seconds |
10| Key events and menu audit (inside the self-test) | Keyboard flows and every shortcut, without the screen | Seconds |
11| Debug bridge + computer use | Global shortcuts, panels, permissions, other apps | Minutes |
12
13Snapshots (`build-and-verify` skill) prove how it looks. This skill proves
14how it behaves.
15
16## 1. Unit tests
17
18Logic lives in a library target (`<App>Kit`) with no SwiftUI, so tests run
19without the app.
20
21```swift
22import Testing
23@testable import AppKitCore
24
25@Test("Natural dates", arguments: [("tomorrow 9am", 1, 9), ("next fri", 5, nil)])
26func parses(_ phrase: String, dayOffset: Int, hour: Int?) throws {
27 let result = try #require(DateParser.parse(phrase, now: .fixed))
28 #expect(result.dayOffset == dayOffset)
29 #expect(result.hour == hour)
30}
31```
32
33```bash
34swift test --scratch-path ~/Library/Developer/<App>/test-build
35```
36
37- Fix the clock (`now:` parameter) and the store path in every test.
38- A parser that removes text from what the user typed needs at least 20
39 negative rows: real titles that contain date or time words ("Watch
40 Friday Night Lights"). Add consistency rows for related phrases ("next
41…

Excerpt shown under the repository's MIT license.

More skills in bama

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates