swiftship/internal/skills/data/features/authentication/SKILL.md
Authentication architecture with email/password, Apple Sign In, Google Sign In, and anonymous guest modes. Covers AuthService as @Observable @MainActor, AuthGuardView gate pattern, optional auth flow, Supabase delegation, and session lifecycle management. Use when implementing user authentication, login flows, or session management in an iOS app.
npx skillsauth add abdullah4ai/apple-developer-toolkit authenticationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Default is email/password + anonymous guest. Only add other methods when the user explicitly asks:
| User Says | Auth Methods | |-----------|-------------| | (nothing specified) | email/password + anonymous guest | | "Apple Sign In" / "Sign in with Apple" | Apple Sign In | | "Google Sign In" | Google Sign In (requires GoogleSignIn package) | | "social login" | Apple + Google | | "guest mode" / "browse without account" | anonymous only |
Methods combine — a user can request email + Apple + anonymous together.
AuthService is @Observable @MainActor — it owns all auth state and lives in Services/Auth/, never inside Features/.
// ViewModels consume AuthService via init injection
@Observable @MainActor
class ProfileViewModel {
private let authService: AuthService
init(authService: AuthService) { self.authService = authService }
}
// Views access AuthService through @Environment
@Environment(AuthService.self) private var authService
When the Supabase skill is also loaded, AuthService delegates to SupabaseService.shared.client.auth for all backend calls. Without a backend skill, AuthService uses a placeholder implementation.
Gate mode (default): AuthGuardView sits at the app root. Users must authenticate before accessing any content.
Optional mode (when user says "auth is optional" or "browse without login"): No root gate. Individual features check authService.isAuthenticated and prompt login when needed.
Services/Auth/ — never inside Features/AuthService via init injection, never call auth APIs directlytesting
Use for 3D games: racing, 3D sports, board games, marble maze, tower defense, bowling. SceneKit + SceneView architecture, 3D scene hierarchy, physics, game loop, primitives, materials, cameras, particles, audio.
documentation
Game UI patterns: SwiftUI HUD overlays on SpriteKit, menus (main/pause/game-over), virtual joystick/d-pad, score displays, health bars, tutorial onboarding.
tools
Download free game sprites/textures/3D models and generate procedural assets. Covers nw_download_asset tool, texture factories, sprite atlas organization, 3D model loading, and programmatic asset creation.
testing
Use for 2D games: arcade, puzzle, sports, ping pong, platformer, shooter, 2D racing. SpriteKit + SpriteView architecture, scene hierarchy, physics, game loop, audio, particles, game feel.