# Test mac app

> Test mac app is an open-source agent skill for developer tools. Lets an agent test a macOS app with unit tests, a self-test and a debug bridge. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/daveebbelaar/bama/tree/main/skills/ship/test-mac-app
- **Repository:** https://github.com/daveebbelaar/bama
- **GitHub stars:** 2,009
- **License:** MIT
- **Skill name:** test-mac-app
- **Collection:** https://github.com/daveebbelaar/bama
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill sets out a three-level approach to verifying a Mac app, starting with cheap Swift Testing unit tests on a logic library with no SwiftUI, then an in-app self-test launched by a flag that runs the app's real functions against a store in /tmp and prints PASS or FAIL per step. The self-test can also send real key events through the app and audit the menu bar's titles, shortcuts and symbols.

For behavior a self-test cannot reach, such as global shortcuts, floating panels, window control and permissions, the skill describes a debug bridge: the running app listens for named commands, writes its state to a JSON file and can capture windows to PNG. Computer use is kept as a last resort for real clicks and drag and drop in other apps, and the skill gives guidance on avoiding hung or blocked runs.

It expects a Swift-based macOS project, with Swift Testing and the swift command line tool. It points to other skills for snapshot checks and setup, and to a recipes file for the bridge code shape.

## When your agent uses it

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

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/daveebbelaar/bama/tree/HEAD/skills/ship/test-mac-app)
- [License: MIT](https://github.com/daveebbelaar/bama/tree/HEAD/skills/ship/test-mac-app)

## Features

- **Unit tests with Swift Testing:** Guidance on writing table-driven tests against a logic library with a fixed clock and a test store.
- **In-app self-test flag:** Runs the app's real functions on a temporary store and reports PASS or FAIL for each step.
- **Key event and menu audit:** Sends real key events and checks every menu command's title, shortcut and symbol.
- **Debug bridge commands:** Lets an agent run named actions, read the app's status file and capture window snapshots.
- **Run hygiene rules:** Covers clearing saved state and stores, quitting cleanly and flushing output so runs never hang.
- **Computer use fallback:** Reserves real clicks in other apps and permission prompts for cases no other level can cover.

## Good for

- Add unit tests for a new parser or business rule in a Mac app
- Reproduce a bug with a failing test before fixing it
- Run an end-to-end self-test before a release
- Verify that every keyboard shortcut and menu item works
- Check that a global shortcut or floating panel behaves correctly

## Install

### Claude Code

This skill ships in the `bama` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add daveebbelaar/bama
/plugin install bama@bama
```

Or copy only this skill to `~/.claude/skills/test-mac-app`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/test-mac-app &&
cp -R "$tmp/skills/ship/test-mac-app" ~/.claude/skills/test-mac-app &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/test-mac-app` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/test-mac-app` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/test-mac-app &&
cp -R "$tmp/skills/ship/test-mac-app" ~/.agents/skills/test-mac-app &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/test-mac-app` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/test-mac-app` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/test-mac-app &&
cp -R "$tmp/skills/ship/test-mac-app" ~/.cursor/skills/test-mac-app &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/test-mac-app` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/daveebbelaar/bama.git --path skills/ship/test-mac-app
```

Or copy the folder to `~/.gemini/skills/test-mac-app` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/test-mac-app`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/test-mac-app &&
cp -R "$tmp/skills/ship/test-mac-app" ~/.copilot/skills/test-mac-app &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/test-mac-app` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/daveebbelaar/bama.git
```

Then copy `bama/skills/ship/test-mac-app` into your agent's skills folder as `test-mac-app`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Test mac app trigger?

It is meant for adding logic, fixing a bug, before a release, or when the user asks for tests, end-to-end checks or to make sure the app works.

### What does the self-test need?

The app needs a launch flag that runs the same functions the UI calls, pointed at a store in /tmp, and it exits 0 or 1 based on results.

### Does Test mac app change my app's data?

The skill says to always point the self-test at a temporary store and never at the user's data.

### How do I install Test mac app in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/test-mac-app to use it in all your projects, or to .claude/skills/test-mac-app in one project. Or install the bama plugin, which includes it: /plugin marketplace add daveebbelaar/bama, then /plugin install bama@bama.

### Does Test mac app run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Test mac app?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Test mac app?

The closest alternatives to Test mac app are Build and verify, Performance, Mac design, Xcuitest skill and Build swiftui interface.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Build and verify](https://ai-powered.com/skills/build-and-verify): Build and verify is an open-source agent skill for developer tools.
- [Performance](https://ai-powered.com/skills/performance-daveebbelaar): Performance is an open-source agent skill for developer tools.
- [Mac design](https://ai-powered.com/skills/mac-design): Mac design is an open-source agent skill for developer tools.
- [Xcuitest skill](https://ai-powered.com/skills/xcuitest-skill): Xcuitest skill is an open-source agent skill for developer tools.
- [Build swiftui interface](https://ai-powered.com/skills/build-swiftui-interface): Build swiftui interface is an open-source agent skill for developer tools.
- [New mac app](https://ai-powered.com/skills/new-mac-app): New mac app is an open-source agent skill for developer tools.
- [Os integrations](https://ai-powered.com/skills/os-integrations): Os integrations is an open-source agent skill for developer tools.
- [Design kit](https://ai-powered.com/skills/design-kit): Design kit is an open-source agent skill for design and media.

---
Source: https://ai-powered.com/skills/test-mac-app
