.claude/skills/design-system-developer/SKILL.md
Context-aware routing to the Anytype iOS design system including icons, typography, colors, and spacing. Use when working with Figma-to-code translation, design assets, or UI components.
npx skillsauth add anyproto/anytype-swift design-system-developerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Context-aware routing to the Anytype iOS design system: icons, typography, colors, spacing. Helps you navigate Figma-to-code translation.
make generate after adding assets - Icons and assets must be code-generatedNextElement.Y - (CurrentElement.Y + CurrentElement.Height)// 18pt - Toolbar/nav bar icons
Image(asset: .X18.search)
// 24pt - List row icons
Image(asset: .X24.camera)
// 32pt - Buttons, main UI (most common)
Image(asset: .X32.qrCode)
// 40pt - Large features
Image(asset: .X40.profile)
QRCode.svg)/Modules/Assets/.../Assets.xcassets/DesignSystem/x32/QRCode.imageset/make generateImage(asset: .X32.qrCode)// Screen titles
AnytypeText("Settings", style: .uxTitle1Semibold)
// Section headers
AnytypeText("Recent", style: .uxTitle2Semibold)
// Body text
Text("Description").anytypeStyle(.bodyRegular)
// Small labels
Text("Add Member").anytypeStyle(.caption1Medium) // Note: no "ux" prefix!
Content Styles (remove "Content/" prefix):
.bodySemibold.previewTitle2RegularUX Styles - Title/Body/Callout (keep "ux" prefix lowercase):
.uxTitle1Semibold.uxBodyRegularUX Styles - Captions (DROP "ux" prefix - EXCEPTION!):
.caption1Medium (no "ux").caption2Regular (no "ux")| Use Case | Figma Style | Swift Constant | Size |
|----------|-------------|----------------|------|
| Screen titles | UX/Title 1/Semibold | .uxTitle1Semibold | 28pt |
| Section headers | UX/Title 2/Semibold | .uxTitle2Semibold | 17pt |
| Body text | Content/Body/Regular | .bodyRegular | 17pt |
| Small labels | UX/Caption 1/Medium | .caption1Medium | 13pt |
// Backgrounds
.background(Color.Shape.transparentSecondary)
.background(Color.Background.primary)
// Text colors
.foregroundColor(Color.Text.primary)
.foregroundColor(Color.Text.secondary)
// Control colors
.foregroundColor(Color.Control.active)
CRITICAL: Spacing is the GAP between elements, not top-to-top distance.
Formula:
Spacing = NextElement.Y - (CurrentElement.Y + CurrentElement.Height)
Example:
Common mistake:
❌ WRONG: 374 - 326 = 48px (includes first element's height!)
✅ CORRECT: 374 - (326 + 24) = 24px (actual gap)
SwiftUI usage:
Text("Title")
Spacer.fixedHeight(24) // ✅ Correct spacing
Text("Feature")
// ❌ WRONG
Text("Button").anytypeStyle(.uxCaption1Medium) // Doesn't exist!
// ✅ CORRECT
Text("Button").anytypeStyle(.caption1Medium) // Captions drop "ux" prefix
// ❌ WRONG
.background(Color(hex: "#FF0000"))
// ✅ CORRECT
.background(Color.Pure.red)
// ❌ WRONG - Upscaling looks bad
Image(asset: .X18.qrCode)
.frame(width: 32, height: 32)
// ✅ CORRECT - Use native size
Image(asset: .X32.qrCode)
.frame(width: 32, height: 32)
// ❌ WRONG - Top-to-top (includes height)
Spacing = NextElement.Y - CurrentElement.Y
// ✅ CORRECT - Actual gap
Spacing = NextElement.Y - (CurrentElement.Y + CurrentElement.Height)
Full Guides:
Anytype/Sources/PresentationLayer/Common/DESIGN_SYSTEM_MAPPING.mdAnytype/Sources/PresentationLayer/Common/TYPOGRAPHY_MAPPING.mdFor comprehensive coverage of:
Figma References:
.X* constants, no hardcoded asset names.anytypeStyle() or AnytypeTextColor.* constants, no hex valuesmake generate after adding new assetsCODE_GENERATION_GUIDE.md - Run make generate after adding iconsIOS_DEVELOPMENT_GUIDE.md - SwiftUI patterns for design systemNavigation: This is a smart router. For deep technical details, always refer to DESIGN_SYSTEM_MAPPING.md and TYPOGRAPHY_MAPPING.md.
development
Smart router to testing patterns and practices. Use when writing unit tests, creating mocks, testing edge cases, or working with Swift Testing and XCTest frameworks.
development
Audit and improve SwiftUI runtime performance through code review and Instruments guidance. Use for diagnosing slow rendering, janky scrolling, excessive view updates, or layout thrash in SwiftUI apps.
development
SwiftUI view structure, composition, and best practices. Use when refactoring SwiftUI views, organizing view files, or extracting subviews.
development
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting modern SwiftUI patterns.