# Performance

> Performance is an open-source agent skill for developer tools. Measure and speed up a macOS app's hangs, stutter, memory and energy use. 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/code/performance
- **Repository:** https://github.com/daveebbelaar/bama
- **GitHub stars:** 2,009
- **License:** MIT
- **Skill name:** performance
- **Collection:** https://github.com/daveebbelaar/bama
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through making a macOS app faster by starting from measurements rather than guesses. It sets two targets: the first frame after a key press should appear within 100 ms, and the main thread should never block for more than 50 ms. The workflow is to reproduce the slow action, measure a release build, locate the offending code with the right profiling tool for the symptom, apply a fix, and measure again before committing the before and after numbers.

The skill maps symptoms such as freezes, slow actions, dragging stutter, memory growth and fan or battery drain to specific tools like sample, footprint, leaks, xctrace templates and the Energy Log. It asks the agent to read traces as text instead of in the Instruments interface, and to delete trace files afterward because they capture the app's environment. Its main rules cover keeping UI work on the main thread, decoding images at display size, letting the GPU composite layers, and avoiding unnecessary polling.

It expects a macOS app written in Swift and an environment with Xcode command line tools. A companion recipes file covers specific symptoms, and a second file covers GPU media work such as video, audio, camera, Metal and large image pipelines. It references a test-mac-app skill for a debug bridge that can run probe commands.

## When your agent uses it

> Make a macOS app fast by measuring hangs, stutter, CPU, memory, and energy, then moving work off the main thread and onto the GPU. Use when the app freezes, a shortcut feels slow, dragging stutters, the fan spins, memory grows, or the user asks to optimize or profile.

## 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/code/performance)
- [License: MIT](https://github.com/daveebbelaar/bama/tree/HEAD/skills/code/performance)

## Features

- **Measurement-first workflow:** Guides each change through reproducing, measuring a release build, fixing and re-measuring.
- **Symptom-to-tool mapping:** Matches freezes, stutter, slow actions, memory growth and energy drain to specific profiling tools.
- **Main thread rules:** Lists practices that keep file, network, image and audio work off the UI thread.
- **Apple silicon guidance:** Explains when to rely on Core Animation, Core Image, Vision and AVFoundation versus writing Metal.
- **Trace handling safety:** Warns to read traces as text and delete them because they contain the app's environment.
- **Targeted recipes:** Points to a companion recipes file for fixes to specific symptoms and a GPU media reference.

## Good for

- Find out why a macOS app freezes while typing or dragging
- Profile a slow menu or shortcut and cut its response time
- Track down memory growth in a Swift app
- Reduce fan noise and battery drain from a macOS app
- Move image decoding and file loading off the main thread

## 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/performance`:

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

For one project only, put the folder in `.claude/skills/performance` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/performance` 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/performance &&
cp -R "$tmp/skills/code/performance" ~/.agents/skills/performance &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/performance` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/performance` 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/performance &&
cp -R "$tmp/skills/code/performance" ~/.cursor/skills/performance &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/performance` 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/code/performance
```

Or copy the folder to `~/.gemini/skills/performance` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/performance`:

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

For one project only, put the folder in `.github/skills/performance` inside it instead.

### Other agents

Get the folder:

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

Then copy `bama/skills/code/performance` into your agent's skills folder as `performance`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Performance trigger?

It is meant for cases where a macOS app freezes, a shortcut feels slow, dragging stutters, the fan spins, memory grows, or the user asks to optimize or profile.

### What tools does Performance use?

It uses sample, xctrace with templates such as Time Profiler, Hangs, Animation Hitches, Allocations and Energy Log, plus footprint and leaks.

### Does Performance expect a particular language?

It is written for macOS apps, with examples in Swift and Apple frameworks such as Core Animation, Core Image and AVFoundation.

### Why does Performance say to delete trace files?

Traces store the app's full environment, and an app launched from an agent's shell inherits that shell's tokens, so traces should not be committed or shared.

### How do I install Performance in Claude Code?

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

### Does Performance 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 Performance?

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 Performance?

The closest alternatives to Performance are Test mac app, Mac design, Performance reasoning, Optimize and Build and verify.

## Where this comes from

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

## Alternatives

- [Test mac app](https://ai-powered.com/skills/test-mac-app): Test mac app 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.
- [Performance reasoning](https://ai-powered.com/skills/performance-reasoning): Performance reasoning is an open-source agent skill for developer tools.
- [Optimize](https://ai-powered.com/skills/optimize-jasgujral): Optimize is an open-source agent skill for developer tools.
- [Build and verify](https://ai-powered.com/skills/build-and-verify): Build and verify is an open-source agent skill for developer tools.
- [Frontend perf](https://ai-powered.com/skills/frontend-perf): Frontend perf is an open-source agent skill for developer tools.
- [Improve architecture](https://ai-powered.com/skills/improve-architecture): Improve architecture 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.

---
Source: https://ai-powered.com/skills/performance-daveebbelaar
