rivetkit-client-swiftui
The rivetkit-client-swiftui skill provides guidance for integrating Rivet Actors into SwiftUI applications using the RivetKitSwiftUI library. It covers actor connection management, event handling, action execution, and environment configuration.
Is rivetkit-client-swiftui safe to install?
Review the source first: our audit of rivetkit-client-swiftui's source files found 1 shell command, 3 external URLs, no file writes (high risk). Every command and URL listed appears verbatim in the skill's source. The skill suggests executing a shell command to add dependencies and provides code snippets that initiate network connections to Rivet API endpoints.
How we audit skills: our security review methodology.
Who is this skill for?
Swift developers building SwiftUI applications that require real-time communication with Rivet Actors.
What can you do with it?
- Connecting SwiftUI views to Rivet Actors using the @Actor property wrapper.
- Executing asynchronous actions on actors using action() and send().
- Subscribing to actor events via the onActorEvent view modifier.
- Handling actor connection states and errors within the SwiftUI lifecycle.
- Configuring RivetKit clients using endpoint URLs or custom client instances.
How good is this skill?
Quality score: 5/10. The documentation is clear, provides specific code examples for all major features, and follows a logical structure for developers.
What does the skill file contain?
# RivetKit SwiftUI Client
Use this skill when building SwiftUI apps that connect to Rivet Actors with `RivetKitSwiftUI`.
## Version
RivetKit version: 2.3.2
## Error Handling Policy
- Prefer fail-fast behavior by default.
- Avoid broad `do/catch` unless absolutely needed.
- If a catch block is used, handle the error explicitly, at minimum by logging it.
## Install
Add the Swift package dependency and import `RivetKitSwiftUI`:
```swift
// Package.swift
dependencies: [
.package(url: "https://github.com/rivet-dev/rivetkit-swift", from: "2.0.0")
]
targets: [
.target(
name: ...Frequently asked questions
How do I configure the RivetKit client in my SwiftUI app?
Use the .rivetKit(endpoint:) or .rivetKit(client:) view modifier at the root of your view tree.
How do I prevent key injection attacks when using actor keys?
Use arrays for keys instead of string interpolation.
What is the recommended way to handle errors in RivetKit?
Use the .onActorError(actor) view modifier or handle errors explicitly within do/catch blocks.
Can I use environment variables for configuration?
Yes, ClientConfig reads RIVET_NAMESPACE, RIVET_TOKEN, and RIVET_RUNNER from environment variables.
Related skills
swiftui-expert-skill
25.5KDevelopers working on SwiftUI applications who need assistance with state management, performance tuning, API updates, and debugging via Instruments
The swiftui-expert-skill provides guidance for writing, reviewing, and refactoring SwiftUI code for iOS and macOS. It includes workflows for performance optimization, API migration, and Instruments trace analysis.
swiftui-pro
21.8KSwiftUI developers seeking to improve code quality and ensure adherence to modern Apple development standards
The swiftui-pro skill reviews SwiftUI code for modern API usage, maintainability, and performance. It validates code against a set of local reference files covering accessibility, data flow, navigation, and Swift best practices.
swift-concurrency
13.2KSwift developers managing concurrency issues, refactoring callback-based code, or migrating projects to Swift 6
The swift-concurrency skill provides diagnostic and refactoring guidance for Swift Concurrency, including migration to Swift 6, actor isolation, Sendable conformance, and task management.
swiftui-performance-audit
7.7KiOS developers and engineers troubleshooting SwiftUI performance issues such as janky scrolling, high CPU usage, memory growth, and layout thrash
The swiftui-performance-audit skill provides a structured workflow for diagnosing and remediating SwiftUI performance issues. It guides users through code-first reviews using predefined smell catalogs and assists in collecting runtime evidence via Instruments profiling.