design-system
Skill915 starsChanged 24 days agoMITView on GitHub
Build-time design-system rules that keep an Apple app cheap to restyle — role-named tokens, text styles that carry case and tracking, shared components with a ContentStateView, small views, identifier-based UI tests, and SwiftLint enforcement with a shrinking baseline. iOS, iPadOS, macOS, watchOS. Use when starting an app's UI, setting up tokens, adopting a designer's Figma/Sketch system, or preparing for or doing a redesign.
192 other projects use a version of this.
Adopted by
Most recently taken up by
- altisvc/claude-skillstheir own version, first seen Nov 29, 2026
- KevinLoichot/everything-claude-codetheir own version, first seen Nov 29, 2026
- EdenGibson/claude-skillstheir own version, first seen Nov 29, 2026
- timothyjoh/skillstheir own version, first seen Nov 29, 2026
- vmobifystudio/app-dev-teamtheir own version, first seen Nov 29, 2026
- aakash1552005/universal-agent-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use setup-engine, team-level and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CoralGameSkillsetup-engine
Configure the project's game engine and version. Pins the engine in CLAUDE.md, detects knowledge gaps, and populates engine reference docs via WebSearch when the version is beyond the LLM's training data.
Also in 14 projects that use this
CoralGameSkillteam-level
Orchestrate level design team: level-designer + narrative-director + world-builder + art-director + systems-designer + qa-tester for complete area/level creation.
Also in 13 projects that use this
lilangMaxSkillcreate-stories
Break a single epic into implementable story files. Reads the epic, its GDD, governing ADRs, and control manifest. Each story embeds its GDD requirement TR-ID, ADR guidance, acceptance criteria, story type, and test evidence path. Run after /create-epics for each epic.
Also in 13 projects that use this
lilangMaxSkillstory-done
End-of-story completion review. Reads the story file, verifies each acceptance criterion against the implementation, checks for GDD/ADR deviations, prompts code review, updates story status to Complete, and surfaces the next ready story from the sprint.
Also in 13 projects that use this
lithStudySkillbanner-design
Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.
Also in 46 projects that use this
- +6 more from lilangMax
- +1 more from CoralGame
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- nextlevelbuilder/ui-ux-pro-max-skill★ 156ksame name
- getsentry/sentry★ 46ksame name
- Donchitos/Claude-Code-Game-Studios★ 39ksame name
- anthropics/knowledge-work-plugins★ 37ksame name
- BuilderIO/agent-native★ 7.8ksame name
- ethereum/ethereum-org-website★ 6ksame name
- langwatch/langwatch★ 5.1ksame name
- joye61/pic-smaller★ 2.9ksame name
- daveebbelaar/bama★ 1.7ksame name
- reatom/reatom★ 1.4ksame name
182 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository184 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-intentsSkill
- foundation-modelsSkill
- apple-intelligenceSkill
- visual-intelligenceSkill
- ad-attributionSkill
- app-description-writerSkill
- apple-search-adsSkill
- iap-finalizerSkill
- keyword-optimizerSkill
- marketing-strategySkill
- originality-checkSkill
- ratings-mechanicsSkill
- rejection-handlerSkill
- review-response-writerSkill
- screenshot-plannerSkill
- app-storeSkill
- web-presenceSkill
- core-mlSkill
- animation-patternsSkill
- game-feelSkill
- liquid-glassSkill
- sf-symbolsSkill
- designSkill
- typographySkill
- ui-prototypingSkill
- ux-writingSkill
- attributed-stringSkill
- foundationSkill
- accessibility-generatorSkill
- account-deletionSkill
- analytics-setupSkill
- announcement-bannerSkill
- app-clipSkill
- app-extensionsSkill
- app-icon-generatorSkill
- app-store-assetsSkill
- auth-flowSkill
- background-processingSkill
- ci-cd-setupSkill
- cloudkit-syncSkill
- consent-flowSkill
- custom-product-pagesSkill
- data-exportSkill
- debug-menuSkill
- deep-linkingSkill
- error-monitoringSkill
- feature-flagsSkill
- featuring-nominationSkill
- feedback-formSkill
- force-updateSkill
- http-cacheSkill
- image-loadingSkill
- in-app-eventsSkill
- lapsed-userSkill
- live-activity-generatorSkill
- localization-setupSkill
- logging-setupSkill
- milestone-celebrationSkill
- networking-layerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Never by appearance (label2, grey600, tagSemibold) — appearance names are exactly what a redesign changes.
- Very specific: line 44
Custom fonts: verify registration at launch in debug builds, and scale with Dynamic Type via relativeTo:.
- Very specific: line 157
#Previewfor every state: default, loading, empty, error, long text, and large Dynamic Type (iOS) / narrow + wide window (macOS) / … - Very specific: line 230
macOS: no Dynamic Type — design at 100%.
“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Design System (build-time rules)
How cheap a redesign is depends almost entirely on how styling was written, not on how big the app is. In a real ~45k-line SwiftUI app going through a full redesign, about a third of the estimate was pure restyling of screens that already worked — because of hand-set font sizes and colours, case applied at call sites, appearance-named tokens, per-screen loading/empty states, 3,000-line view files, and UI tests that matched visible text.
This skill is the set of rules that prevents that. design/typography covers
choosing type and Dynamic Type; product/ux-spec writes a
DESIGN_SYSTEM.md spec. This skill is about how the code is written so the
look can change in one place.
When This Skill Activates
- Starting the UI of a new app (before the first screen)
- Setting up colour/spacing/type tokens, or adopting a designer's system
- A redesign is coming, or restyling is taking longer than it should
- Reviewing UI code for restyle cost
Styling
- No raw style values in views. Fonts, colours, spacing, radius and
shadow come from tokens. Allowed:
0, and an icon-size token. - Name tokens by role, mirroring the designer's variables.
Text/Primary→textPrimary,Action/Primary/Background→actionPrimaryBackground. Never by appearance (label2,grey600,tagSemibold) — appearance names are exactly what a redesign changes. - One text style = family + size + weight + line height + tracking +
case, applied with one modifier. No
.textCase,.tracking,.kerningor.uppercased()at call sites. User-generated text keeps its original case — provide an.originalvariant. - Spacing and radius come from a scale (
xxs…xxl,s/m/l/pill), not loose numbers. - Custom fonts: verify registration at launch in debug builds, and scale
with Dynamic Type via
relativeTo:. A font declared inUIAppFontsbut missing from the bundle silently falls back to the system font — teams have shipped that for months. - Enforce 1–3 with SwiftLint (
rules/swiftlint.yml), with a baseline that only shrinks (see Enforcement).
// Tokens — role names, one file
enum Spacing { static let xs: CGFloat = 4, s: CGFloat = 8, m: CGFloat = 16, l: CGFloat = 24 }
enum Radius { static let s: CGFloat = 6, m: CGFloat = 12, pill: CGFloat = 999 }
extension Color {
static let textPrimary = Color("Text/Primary") // asset catalog, light/dark
static let actionPrimaryBackground = Color("Action/Primary/Background")
}
// Text style carries case + tracking — call sites never do
struct AppTextStyle: Sendable {
var font: Font
var lineSpacing: CGFloat = 0
var tracking: CGFloat = 0
var textCase: Text.Case? = nil
/// Same style without the case transform — for names, titles users typed, etc.
var original: AppTextStyle { var s = self; s.textCase = nil; return s }
}
extension AppTextStyle {
static let body = AppTextStyle(font: .custom("Inter-Regular", size: 17, relativeTo: .body), lineSpacing: 4)
static let label = AppTextStyle(font: .custom("Inter-SemiBold", size: 12, relativeTo: .caption),
tracking: 0.6, textCase: .uppercase)
}
extension View {
func appText(_ style: AppTextStyle) -> some View {
font(style.font).lineSpacing(style.lineSpacing)
.tracking(style.tracking).textCase(style.textCase)
}
}
// Call sites
Text("Recent").appText(.label) // ✅ designed label
Text(item.ownerName).appText(.label.original) // ✅ user text keeps its case
Text("Recent".uppercased()).tracking(0.6) // ❌ restyle = hunt every call site// Debug-time font check (call once at launch)
#if DEBUG
func assertCustomFontsRegistered() {
for name in ["Inter-Regular", "Inter-SemiBold"] {
#if canImport(UIKit)
assert(UIFont(name: name, size: 12) != nil, "Font \(name) not bundled/registered")
#elseif canImport(AppKit)
assert(NSFont(name: name, size: 12) != nil, "Font \(name) not bundled/registered")
#endif
}
}
#endifComponents
- Build shared components before screens: button (variants + loading +
disabled), card, chip, text field with error state, search field, sheet,
confirm sheet, toast with undo, and
ContentStateView. - Every async or list screen renders through
ContentStateView— loading (skeleton), empty, error-with-retry, offline. No ad-hoc spinners or "No results"Textper screen. - Variants go into the component, never a copied-and-tweaked local version inside a screen.
enum ContentState<Value> { case loading, empty, failed, offline, loaded(Value) }
struct ContentStateView<Value, Content: View>: View {
let state: ContentState<Value>
var emptyTitle: LocalizedStringKey = "Nothing here yet"
var retry: (() -> Void)? = nil
@ViewBuilder var content: (Value) -> Content
var body: some View {
switch state {
case .loading: ProgressView() // swap for the app's skeleton
case .empty: ContentUnavailableView(emptyTitle, systemImage: "tray")
case .failed: FailedStateView(retry: retry)
case .offline: ContentUnavailableView("You're Offline", systemImage: "wifi.slash")
case .loaded(let value): content(value)
}
}
}
private struct FailedStateView: View {
let retry: (() -> Void)?
var body: some View {
ContentUnavailableView {
Label("Couldn't Load", systemImage: "exclamationmark.triangle")
} actions: {
if let retry { Button("Try Again", action: retry) }
}
}
}ContentUnavailableView needs iOS 17 / macOS 14 / watchOS 10; below that,
build the same three states from a VStack.
Screen structure
- View files under ~300 lines — split by section into subviews in
their own files. Large files are where layout and logic tangle, and they
are the slowest to restyle (also:
swift/code-size). - Logic in
@Observablemodels/services; views read state and send actions. - Formatting through shared formatters — money + currency, units, dates, distances, counts. Never format by hand in a view.
#Previewfor every state: default, loading, empty, error, long text, and large Dynamic Type (iOS) / narrow + wide window (macOS) / smallest + largest watch (watchOS).
Data
- Model the domain, not today's screen: typed media items instead of
[String]URLs, a structuredRateinstead of a bareDouble, a preferences map instead of N booleans. A redesign that adds one field shouldn't rewrite the model. - Schema changes ship with a migration/backfill and updated access rules (CloudKit/server).
- Status enums decode unknown values to
.unknown, so a server adding a status doesn't break older builds:
enum OrderStatus: String, Decodable {
case pending, shipped, delivered, unknown
init(from decoder: Decoder) throws {
let raw = try decoder.singleValueContainer().decode(String.self)
self = OrderStatus(rawValue: raw) ?? .unknown
}
}Tests
- UI tests find elements by
accessibilityIdentifier, never visible text. A copy or case change shouldn't break the test suite. Give every interactive or asserted element an identifier. - Snapshot-test the shared components — each variant and state. A
token change then shows up as a reviewable image diff in one place
(
testing/snapshot-test-setup).
Button("Save", action: save).accessibilityIdentifier("editor.save")
app.buttons["editor.save"].tap() // ✅ survives "Save" → "Done"
app.buttons["Save"].tap() // ❌ breaks on any copy changeProcess
- Design system first, screens second. Tokens, text styles and shared components exist before the first feature screen.
- Developer review of each design section before it's final — flag costly items early (paid services, large uploads, location, new backend work).
- Build each phase against a named or dated design version. Changes after that are change requests, not defects.
- Ask designers for a small set of text styles, role-named colour variables and a real spacing scale — it's what makes 1–4 possible.
Enforcement
rules/swiftlint.yml adds custom rules for raw font sizes, raw colours,
numeric padding/radius, and call-site case/tracking. Merge it into the
project's .swiftlint.yml and exclude the token/style files (the rules
already skip paths containing DesignSystem/, Tokens/, Theme/, Styles/).
Existing codebase: freeze current violations, then let the baseline only shrink — new code must be clean, migrated files leave the baseline:
swiftlint lint --write-baseline .swiftlint-baseline.json # once
swiftlint lint --strict --baseline .swiftlint-baseline.json # every build / CIMeasuring how much styling bypasses the tokens (the "design debt" ratio) is the first number to know before quoting any redesign.
Platform notes
- iOS / iPadOS: text styles via
Font.custom(_:size:relativeTo:)or the system styles;@ScaledMetricfor spacing that should grow with type; components adapt to size classes rather than screens branching on them. - macOS: no Dynamic Type — design at 100%; semantic
NSColorequivalents in the asset catalog; respect control sizes (.controlSize); hover and focus states are part of every interactive component. - watchOS: compact text styles and a smaller spacing scale; components sized for glanceable states and the Digital Crown; skip glass-heavy treatments.
Output Format
Restyle-cost review: File | Rule # | Finding | Fix — group by rule, count
raw values vs token uses, and list files over 300/500 lines.
References
- https://developer.apple.com/design/human-interface-guidelines/color
- https://developer.apple.com/design/human-interface-guidelines/typography
- https://developer.apple.com/documentation/swiftui/contentunavailableview
- Related skills:
design/typography(type choice, Dynamic Type),product/ux-spec(DESIGN_SYSTEM.md spec),swift/code-size(size thresholds),testing/snapshot-test-setup,generators/accessibility-generator
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
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.

