packtpublishing/ai-driven-swift-architecture/rxswift-to-asyncstream
Claude Code and agent skill by packtpublishing/ai-driven-swift-architecture
- community
Checking that the SKILL.md file is still in the repository.
Migrates RxSwift networking code to native Swift async/await. Use when refactoring Observable-based API code, removing RxSwift dependencies, or modernizing to Swift Concurrency.
Install
npx vskill@latest install packtpublishing/ai-driven-swift-architecture/rxswift-to-asyncstreamSKILL.md
Quick Reference: RxSwift → async/await
What you're removing:
What you're adding:
The Migration Pattern
1. Protocol Signatures
2. URLSession Implementation
3. Observable Extensions → Direct Functions
4. Repository Layer
5. ViewModel Layer
6. SwiftUI Integration
Common Patterns
Combining Multiple Requests
Retry Logic
Timeout Handling
Cancellation
Package.swift Changes
Remove RxSwift Dependency
Update Target Dependencies
Testing
XCTest with async/await
Complete Example
Migration Checklist
Code:
- [ ] Remove
import RxSwiftandimport RxCocoa - [ ] Replace
Observable<T>→async throws -> T - [ ] Replace
.rx.response()→urlSession.data(for:) - [ ] Remove
DisposeBagdeclarations - [ ] Convert
.subscribe()→awaitorfor await - [ ] Add
@MainActorto ViewModel UI update methods
Package.swift:
- [ ] Remove RxSwift from
dependenciesarray - [ ] Remove
.external(.RxSwift)from target dependencies - [ ] Verify iOS 15+ for async/await support
Testing:
- [ ] Add
asyncto test functions - [ ] Replace RxTest with XCTest async support
- [ ] Update assertions for async code
Common Gotchas
⚠️ Don't forget `await` - Compiler catches this but easy to miss ⚠️ Use `@MainActor` for UI updates - Prevents threading issues ⚠️ Handle `CancellationError` - Check for task cancellation ⚠️ Parallel vs Sequential - Use async let for parallel execution
Benefits
✅ More readable, linear code flow ✅ No external dependencies ✅ Native Swift error handling ✅ Automatic cancellation via Task ✅ Smaller binary size ✅ Better performance ✅ Future-proof with Apple's recommended approach
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSkills/rxswift-to-asyncstream/SKILL.md
Popularity
- Repository stars
- 4
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/packtpublishing/ai-driven-swift-architecture/rxswift-to-asyncstream)