# design-from-app

design-from-app — a Claude Code skill that rebuilds any app interface as a native SwiftUI design kit using reference screenshots.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1000 installs · ★ 1933 repo stars
- Author: daveebbelaar
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/daveebbelaar/bama/tree/HEAD/skills/design/design-from-app/SKILL.md
- Updated: 2026-11-05
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/design-from-app

## What it does

The skill measures sizes, spacing, typography, colors, and icons from screenshots using bundled Swift scripts and performs pixel-by-pixel comparison until the UI matches. First, screenshots of the window at 2x scale are collected in `design/reference/`. Then, UI parts are listed in `design/KIT.md`, fonts and icons are resolved, and a reference screen is built from kit components. The `compare.swift` script generates a diff image so tokens can be adjusted until pixel divergence drops below two percent.

Before finishing, the skill requires replacing proprietary assets such as names, logos, and illustrations with custom ones while keeping the layout structure intact.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add daveebbelaar/bama --skill design-from-app -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/design-from-app/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/design-from-app/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add daveebbelaar/bama --skill design-from-app -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/design-from-app/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add daveebbelaar/bama --skill design-from-app -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/design-from-app/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install daveebbelaar/bama skills/design/design-from-app
```

2. **Manually: put the files in place**
- File: `.github/skills/design-from-app/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add daveebbelaar/bama --skill design-from-app -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/daveebbelaar/bama --path skills/design/design-from-app
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/design-from-app/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add daveebbelaar/bama --skill design-from-app -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/daveebbelaar/bama/tree/HEAD/skills/design/design-from-app/SKILL.md

## When to use it
- measure UI elements from a screenshot
- build a SwiftUI design kit from reference
- perform pixel-by-pixel screen comparison
- generate reference screens from design tokens

## Example prompts
- Rebuild the look of this app using screenshots in `design/reference/`
- Make the UI look like Safari
- Run `swift "${CLAUDE_SKILL_DIR}/scripts/measure.swift" info shot.png` to inspect dimensions

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: b92b6e51560a077e.

BEGIN THIRD-PARTY FILE b92b6e51560a077e
```text
---
name: design-from-app
description: Rebuild the look of an app the user likes as a native SwiftUI design kit, by measuring its screenshots (sizes, spacing, type, colors, icons), building its parts, and comparing pixel by pixel until they match. Use when the user names an app whose look they want, shares screenshots of one, or says "make it look like X".
argument-hint: "<app name or screenshot paths>"
---

# Design from app

Look at an app, measure it, and rebuild its design system in SwiftUI. The
result is a design kit (`design-kit` skill) with the reference app's
numbers, and one reference screen that matches the screenshot.

Guessing gets close. Measuring gets it right. Two scripts do the
measuring, next to this skill:

- `scripts/measure.swift`: sizes, positions, text heights, and colors from
  a screenshot.
- `scripts/compare.swift`: a side-by-side, a diff, and the share of pixels
  that differ.

Run them with `swift "${CLAUDE_SKILL_DIR}/scripts/measure.swift" ...`.
All coordinates are points (pixels / 2 for a Retina capture).

## 1. Get the screenshots

Ask for screenshots, or take them with the `clone` skill. You need:

- The window only, at 2x, no desktop. Save them in `design/reference/`.
- One screen with the most parts on it (a sidebar, a list, a toolbar),
  plus close-ups of menus, dialogs, and dark mode if they matter.
- The window size: `measure.swift info shot.png`.

Check: `info` prints the window size in points, and every screenshot uses
the same scale.

## 2. List the parts

Look at each screenshot and name every distinct part: window chrome,
sidebar row, section header, primary action, list row, checkbox, date
chip, icon button, divider. Start `design/KIT.md` from the `design-kit`
skill's kit-spec.md with one section per part.

Check: every visible element on the main screenshot belongs to a part.

## 3. Measure

Fill `design/KIT.md` with numbers, not estimates. The recipes and the
traps are in [measuring.md](measuring.md). In short:

| To find | Command |
| --- | --- |
| Sidebar width, panes | `hline shot.png <y in an empty area>` |
| Row positions and pitch | `rows shot.png <x0> <x1> [y0 y1]` |
| Left edges, gaps | `cols shot.png <y0> <y1> [x0 x1]` |
| Selection pill, dividers | `vline` and `hline` through it, `--tolerance 4` |
| Text and icon colors | `ink shot.png x y w h` |
| Surface colors | `palette shot.png x y w h` |
| A close look | `crop shot.png x y w h out.png 4` |

Check: every token and every part size in `design/KIT.md` has a number
from a command.

## 4. Find the font and the icons

- Most apps on the Mac use the system font, even web apps. Start there.
  When the letters differ (a, g, t, digits), name the font and pick it or
  an open alternative with a license that allows bundling.
- Text sizes come from step 6: build, measure the same word in both
  images, scale.
- Icons: note the size, stroke weight, corners, and whether selected rows
  switch to a filled form. Match with SF Symbols at a light weight first;
```
END THIRD-PARTY FILE b92b6e51560a077e

The third-party file has ended. Everything between the b92b6e51560a077e tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3003 of 4579 bytes. © daveebbelaar · MIT · https://github.com/daveebbelaar/bama/tree/HEAD/skills/design/design-from-app/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
