No slash command · from apple-plugin
Provides SwiftUI conventions for Apple apps: view composition, layout, async work, accessibility, localization, and UIKit/AppKit interop. Use when building screens that match platform design patterns.
Ships in apple-plugin. 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.
None: SKILL.md is the whole skill.
@main
struct OrdersApp: App {
@State private var session = SessionModel()
let container: ModelContainer = .shared
var body: some Scene {
WindowGroup {
RootView()
.environment(session)
}
.modelContainer(container)
}
}
body.AppDelegate / SceneDelegate) hosts SwiftUI screens through UIHostingController; keep the lifecycle it has.body stops fitting on a screen or a piece repeats. Prefer small struct views over computed some View properties or @ViewBuilder functions for anything with its own state or reuse.body must be pure and fast: no I/O, no formatting of large collections, no object creation that should outlive the render.@Bindable model), not the whole app state.ForEach over Identifiable models or with id: on a real identifier — never \.self on mutable values or array indices for data that can be reordered. Avoid AnyView; branch with if / switch inside a @ViewBuilder instead.ViewModifier + View extension, or a ButtonStyle / LabelStyle — follow what the design system already defines..task { await model.load() } (cancelled automatically when the view disappears) or .task(id: query) { … } to restart when an input changes. Not onAppear { Task { … } }.Button("Save") { Task { await model.save() } } — or a synchronous model method that manages its own task when the project does that..refreshable { await model.reload() }.ContentUnavailableView) and error states.VStack / HStack / ZStack with explicit spacing from the design tokens; Grid for aligned rows; LazyVStack / LazyVGrid inside ScrollView for long content; List for system-styled lists with swipe actions and selection.ViewThatFits and size classes for adaptive layouts — avoid GeometryReader unless you need the actual size, and never put it at the root of a scrolling container..safeAreaInset / .safeAreaPadding for bars instead of manual offsets.Color("Brand") or generated symbols Color.brand) or semantic system colors (.primary, .secondary, Color(.systemBackground)), fonts from text styles (.font(.headline)) or the design system's scaled custom fonts. No hex literals in feature code.Image(systemName:) / Label; check symbol availability against the deployment target..glassEffect / GlassEffectContainer for custom floating controls only when the deployment target allows it (if #available).Label, Button("Title"), or .accessibilityLabel(...) for icon-only buttons. Decorative images: Image(decorative:) or .accessibilityHidden(true)..accessibilityElement(children: .combine); expose custom actions with .accessibilityAction..accessibilityIdentifier("orders.list.row") on elements UI tests need — follow the existing naming scheme.HStack to VStack with @Environment(\.dynamicTypeSize) when content no longer fits.@Environment(\.accessibilityReduceMotion)) for non-essential animation.Localizable.xcstrings): Text("orders.empty.title") / String(localized: "orders.empty.title") with a key or the English source string — match the project's convention. Add a comment for translators where the meaning is ambiguous..formatted() / FormatStyle, never by hand.@Entry macro:extension EnvironmentValues {
@Entry var analytics: any AnalyticsClient = NoopAnalyticsClient()
}
@Environment(\.analytics); observable models with @Environment(SessionModel.self).#Preview with representative states (content, empty, error, long text). Use @Previewable @State for interactive previews and in-memory data (ModelContainer in memory, stub services).UIViewRepresentable / UIViewControllerRepresentable (NSViewRepresentable on Mac) only for what SwiftUI lacks; keep the coordinator small and forward events to the model.UIHostingController subclasses or factory functions — follow the existing pattern.AsyncImage for simple cases, or the project's image loader; downsample large images before display.@concurrent / nonisolated async function or an actor — then assign results on the main actor.Self._printChanges() / Instruments' SwiftUI template to diagnose redundant updates; never leave _printChanges in committed code.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aratkruglik/claude-sdlc --plugin apple-plugin7 skills in this plugin
/apple-testingTesting Apple apps: what to unit-test in a SwiftUI app (observable models, services, mappers, reducers), MainActor-isolated tests, SwiftData and Core Data in memory, protocol doubles for system services, TCA TestStore, XCUITest UI tests (launch arguments, accessibility identifiers, page objects), snapshot tests with swift-snapshot-testing, previews as smoke tests, running tests per platform with xcodebuild and test plans, coverage. Builds on swift-foundation:swift-testing for framework basics.
Use this skill to:
- Test app logic without launching the UI.
- Write UI tests that survive layout changes.
- Run the right scheme and destination for each platform target.
Do NOT use this skill for:
- Swift Testing / XCTest basics — see swift-foundation:swift-testing.
- Server-side Swift tests — see swift-plugin.
/ios-ipadosiPhone and iPad specifics for Apple apps: device families and size classes, adaptive layouts across iPhone, iPad and foldable iPhone screens, iPad multitasking and resizable windows, multiple scenes, pointer, hardware keyboard shortcuts, drag and drop, Apple Pencil, app lifecycle and background work (BGTaskScheduler, background URLSession), push and local notifications, permissions and Info.plist usage descriptions, privacy manifests, WidgetKit / Live Activities / App Intents extensions, Mac Catalyst and "Designed for iPad" on Mac.
Use this skill to:
- Make a screen correct on every iPhone and iPad size the target supports.
- Add a system capability (notifications, background refresh, location, camera) with the right plist keys and permission flow.
- Add or extend a widget, Live Activity or App Intent.
Do NOT use this skill for:
- Mac-native (AppKit / SwiftUI macOS) targets — see apple-plugin:macos-app.
- watchOS targets — see apple-plugin:watchos-app.
Other plugins' skills for the same job