Agent skill

Modal Sheet Debugger

Fix SwiftUI sheet presentation issues in Leavn - competing sheets, dismissal patterns, binding synchronization, enum-based consolidation

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/modal-sheet-debugger

SKILL.md

Modal Sheet Debugger

Fix sheet presentation issues:

  1. Find competing sheets: Multiple .sheet() modifiers on same view

  2. Consolidate pattern:

    swift
    enum SheetType: Identifiable {
        case optionA, optionB
        var id: String { ... }
    }
    @State var activeSheet: SheetType?
    .sheet(item: $activeSheet) { type in
        switch type { ... }
    }
    
  3. Fix dismissal: Update binding before dismiss()

  4. Check bindings: Ensure parent and environment in sync

Use when: Multiple sheets conflict, dismissal bugs, sheet state issues

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results