/solo:solo-swiftui-design-systemfrom solo
Builds and maintains a SwiftUI design system with a 12-column grid, spacing/typography/radius/motion scales, surface levels, and a component gallery. Includes automated checks to prevent design drift. Use when screens have inconsistent spacing, fonts, or magic numbers.
Ships in solo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A design system is not a colour file. It is four scales, one grid, one
catalogue and one tripwire — and the tripwire is what makes it survive the
next feature. Everything here is native SwiftUI: no design-system framework is
worth taking on, because the platform is already built for this (Environment +
style protocols + containerRelativeFrame).
Apple ships its own SwiftUI skills inside Xcode 27 — invalidation, ForEach
identity, @Observable, Liquid Glass — as plain markdown any agent can read
with no Xcode running. On anything about correctness or update cost they
outrank this file, and they say so in their own header. Where they are, what
they cover, and the rules that most often hit real code:
references/apple-xcode-skills.md.
Reach for this when the symptom is "the screens look related and never line up". Measure before you believe it — see step 1.
Never start from taste. Start from the inventory, because the number is the argument:
V=path/to/Views
grep -rhoE '\.padding\((\.[a-z]+, )?[0-9]+(\.[0-9])?\)' $V | grep -oE '[0-9.]+' | sort -n | uniq -c | sort -rn
grep -rhoE 'spacing: [0-9]+(\.[0-9])?' $V | sort | uniq -c | sort -rn
grep -rhoE 'cornerRadius: [0-9]+(\.[0-9])?' $V | sort | uniq -c | sort -rn
grep -rhoE '\.font\(\.[a-zA-Z0-9]+\)|\.font\(\.system\([^)]*\)\)' $V | sort | uniq -c | sort -rn
grep -rhoE '\.spring\(response: [0-9.]+, dampingFraction: [0-9.]+\)' $V | sort -u | wc -l
A real app measured this way: 27 padding values, 19 spacings, 23 radii, 48
font spellings, 21 springs — including .system(size: 17.5), 13.5, 12.5.
Half a point is invisible alone and lethal in a set: it is exactly the amount by
which two labels fail to look like the same label.
Views/Design/
Space.swift 4-point steps: hair(2) xs sm md lg xl xxl xxxl huge + touchTarget(44)
Grid.swift 12 columns, gutter, margin, gridSpan(_:), gridMargins(), GridOverlay
Typography.swift 8 steps, each a platform TextStyle + Metric for sizes a font can't set
Radii.swift 5 radii + shape(_:) — .continuous, always
Motion.swift 6 curves + the never-repeatForever rule
Surface.swift 3–4 levels (console/panel/inset/field), one recipe each
Enums over structs: compile-time names, zero runtime, no instance to thread.
Reach for @Entry var theme in the Environment only when there is a second
theme (white-label, per-brand, light/dark that is not the system's). Until
then a theme object is one indirection buying nothing.
Two rules that decide the arguments in step 3:
Font.system(.subheadline, weight:), not .system(size: 15). Fixed sizes never grow with Dynamic Type;
in the measured app 78 of them didn't. For sizes a font cannot set (an icon's
box, a ring's diameter) use @ScaledMetric(relativeTo:) over a Metric
constant.containerRelativeFrame( .horizontal, count: 12, span: 4, spacing: gutter) is iOS 17+ and is the
platform's own grid arithmetic — no GeometryReader, no percentages.Hand-editing hundreds of literals is where a migration dies — half done, half not, and nobody can say which half. Write a codemod, keep it in the repo, and let it carry the rule:
# nearest 4-point step, TIES GO UP (6→8, not 4): rounding down tightens a
# third of the app by two points at once, and a snug layout is the one that
# breaks. Only padding / spacing / cornerRadius / fonts in 9…26pt —
# never frame, offset, lineWidth or a shadow radius.
step, name = min(SCALE, key=lambda p: (abs(p[0] - value), -p[0]))
Full rule, the skip list, the spring and font tables: references/codemod.md.
Read it when actually migrating; one measured run was 991 substitutions in 31
files, dry-run first, build after each family.
SwiftUI's extension points are the system's spine — use them before inventing
.myButton():
struct PressableStyle: ButtonStyle { // one feel for every control
func makeBody(configuration: Configuration) -> some View {
configuration.label
.scaleEffect(configuration.isPressed ? 0.97 : 1)
.animation(configuration.isPressed ? Motion.press : Motion.release,
value: configuration.isPressed)
}
}
LabelStyle, ToggleStyle, ProgressViewStyle, MenuStyle the same way; a
ViewModifier + extension View for what has no protocol (.surface(.inset)).
Two doors, answering different questions:
make design # ImageRenderer → PNG sheets from a test: no launch, no taps, ~3s
make design-app # the same gallery in the simulator: glass, blur, motion
… launch <app> -designGrid YES # the 12 columns over the REAL screens
ImageRenderer inside an XCTest is the whole storybook you need — a gallery
view rendered to docs/previews/*.png, one file per sheet, no navigation and no
external dependency. It does not draw materials: .ultraThinMaterial and
glassEffect come out empty, so glass reads flat there. Geometry is exact,
which is what the sheets are for.
The grid overlay over the real app is the only thing that proves two screens agree; a gallery only proves one screen is tidy.
The writer, the debug flag, the localisation trap and when to reach for
swift-snapshot-testing: references/catalogue.md.
Three layers, cheapest first:
.padding(12), spacing: 6, cornerRadius: 18, .font(.system(size: 13)).
Diff-scoped and warning-only is the right calibration — a whole-tree lint at
fail severity breaks on inherited debt and gets bypassed, and a bypassed hook
checks nothing.span(6) * 2 + gutter == width; every space step divisible by 4
except the one deliberate half step.Motion.swift holds six curves. Consolidating 21 springs into 6 is a consistency win and says
nothing about whether the six are right. These are the numbers Apple ships, and the rule for
picking between them.
Reported, not measured here — from the apple-design skill
(~/.agents/src/emilkowalski-skills, MIT), distilled from WWDC Designing Fluid Interfaces.
The parameter model transfers exactly: Apple's designer-facing pair is damping ratio + response,
which is SwiftUI's .spring(response:dampingFraction:).
| Interaction | response | dampingFraction | why |
|---|---|---|---|
| Move / reposition | 0.4 | 1.0 | critically damped: arrives, does not wobble |
| Drawer, sheet | 0.3 | 0.8 | slight overshoot reads as physical |
| Rotation | 0.4 | 0.8 | |
| Everything else | — | 1.0 | bounce is not a default |
Bounce only where momentum is real — a flick or a throw the finger actually gave. A bounce on
a tap is decoration, and the same 0.8 that feels alive on a dragged sheet feels cheap on a
button.
Frequency decides whether to animate at all. This is the rule most motion work skips:
Asymmetric timing. A deliberate action animates slower than the system's answer to it.
Symmetric press/release is a finding, not a style choice — Motion.press and Motion.release
in the catalogue already exist for this and should differ.
Interruptibility. A gesture-driven view must animate from its current presentation value,
not from the logical target, or a second gesture snaps. In SwiftUI that means springs and
.animation(_:value:), not a keyframe timeline, for anything a finger can grab mid-flight.
Reduced motion is a cross-fade, not a removal. @Environment(\.accessibilityReduceMotion)
swaps the slide for an opacity change; it does not delete the transition and leave a jump.
Depth, including the momentum-projection formula, velocity handoff from a gesture into a spring,
and the rubber-band constant: the apple-design skill. Its snippets are CSS/JS; the physics and
the numbers are platform-independent.
containerRelativeFrame measures the container, not its content. Apply
gridMargins() first, or every span is a margin too wide and nothing lines
up with anything.Sendable warning on static let tokens in Swift 6: an enum of
static let CGFloat is fine; a struct holding UserDefaults needs
@unchecked Sendable with a one-line reason.GlassEffectContainer(spacing:) and give morphing pairs a
.glassEffectID(_:in:); below 26 fall back to .ultraThinMaterial in one
place, not per screen.compositingGroup() + a zero shadow is still an offscreen pass. Apply
the lift only where there is a shadow to draw.repeatForever. A UI that never goes idle hangs everything that
waits for idle: accessibility snapshots, UI automation, VoiceOver. Use
.repeatCount(n) and honour \.accessibilityReduceMotion.-designGallery YES from simctl
lands in the argument domain, so one UserDefaults.bool(forKey:) read covers
it — but wrap it in a small injectable type that is false in Release, or the
flag ships.glassEffect,
GlassEffectContainer, .buttonStyle(.glass)), @Entry for environment
tokens with no EnvironmentKey boilerplate, ToolbarSpacer,
backgroundExtensionEffect(), scrollEdgeEffectStyle.ContentBuilder collapses the
container overloads that cause "unable to type-check this expression in
reasonable time" — and it helps when built with the new Xcode regardless of
deployment target. .reorderable() in any container (not just List), swipe
actions outside List, toolbar overflow priorities, @State as a macro with
lazy @Observable init (back-deployed to iOS 17). Resizable iPhone apps is
the one that touches a design system directly: baked-in sizes stop being safe,
so snapshot at several widths.Xcode ships agent skills in the toolchain — plain SKILL.md folders, so they
work in any agent, not only Xcode's assistant.
make apple-skills # solo-factory: export into ~/.agents/skills, diffed
make apple-skills-check # what it would bring, without writing
Xcode 26.6 exports nothing — the agent tool is there and answers "No
skills available to export", so the script says that plainly rather than look
broken. Xcode 27.0 beta 2 exports ten: swiftui-specialist,
swiftui-whats-new-27, uikit-app-modernization, modernize-tests,
audit-xcode-security-settings, adopt-c-bounds-safety, device-interaction,
app-intents-specialist, app-intents-whats-new-27 and
building-document-based-swiftui-applications. The names are not stable across
versions — four of the seven guessed from the 26.6 release notes came back
spelled differently — so read the export rather than a list.
Re-run after every Xcode update: these track the SDK, and a stale "what's new"
skill is worse than none. A beta installed alongside the release is not the
active toolchain, and xcode-select is machine-wide — scope one run instead:
DEVELOPER_DIR="/Applications/Xcode-beta.app/Contents/Developer" make apple-skills.
If the export names the toolchain instead, Xcode → Settings → Locations →
Command Line Tools points at the wrong Xcode.
device-interaction is the one that matters for a design system: it drives a
real device or simulator — screenshots, view hierarchy, synthesised taps — which
closes the loop a build tool alone cannot (write layout → build → look at it →
correct it) without a human running the walk.
Community skills worth reading before installing — a skill is injected into the assistant's context and changes how it writes your code:
| Where | Why |
|---|---|
twostraws/Swift-Agent-Skills | curated index; start here |
twostraws/SwiftUI-Agent-Skill (swiftui-pro) | aimed at the mistakes LLMs actually make: navigation, layout, state, VoiceOver, deprecated APIs |
AvdLee/SwiftUI-Agent-Skill | the architecture to copy — references loaded on demand, so deep context costs nothing until asked for. Also a maintenance skill that refreshes the deprecated-API list after each release |
Dimillian/Skills | swiftui-liquid-glass, swiftui-view-refactor, swiftui-performance-audit |
dpearson2699/swift-ios-skills | 86 skills on iOS 26+ — PolyForm Perimeter licence, not MIT; read it before commercial use |
Design-system repos worth reading rather than depending on: DSKit (organised for agents — generated docs link every component to its source, snapshots and usage), OversizeUI (semantic colours, Dynamic Type, spacing scale), design-foundation (MIT, Swift 6 concurrency-safe), ouds-ios (corporate scale, strong accessibility).
blue500. Semantic names (surfaceElevated,
textSecondary) survive a re-skin; a palette index turns one into a
find-and-replace across the app.isSelected ? .semibold : .regular
is a step plus .fontWeight() on top — folding it in is how a scale of eight
becomes a scale of sixteen.Brand.tabRadius = Radii.lg reads as tidy and puts
two spellings of 16pt in one file within a week.vm.loadavg
first; three "regressions" in one project were the laptop.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fortunto2/solo-factory --plugin solo71 skills in this plugin
/solo-android-releaseShip an Android app to testers or to Google Play, or push an update to an app already listed there. Use when the user says "make the Android app available to testers", "internal/open testing link", "publish to Play", "release the APK/AAB", "Play Console", "upload a new version", wants install attribution set up (Play referrer UTMs, Install Referrer API, an in-app counter and the matching Data safety form), or hits a Play policy deadline ("app doesn't meet target API level requirements"). Leads with the MINIMAL tester-link workflow (fastest), then the FULL production listing, then UPDATE for an existing app. Carries the exact Play Console browser steps, signing/keystore setup, the testing-track comparison, required assets, and the gotchas (lintVitalRelease crash, 16 KB alignment, target API deadline) so you don't re-learn them./solo-apple-app-iconBuild an iOS 26+ layered app icon (.icon / Icon Composer) from a designer's SVG, generated by script rather than drawn by hand, and check every appearance without launching the app. Use when the user says "иконка приложения", "сделай иконку", "app icon", "Icon Composer", "layered icon", "иконка не как в фигме", "тёмная иконка выглядит плохо", or when an app still ships a folder of flattened PNGs. Do NOT use for in-app icons and SF Symbols (that is symbol work), or for the App Store screenshot set.Other plugins' skills for the same job