agentleFS
robinebersrobinebers/openusage/.agents/skills/macos-telemetry/SKILL.md

macos-telemetry

Skill4.3k starsChanged 5 months agoMITView on GitHub

Add and verify lightweight macOS runtime telemetry. Use when wiring Logger events or inspecting logs for windows, sidebars, menus, and actions.

1 other project uses a version of this.

Trending

Quiet since October.about the whole repository

Jan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 6 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 6 mentionsSep 2026: 7 mentionsOct 2026: 4 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the robinebers/openusage repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about robinebers/openusage

The biggest 5 of 26 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 26

Talked about on GitHub, Bluesky and Hacker News (26 times).

On GitHub · 23

18 more on GitHub

On Hacker News · 1

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 12 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to add lightweight app instrumentation that helps debug behavior without turning the codebase into a logging landfill.

    line 10
  2. Very specific:

    Prefer Logger from the OSLog framework for structured app logs.

    line 16
  3. Distinctive:

    Keep info logs concise and stable.

    line 19
  4. Distinctive:

    Do not log secrets, auth tokens, personal data, or raw document contents.

    line 20
  5. Distinctive:

    Add signposts only when measuring timing or performance spans.

    line 21
  6. Very specific:

    Use feature-specific categories like Windowing, Commands, MenuBar, Sidebar, Sync, or Import so logs can be filtered quickly.

    line 40
  7. Distinctive:

    Add the smallest useful instrumentation.

    line 53
  8. Very specific:

    Create one Logger per feature area or type.

    line 54
  9. Distinctive:

    Prefer one high-signal line per user action over noisy value dumps.

    line 56
  10. Very specific:

    Use macos-build-run-debug for the build/run loop.

    line 59
  11. Very specific:

    If script/build_and_run.sh exists, prefer ./script/build_and_run.sh --telemetry for live telemetry checks or ./script/build_and_run.sh …

    line 60
  12. Distinctive:

    Read runtime logs and verify the event fired.

    line 63
  13. Distinctive:

    Use Console.app with a process/subsystem filter when that is the fastest manual check.

    line 64
  14. Very specific:

    Use log stream --style compact --predicate 'process == "AppName"' for live terminal verification.

    line 65
  15. Very specific:

    Prefer tighter predicates when you know the subsystem/category: log stream --style compact --predicate 'subsystem == "com.example.app" && …

    line 66
  16. Distinctive:

    If the event fires, keep only the logs that remain useful for future debugging.

    line 70
  17. Distinctive:

    If it does not fire, move the log closer to the suspected control path and rerun.

    line 71
  18. Distinctive:

    No sensitive payloads are written to unified logs.

    line 78
  19. Very specific:

    Do not use print as the primary app telemetry mechanism for macOS app code.

    line 83
  20. Distinctive:

    Do not leave a dense trail of permanent debug logs around every state mutation.

    line 84
  21. Very specific:

    Do not claim an event is wired correctly until you have a concrete verification path through Console, log stream, or captured process …

    line 85
  22. Very specific:

    If the debugging task is mostly about crash/backtrace analysis rather than action telemetry, switch to macos-build-run-debug.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Telemetry

Quick Start

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.

Minimal Logger Pattern

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.

Workflow

  1. 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
  2. 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.
  3. Build and run the app.
    • Use macos-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.
  4. 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: log stream --style compact --predicate 'subsystem == "com.example.app" && category == "Sidebar"'
  5. Tighten or remove instrumentation.
    • If the event fires, keep only the logs that remain useful for future debugging.
    • If it does not fire, move the log closer to the suspected control path and rerun.

Verification Checklist

  • The app builds after telemetry changes.
  • The relevant action emits exactly one clear log line or a small bounded sequence.
  • The log can be filtered by process, subsystem, or category.
  • No sensitive payloads are written to unified logs.
  • Noisy temporary debug logs are removed or demoted before finishing.

Guardrails

  • Do not use print as the primary app telemetry mechanism for macOS app code.
  • Do not leave a dense trail of permanent debug logs around every state mutation.
  • Do not claim an event is wired correctly until you have a concrete verification path through Console, log stream, or captured process output.
  • If the debugging task is mostly about crash/backtrace analysis rather than action telemetry, switch to macos-build-run-debug.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.