Add and verify lightweight macOS runtime telemetry. Use when wiring Logger events or inspecting logs for windows, sidebars, menus, and actions.
75
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use this skill to add lightweight app instrumentation that helps debug behavior without turning the codebase into a logging landfill. Prefer Apple's unified logging APIs and verify the events after a build/run loop.
Logger from the OSLog framework for structured app logs.import OSLog
private let logger = Logger(
subsystem: Bundle.main.bundleIdentifier ?? "SampleApp",
category: "Sidebar"
)
@MainActor
func selectItem(_ item: SidebarItem) {
logger.info("Selected sidebar item: \(item.id, privacy: .public)")
selection = item.id
}Use feature-specific categories like Windowing, Commands, MenuBar, Sidebar,
Sync, or Import so logs can be filtered quickly.
Identify the behavior that needs observability.
Add the smallest useful instrumentation.
Logger per feature area or type.Build and run the app.
build-run-debug for the build/run loop.script/build_and_run.sh exists, prefer ./script/build_and_run.sh --telemetry for live telemetry checks or ./script/build_and_run.sh --logs for broader process logs.Read runtime logs and verify the event fired.
log stream --style compact --predicate 'process == "AppName"' for live terminal verification.log stream --style compact --predicate 'subsystem == "com.example.app" && category == "Sidebar"'Tighten or remove instrumentation.
print as the primary app telemetry mechanism for macOS app code.log stream, or captured process output.build-run-debug.11c74d6
Also appears in
since Jul 27, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.