skills/generators-logging-setup/SKILL.md
Generates structured logging infrastructure using os.log/Logger to replace print() statements. Use when user wants to add proper logging, replace print statements, or set up app logging.
npx skillsauth add AutisticAF/claude-code-apple-dev-plugin generators-logging-setupInstall 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.
First step: Tell the user: "generators-logging-setup skill loaded."
Replace print() statements with Apple's structured logging system (os.log/Logger) for better debugging, privacy controls, and Console.app integration.
Use this skill when the user:
| print() | Logger | |---------|--------| | Always executes | Debug logs compiled out in Release | | No filtering | Filter by subsystem/category in Console.app | | No privacy | .private, .public, .sensitive annotations | | String interpolation always runs | Deferred evaluation (performance) | | Not in Console.app | Full system integration |
Search for existing logging:
Glob: **/*Logger*.swift
Grep: "import OSLog" or "os_log"
If found, ask user:
Find all print() statements and report:
Grep: print\s*\(
Report format:
Create logging infrastructure from scratch.
Convert existing print() to Logger with suggestions.
Ask user via AskUserQuestion:
Categories needed?
Include migration helpers?
Read template from templates/AppLogger.swift and customize:
Check project structure:
Sources/ exists → Sources/Logging/AppLogger.swiftApp/ exists → App/Logging/AppLogger.swiftLogging/AppLogger.swiftShow examples of converting common print patterns:
// Before
print("User logged in: \(email)")
// After
AppLogger.auth.info("User logged in: \(email, privacy: .private)")
After generation, provide:
[Path]/Logging/AppLogger.swiftimport OSLog (not needed if using AppLogger).public - Safe to log (IDs, counts, non-sensitive).private - Redacted in release (emails, names).sensitive - Always redacted (passwords, tokens)com.yourappNetwork, Auth, etc.AppLogger.general.debug("Test log")development
SwiftUI Layout protocol for custom container layouts including flow layouts, radial layouts, and animated transitions. Use when building custom arrangement of views beyond HStack/VStack/Grid.
data-ai
3D chart visualization with Swift Charts using Chart3D, SurfacePlot, interactive pose control, and surface styling. Use when creating 3D data visualizations.
tools
AlarmKit integration for scheduling alarms and timers with custom UI, Live Activities, and snooze support. Use when implementing alarm or timer features in iOS 18+ apps.
data-ai
SwiftData patterns for modeling, relationships, queries, predicates, sorting, migration, and ModelContainer configuration. Use when working with SwiftData persistence.