Actor Isolation Fixer
Fix Swift 6 actor isolation errors in Leavn app - deinit accessing @MainActor properties, nonisolated contexts, concurrent access violations
Best use case
Actor Isolation Fixer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Fix Swift 6 actor isolation errors in Leavn app - deinit accessing @MainActor properties, nonisolated contexts, concurrent access violations
Teams using Actor Isolation Fixer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/actor-isolation-fixer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Actor Isolation Fixer Compares
| Feature / Agent | Actor Isolation Fixer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Fix Swift 6 actor isolation errors in Leavn app - deinit accessing @MainActor properties, nonisolated contexts, concurrent access violations
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Actor Isolation Fixer
## Instructions
Fix actor isolation errors systematically:
1. **Error: "main actor-isolated property X cannot be accessed from nonisolated"**
- **In deinit**: Mark property as `nonisolated(unsafe) private var`
- **In closure**: Add `@MainActor` to Task or use `await MainActor.run { }`
- **In method**: Mark method `@MainActor` or `nonisolated`
2. **Common Leavn patterns**:
```swift
// Timer in @MainActor class deinit
nonisolated(unsafe) private var timer: Timer?
deinit {
timer?.invalidate() // Safe - Timer.invalidate() is thread-safe
}
// Task property in @MainActor class
nonisolated(unsafe) private var task: Task<Void, Never>?
deinit {
task?.cancel() // Safe - Task.cancel() is thread-safe
}
```
3. **Don't use nonisolated(unsafe) for**:
- UI properties (views, layers)
- Mutable state accessed across threads
- Non-thread-safe types
4. **Safe to use nonisolated(unsafe) for**:
- Timers (invalidate is thread-safe)
- Tasks (cancel is thread-safe)
- Notification observers (removeObserver is thread-safe)
Use this skill when: Actor isolation errors, deinit cannot access properties, concurrent access violationsRelated Skills
advanced-math-trading/portfolio-factors
Factor modeling and portfolio construction (Markowitz, Black-Litterman, constraints, turnover).
adapter-factory
Guide for creating new CLI or HTTP adapters to integrate AI models into the AI Counsel deliberation system
actor-critic-methods
Master A2C, A3C, SAC, TD3 - actor-critic methods for continuous control
acc-create-psr17-http-factory
Generates PSR-17 HTTP Factories implementation for PHP 8.5. Creates RequestFactoryInterface, ResponseFactoryInterface, StreamFactoryInterface, UriFactoryInterface, ServerRequestFactoryInterface, UploadedFileFactoryInterface. Includes unit tests.
acc-create-factory
Generates DDD Factory for PHP 8.5. Creates factories for complex domain object instantiation with validation and encapsulated creation logic. Includes unit tests.
Refactor-Monolith
Skill para decomposição segura de arquivos monolíticos. Análise estrutural profunda, mapeamento exaustivo de dependências, extração incremental com zero quebra de lógica. Exige entendimento completo do negócio antes de qualquer ação.
52-execute-refactor-150
[52] EXECUTE. Three-stage refactoring workflow: (1) iterative research of refactor/modularization options, (2) plan + risk/edge-case analysis + Scope150 validation, then implement with tests after user confirmation, and (3) apply Scout105 cleanup protocol. Use when asked to refactor, modularize, or restructure code safely.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
competitive-ads-extractor
Extracts and analyzes competitors' ads from ad libraries (Facebook, LinkedIn, etc.) to understand what messaging, problems, and creative approaches are working. Helps inspire and improve your own ad campaigns.
12-factor-apps
Perform 12-Factor App compliance analysis on any codebase. Use when evaluating application architecture, auditing SaaS applications, or reviewing cloud-native applications against the original 12-Factor methodology.
twelve-factor-app
The Twelve-Factor App methodology for building scalable, maintainable cloud-native applications. Use when designing backend services, APIs, microservices, or any software-as-a-service application. Triggers on deployment patterns, configuration management, process architecture, logging, and infrastructure decisions.
astro
This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.