iOS development skill for Swift, SwiftUI, Live Activities, WidgetKit, and XCTest. Use when implementing iOS features.
Provides iOS-specific guidance for Swift, SwiftUI, Live Activities, and WidgetKit. Use when building or debugging iOS apps, widgets, or live activities.
/plugin marketplace add shabaraba/shabaraba-cc-plugins/plugin install claude-org@shabaraba-cc-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Platform-specific knowledge for iOS development.
| Component | Technology |
|---|---|
| Language | Swift 5.9+ |
| UI Framework | SwiftUI |
| Architecture | MVVM or TCA (follow project) |
| Testing | XCTest, XCUITest |
| Live Activities | ActivityKit |
| Widgets | WidgetKit |
lowerCamelCaseUpperCamelCaselowerCamelCase (not SCREAMING_CASE)// 1. Imports
import SwiftUI
import ActivityKit
// 2. Types (protocol, struct, class, enum)
struct ContentView: View {
// 3. Properties (static, @State, let, var)
// 4. Initializer
// 5. Body / Methods
}
// 6. Extensions
extension ContentView {
// ...
}
// 7. Previews
#Preview {
ContentView()
}
// Prefer small, composable views
struct FeatureView: View {
@StateObject private var viewModel = FeatureViewModel()
var body: some View {
VStack {
HeaderSection(title: viewModel.title)
ContentSection(items: viewModel.items)
}
.task {
await viewModel.load()
}
}
}
// MARK: - for sections# Build
xcodebuild -scheme <Scheme> -destination 'generic/platform=iOS' build
# Test
xcodebuild test \
-scheme <Scheme> \
-destination 'platform=iOS Simulator,name=iPhone 15'
# Clean
xcodebuild clean -scheme <Scheme>
NSSupportsLiveActivities to Info.pliststruct MyActivityAttributes: ActivityAttributes {
public struct ContentState: Codable, Hashable {
var value: String
}
var name: String
}
// Start
let attributes = MyActivityAttributes(name: "Example")
let state = MyActivityAttributes.ContentState(value: "Initial")
let activity = try Activity.request(
attributes: attributes,
content: .init(state: state, staleDate: nil)
)
// Update
await activity.update(
ActivityContent(state: newState, staleDate: nil)
)
// End
await activity.end(nil, dismissalPolicy: .immediate)
// Write (main app)
let defaults = UserDefaults(suiteName: "group.com.example.app")
defaults?.set(value, forKey: "sharedKey")
WidgetCenter.shared.reloadAllTimelines()
// Read (widget)
let defaults = UserDefaults(suiteName: "group.com.example.app")
let value = defaults?.string(forKey: "sharedKey")
final class FeatureTests: XCTestCase {
var sut: FeatureViewModel!
override func setUp() {
super.setUp()
sut = FeatureViewModel()
}
override func tearDown() {
sut = nil
super.tearDown()
}
func test_initialState_isEmpty() {
XCTAssertTrue(sut.items.isEmpty)
}
func test_load_populatesItems() async {
await sut.load()
XCTAssertFalse(sut.items.isEmpty)
}
}
xcodebuild cleanWidgetCenter.shared.reloadAllTimelines()This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.