Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/rshankras/claude-code-apple-skills/logging-setupnpx skills add rshankras/claude-code-apple-skills --skill logging-setupgit clone --depth 1 https://github.com/rshankras/claude-code-apple-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/logging-setup)<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/logging-setup"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/logging-setup.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.00953 |
| Opus 5 | $0.00019 | $0.00477 |
| Sonnet 5 | $0.00008 | $0.00191 |
| Haiku 4.5 | $0.00004 | $0.00095 |
Grade A, and why
logging-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Logging Setup Generator
Replace print() statements with Apple's structured logging system (os.log/Logger) for better debugging, privacy controls, and Console.app integration.
When This Skill Activates
Use this skill when the user:
- Asks to "add logging" or "set up logging"
- Wants to "replace print statements"
- Mentions "os.log", "Logger", or "structured logging"
- Asks about "debug logging" or "production logging"
- Wants to audit print() usage in their codebase
Why Logger Over print()
| 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 |
Pre-Generation Checks
1. Project Context Detection
- Check deployment target (Logger requires iOS 14+ / macOS 11+)
- Search for existing Logger/os.log usage
- Identify source file locations (Sources/, App/, etc.)
2. Conflict Detection
Search for existing logging:
Glob: **/*Logger*.swift
Grep: "import OSLog" or "os_log"
If found, ask user:
- Extend existing logging?
- Replace with new implementation?
- Create separate logger?
Modes of Operation
Mode 1: Audit
Find all print() statements and report:
Grep: print\s*\(
Report format:
- File:line - print statement
- Severity: Info/Warning/Error (based on context)
- Suggested Logger level
Mode 2: Generate
Create logging infrastructure from scratch.
Mode 3: Migrate
Convert existing print() to Logger with suggestions.
Configuration Questions
Ask user via AskUserQuestion:
-
Categories needed?
- Network, Auth, UI, Data (defaults)
- Custom categories?
-
Include migration helpers?
- Extension on String for quick migration
- Temporary print-to-log bridge
Generation Process
Step 1: Create AppLogger.swift
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 142 lines · 39 tokens per session scan A f6e66f669993
logging-setup is a skill published in the GitHub repository rshankras/claude-code-apple-skills (701 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 953 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
swift-performance-pro
Use when diagnosing or fixing performance — SwiftUI render cost, memory and retain cycles, slow lists, launch time, and using Instruments.
swiftui-performance
Audit and improve SwiftUI runtime performance. Use when diagnosing slow rendering, janky scrolling, high CPU, memory usage, excessive view updates, layout thrash, body evaluation cost, identity churn, view lifetime issues, lazy loading, Instruments profiling guidance, and performance audit requests.
iOS Performance
Memory management, profiling, optimization techniques, and Instruments usage for high-performance iOS apps.
swift-concurrency
Resolve Swift concurrency compiler errors, adopt approachable concurrency (SE-0466), and write data-race-safe async code. Use when fixing Sendable conformance errors, actor isolation warnings, or strict concurrency diagnostics; when adopting default MainActor isolation, @concurrent, nonisolated(nonsending), or…
motioneyes-animation-debug
Diagnose, fix, or validate SwiftUI animation and scroll behavior by temporarily instrumenting views with MotionEyes, capturing console traces over time, and comparing motion data to user intent or test expectations. Use when users report bugs such as wrong direction, premature fade, timing or easing mismatch…
motioneyes-visual-analysis
Pixel-based motion and UI change analysis from frame sequences or screenshots using computer vision and visual comparison. Use when .transition or visual effects are not observable via MotionEyes logs, when you only have screenshots/video, when you need regression diffs across builds, or when you need to summarize…