Skip to main content
skill CX Codex

design-from-app — Claude Code skill: what it does, how to install

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

MIT 1,000 installs ★ 1,933 updated 2026-11-05

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add daveebbelaar/bama --skill design-from-app -a claude-code
Open on GitHub

What design-from-app 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.

What it helps with

  • 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 for the agent

  • 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

How to install design-from-app

1Skills CLI (Vercel)

npx skills add daveebbelaar/bama --skill design-from-app -a claude-code

2Manually: put the files in place

~/.claude/skills/design-from-app/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/design-from-app/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about design-from-app

How to install design-from-app in Claude Code?

Run npx skills add daveebbelaar/bama --skill design-from-app -a claude-code and access the skill at ~/.claude/skills/design-from-app/SKILL.md.

What does design-from-app do?

It measures reference app screenshots, builds a matching SwiftUI design kit, and refines the screen layout until it matches pixel for pixel.

What scripts are used for measurements?

The skill includes measure.swift for extracting geometry and colors and compare.swift for side-by-side visual diffing.

Source text

SKILL.md · MIT
---
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;
  draw the ones that do not match as shapes (`design-kit` parts.md, Icons).

Check: `design/KIT.md` names the font, the icon source, and the icon size
and weight.

## 5. Build the kit and one screen

Call the Skill tool with `design-kit` and build the tokens, the parts, the
window chrome, and the gallery from `design/KIT.md`. Then build the main
screenshot's screen from kit parts only, with the same data and the same
window size.

Check: a snapshot of that screen has the same size in pixels as the
reference.

## 6. Compare until it matches

```bash
swift "${CLAUDE_SKILL_DIR}/scripts/compare.swift" design/reference/main.png /tmp/<App>-shots/<page>-light.png /tmp/<App>-compare
swift "${CLAUDE_SKILL_DIR}/scripts/compare.swift" ... /tmp/<App>-compare-sidebar 0 0 220 300
```

Open `side-by-side.png` and `diff.png` with the Read tool. Then measure
the same rows, edges, and words in both images, and fix the tokens, not
the views. Order: window size, text sizes, columns and left edges, row
heights, colors, icons.

Check: under 2% of pixels differ on the whole window, and every row and
left edge is within 1.5 pt of the reference.

## 7. Make it yours

Before the app ships to anyone else, replace what belongs to the other
company: its name, logo, illustrations, and any font or icon it owns.
Keep the structure, the spacing, and the feel. Write the replacements in
`design/KIT.md`.

Done when `design/KIT.md` has a measured number for every token and part,
the kit's gallery shows every part, the reference screen passes step 6,
and step 7 lists what was replaced.

© daveebbelaar · MIT · daveebbelaar/bama

Similar skills

All skills for Frontend and UI →

From the same set21

The whole set →
build-and-verify build-and-verify — a Claude Code skill that builds SwiftUI macOS apps and checks page snapshots in light and dark appearance. The agent invokes it after UI changes, failed builds, or requests to run or inspect the app. CX Codex +1 1,000installs performance performance — a skill for Claude Code that measures CPU, memory, and energy usage in macOS apps. It identifies causes of freezes and helps offload tasks from the main thread to the GPU. CX Codex +1 1,000installs improve-architecture The improve-architecture Claude Code skill reviews a macOS Swift codebase and plans refactors that preserve existing behavior. It activates before a major feature, at a milestone, or when bugs keep returning in one area. CX Codex +1 1,000installs app-brief The app-brief skill for Claude Code and Cursor generates a one-page docs/BRIEF.md file for a new macOS app before writing code. CX Codex +1 1,000installs os-integrations The os-integrations Claude Code skill maps macOS APIs to system-level features and their required permissions. It applies when adding global shortcuts, screen capture, or controls for other apps’ windows. CX Codex +1 1,000installs layout-grid layout-grid is a Claude Code skill that enforces grid and alignment rules in macOS SwiftUI apps. It runs when building custom UI components or after layout changes. CX Codex +1 1,000installs user-stories Turns app briefs, research, or screen indexes into prioritized user stories with checkable acceptance criteria. It runs after app-brief or clone, or when asked to plan features and choose what to build first. CX Codex +1 1,000installs swift-swiftui The swift-swiftui Claude Code skill sets Swift 6 and SwiftUI practices for macOS apps. It activates while writing, reviewing, or debugging Swift code, including concurrency and Sendable errors. CX Codex +1 1,000installs

Project sponsors

Companies that keep this analytics open