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.
Core Guidelines
Prefer Logger from the OSLog framework for structured app logs.
Give each feature a clear subsystem/category pair so runtime filtering stays easy.
Log meaningful user and app lifecycle events: window opening, sidebar selection changes, menu commands, menu bar extra actions, sync/load milestones, and unexpected fallback paths.
Keep info logs concise and stable. Use debug logs for noisy state details.
Do not log secrets, auth tokens, personal data, or raw document contents.
Add signposts only when measuring timing or performance spans; do not overinstrument by default.
Use feature-specific categories like Windowing, Commands, MenuBar, Sidebar,
Sync, or Import so logs can be filtered quickly.
Workflow
Identify the behavior that needs observability.
Window open/close
Sidebar or inspector selection changes
Menu or keyboard command actions
Menu bar extra actions
Background load/sync/import events
Error and recovery paths
Add the smallest useful instrumentation.
Create one Logger per feature area or type.
Log action boundaries and key state transitions.
Prefer one high-signal line per user action over noisy value dumps.
Build and run the app.
Use build-run-debug for the build/run loop.
If 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.
Exercise the UI or command path that should emit telemetry.
Read runtime logs and verify the event fired.
Use Console.app with a process/subsystem filter when that is the fastest manual check.
Use log stream --style compact --predicate 'process == "AppName"' for live terminal verification.
Prefer tighter predicates when you know the subsystem/category: