SwiftUI macOS

Revisión de SwiftUI a nivel de tiempo de ejecución para macOS: observación, concurrencia, AppKit

Por kageroumado · kageroumado/swiftui-macos-skill

Probado · Funciona ★ 9.2/10

SwiftUI macOS — Revisión de SwiftUI a nivel de tiempo de ejecución para macOS: observación, concurrencia, AppKit

Qué hace

Eight on-demand reference files que give Claude runtime-level knowledge de SwiftUI on macOS — how the observation registrar decides to notify, what _modify costs versus set, how view identity y NSViewRepresentable updates son gated. Se activa cuando se solicita build, review, o debug a macOS SwiftUI view, fix observation o re-render problems, bridge AppKit, o architect state ownership. Explicitly scoped away from iOS-only SwiftUI y basic Swift questions.

Informe de la prueba

Se revisó un 79-line macOS SwiftUI file con seeded observation traps twice — once cold, once con las references loaded — y la skill found five things que el cold pass missed. Lo sharpest: because Doc es a struct inside an observed array, mutating one row's title fires _modify on the whole array y re-renders the entire List, which the cold review never suspected. It also replaced a weak fix con a better one, conforming the NSViewRepresentable a Equatable to stop updateNSView firing at all instead of guarding inside it. One inconsistency worth knowing: la concurrency reference tells you to prefer DispatchQueue.main.async over Task, but has no rule para el more common case de already being on MainActor y needing no hop at all. El README's install snippet works verbatim from a bare HOME, y every claim in its reference table matched the files on disk.

Probado el: 2026-08-10 · Claude Code 2.x (agent harness)

Instalación

git clone https://github.com/kageroumado/swiftui-macos-skill.git
mkdir -p ~/.claude/skills
cp -r swiftui-macos-skill/skills/swiftui-macos ~/.claude/skills/

Comandos y prompts de ejemplo

  • /swiftui-macosRevisión de SwiftUI a nivel de tiempo de ejecución para macOS: observación, concurrencia, AppKit

Los skills se activan con peticiones en lenguaje natural, sin comandos que memorizar. Tras instalarlo, prompts como estos lo activan (en inglés):

  • Review this SwiftUI macOS file for observation and identity bugs
  • Check this NSViewRepresentable code for update-gating issues
  • Debug why this macOS SwiftUI sidebar view re-renders too often