Agent skill
Swift Binding Fixer
Fix SwiftUI binding errors ($var issues) by adding @Bindable to @Observable ViewModels in Leavn app
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/swift-binding-fixer-willsigmon-sigstack-site
SKILL.md
Swift Binding Fixer
Instructions
Fix "cannot find '$viewModel'" errors:
-
Find the error:
bashgrep "cannot find '\$viewModel'" build_output.txt -
Read the view file:
- Check if viewModel is @Observable type
- Look for
@State var viewModelorvar viewModel - Find all
$viewModel.propertyusages
-
Apply fix:
swift// BEFORE @State var viewModel: MyViewModel // OR var viewModel: MyViewModel // AFTER (if using $viewModel) @Bindable var viewModel: MyViewModel -
Common Leavn patterns:
- HomeViewModel: Use @Bindable for sheet bindings
- CommunityViewModel: Use @Bindable for showCreate* bindings
- SettingsViewModel: Use @Bindable for alert bindings
- SermonAIView: Use @Bindable for showing* bindings
Use this skill when: $viewModel errors, @Observable binding issues, sheet presentation errors
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?