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 taiberium/claude_code_setting 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.
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")tools
Generates multi-step onboarding flows with persistence for iOS/macOS apps. Use when user wants to add onboarding, welcome screens, or first-launch experience.
tools
Generates an offline operation queue with persistence, automatic retry on connectivity, and conflict resolution. Use when user needs offline-first behavior, queued mutations, or pending operations that sync when back online.
development
Generates offer code distribution strategies and configuration guides for subscription and IAP promotions — including partner campaigns, influencer programs, and email re-engagement. Use when setting up offer codes for distribution.
tools
Generates a protocol-based networking layer with async/await, error handling, and swappable implementations. Use when user wants to add API client, networking, or HTTP layer.