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 rshankras/claude-code-apple-skills 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")development
US web checkout via the StoreKit External Purchase Link entitlement — currently 0% Apple commission (litigation ongoing), how to ship it safely, and how to architect for a commission flip so a future ruling is a config change, not a rewrite. Use when adding external purchase links, weighing web checkout vs IAP, or planning US-storefront pricing strategy.
tools
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School & Business Manager. Use when a developer has multiple apps, a subscription worth sharing, complementary indie partners, or school/clinic/business buyers.
testing
Run a structured accessibility audit on an iOS/macOS app — automated XCUITest audits, Accessibility Inspector, manual VoiceOver/Dynamic Type passes, and App Store Accessibility Nutrition Label evaluation. Use before release, when preparing Nutrition Label declarations, or for EU Accessibility Act compliance.
tools
Stage-by-stage audit of an app's App Store growth machinery against a 54-item P0–P9 playbook — every item scored from an App Store Connect MCP call, a codebase check, or an explicit question to the user, then routed to the skill or command that fixes it. Read-only on App Store Connect. Use for a growth audit or scorecard, a pre-launch growth plan, a quarterly re-audit, or "which growth levers am I missing."