agentleFS
daveebbelaardaveebbelaar/bama/skills/design/design-kit/SKILL.md

design-kit

Skill1.7k starsChanged 11 days agoMITView on GitHub

Custom design system for a macOS SwiftUI app with its own parts, not Apple's, covering three token layers, type, an icon set, every part in every state, custom window chrome, a parts gallery, and checks. Use when the user wants the app to have its own look and feel, a brand, or custom buttons, rows, and sidebars, when design-from-app has measured a reference app, or when the user asks for a design system or component library.

4 other projects use a version of this, 2 of them edited.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

Who's talking about daveebbelaar/bama

The biggest 5 of 42 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 42

Talked about on GitHub, YouTube and the web (42 times).

On GitHub · 20

15 more on GitHub

On YouTube · 13

8 more on YouTube

On the web · 9

4 more on the web

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write design/KIT.md from kit-spec.md: three words for the feel, the tokens, the type scale, the icon rules, and one section per part with …

    line 23
  2. Distinctive:

    Check: every part the app's screens need has a section with its sizes and its states.

    line 27
  3. Distinctive:

    Only this file reads it.

    line 35
  4. Very specific:

    Check: grep -rn 'Palette\.' Sources/ | grep -v Tokens.swift finds nothing.

    line 44
  5. Very specific:

    Check: views set fonts only through .kitType(...).

    line 53
  6. Distinctive:

    Start from SF Symbols at a fixed size and weight.

    line 60
  7. Very specific:

    Check: the part matches its section in design/KIT.md in every state.

    line 84
  8. Distinctive:

    Check: the window opens at its default size, the traffic lights sit where the spec says, the custom sidebar moves with the arrow keys, and …

    line 101
  9. Very specific:

    Check: the gallery snapshot shows every part from design/KIT.md, and the user has seen it.

    line 112

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design kit

A native look comes from Apple's parts. A custom look comes from your own parts: your sidebar row, your button, your checkbox, your icons. SwiftUI draws all of them. A kit is those parts, the numbers behind them, and one page that shows every part in every state.

Most apps keep Apple's parts and only pick an accent color (design-system skill). Build a kit when the parts themselves must change. To copy the look of an existing app, call the Skill tool with design-from-app first: it measures the app and then comes back here.

Everything lives in Sources/<App>/DesignKit/. Code for every step: parts.md.

1. Write the spec

Write design/KIT.md from kit-spec.md: three words for the feel, the tokens, the type scale, the icon rules, and one section per part with its sizes and states. Agents build from this page and review against it.

Check: every part the app's screens need has a section with its sizes and its states.

2. Tokens in three layers

DesignKit/Tokens.swift:

  1. Palette: raw colors, named by hue and step (gray50, blue600). Only this file reads it.
  2. Meaning: Ink.text, Ink.accent, Ink.selection, Ink.divider, with a light and a dark value each. Parts read only this layer.
  3. Scales: KitType (type roles), Metric (sizes), Motion (named intents like hover and check).

A rebrand changes the palette. A dark mode fix changes the meaning layer. Neither touches a part.

Check: grep -rn 'Palette\.' Sources/ | grep -v Tokens.swift finds nothing.

3. Type

Name styles by role (title, body, label, section, meta), never by size. Use the system font unless the brand needs its own; a bundled font goes in Resources/Fonts/ with ATSApplicationFontsPath in Info.plist.in. Half-point sizes are fine when a reference needs them.

Check: views set fonts only through .kitType(...).

4. Icons

Icons decide the feel more than color does. Views name a KitIcon, never an SF Symbol or a file, so the whole set can change in one place.

  • Start from SF Symbols at a fixed size and weight. Light weights read less like Apple.
  • For a set of your own, draw each icon as a SwiftUI Shape from its SVG path, or make custom symbols in the SF Symbols app.
  • One size, one stroke weight, one corner style for the whole set.
  • A selected row may switch to the filled form.

Check: grep -rn 'systemName:' Sources/ | grep -v DesignKit/ finds nothing.

5. Parts

One file per family in DesignKit/Components/: sidebar, rows, buttons, fields, menus. Each part:

  • Is a real control. Style a Button with a ButtonStyle, a Toggle with a ToggleStyle, a field with a TextFieldStyle. Never a shape with a tap gesture: it loses the keyboard, focus, and VoiceOver.
  • Has every state: rest, hover, pressed, selected, focused, disabled, in light and dark. Hover uses onHover, pressed uses configuration.isPressed, disabled reads isEnabled.
  • Takes a forced state for the gallery, so hover and pressed show up in a snapshot.
  • Reads only meaning tokens, KitType, Metric, Motion, and KitIcon.

Check: the part matches its section in design/KIT.md in every state.

6. Window chrome

For a fully custom look, hide the title bar and draw your own top bar, and build the sidebar from kit rows instead of List. Keep the traffic lights, menus, context menus, sheets, and alerts native: users depend on them. SwiftUI cannot move the traffic lights; a small NSViewRepresentable reaches the NSWindow (parts.md, Window chrome).

A custom sidebar matches the macOS 27 system one where people would notice: the selected row's text turns semibold, the selection fill dims when the window is inactive (@Environment(\.appearsActive)), and row corners stay concentric with the sidebar (mac-design patterns.md, "Custom chrome that follows the window"). Custom glass bounces on click only on controls.

Check: the window opens at its default size, the traffic lights sit where the spec says, the custom sidebar moves with the arrow keys, and its selection dims when another window is in front.

7. Gallery

DesignKit/KitGallery.swift shows every part in every state, in light and dark, the way a storybook does. The app shows it instead of its pages when APP_KIT_GALLERY=1 is set, so the normal snapshot command captures it. Review a new part here before it goes into a screen.

Check: the gallery snapshot shows every part from design/KIT.md, and the user has seen it.

8. Checks

tools/grid-lint.sh
grep -rnE 'Color\(hex|Color\(red|\.font\(\.system|systemName:' Sources/ | grep -v DesignKit/

Both come back clean. Then build, snapshot, and run the layout-grid checks on the screens (build-and-verify skill).

Done when design/KIT.md covers every part, every part is a real control with every state, the gallery shows them all in light and dark, and the checks above come back clean.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.