skills/oslog/SKILL.md
Read, stream, and analyze Apple unified logs (OSLog) for iOS/macOS apps. Auto-detects subsystem from Logger usage or bundle identifier. Supports live log show, real-time streaming, and .logarchive analysis with full predicate reference. Use when the user asks to check app logs, stream console output, debug with OSLog, or analyze .logarchive files on iOS/macOS.
npx skillsauth add artemnovichkov/skills oslogInstall 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.
Read, stream, and analyze Apple unified logs for iOS/macOS apps.
Activate when the user asks to:
.logarchive filesAuto-detect the OSLog subsystem from the project. Try these sources in order:
Logger(subsystem: in Swift files to find the actual subsystem string used in codeproject.pbxproj — fall back to PRODUCT_BUNDLE_IDENTIFIER build setting (common convention is to use bundle ID as subsystem)Info.plist — read CFBundleIdentifier value (resolve $(PRODUCT_BUNDLE_IDENTIFIER) if needed)Store the detected subsystem for reuse within the session.
Query recent logs from the live system log store.
/usr/bin/log show --last <N>m --info --debug --no-pager \
--predicate 'subsystem == "<SUBSYSTEM>"' | head -100
--last 5m, adjust based on user requesthead on first query to avoid flooding outputhead limit or remove it only if the user asks for moreStream logs in real time from a running app.
/usr/bin/log stream --info --debug \
--predicate 'subsystem == "<SUBSYSTEM>"'
--no-pager is not needed here — log stream is inherently streaming and has no pagerrun_in_background — the stream is continuous.logarchiveQuery an exported log archive bundle.
Locate the archive:
ls <path>.logarchive/Info.plist
Determine time range:
/usr/bin/log show --style ndjson --no-pager <archive> | head -1
/usr/bin/log show --style ndjson --no-pager <archive> | tail -1
Query the archive:
/usr/bin/log show --info --debug --no-pager \
--predicate 'subsystem == "<SUBSYSTEM>"' <archive> | head -50
Export a new archive (requires sudo):
# Path must not already exist — log collect creates the directory
sudo /usr/bin/log collect --last 30m --output <path>.logarchive
/usr/bin/log — bare log conflicts with zsh builtin--no-pager — interactive pagers hang in non-interactive contextshead -N on initial queries — archives and log stores can contain millions of entries--info --debug — by default only Default and Error/Fault levels are shown--style ndjson for programmatic parsing/counting, --style default for human-readable outputSee PREDICATES.md for the full predicate field table, comparison operators, and NSPredicate syntax. Key shorthand examples:
's=com.example.app' # filter by subsystem
's=com.example.app AND c=networking' # subsystem + category
's=com.example.app AND type>=error' # errors and faults only
's=com.example.app AND m:"timeout"' # message contains keyword
Show all errors/faults from the app:
/usr/bin/log show --last 10m --no-pager \
--predicate 's=<SUBSYSTEM> AND type>=error' | head -50
Show logs for a specific category:
/usr/bin/log show --last 5m --info --debug --no-pager \
--predicate 's=<SUBSYSTEM> AND c=networking' | head -100
Search for a keyword in messages:
/usr/bin/log show --last 5m --info --debug --no-pager \
--predicate 's=<SUBSYSTEM> AND m:"timeout"' | head -50
Count events by type in an archive:
/usr/bin/log show --no-pager --style ndjson \
--predicate 's=<SUBSYSTEM> AND type=error' <archive> | wc -l
List unique categories from the app:
/usr/bin/log show --last 30m --info --debug --no-pager --style ndjson \
--predicate 's=<SUBSYSTEM>' | head -500 | \
grep -o '"category":"[^"]*"' | sort -u
tools
Sends macOS notifications after xcodebuild commands, showing Build Succeeded or Build Failed with scheme and project info. Mimics Xcode's native build notifications. Auto-triggers on xcodebuild via PostToolUse hook.
development
Compare Figma designs against implementation screenshots, identifying layout, typography, color, and sizing discrepancies. Generates a structured visual review table and an interactive HTML comparison page with swipe and side-by-side modes. Use when the user asks to compare design with preview, compare Figma with screenshot, check design implementation, or provides a Figma URL alongside a screenshot.
development
Generate crash reports from Firebase Crashlytics with automated fix proposals, severity scoring, and developer assignments via git blame. Use when analyzing crashes, triaging production issues, or generating crash triage reports.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.