agentleFS
dennisonbertramdennisonbertram/claude-mac-guardian/skills/bluetooth-debug/SKILL.md

bluetooth-debug

Skill1 starsChanged 7 months agoMITView on GitHub

This skill should be used when the user asks to "debug bluetooth", "bluetooth not working", "check bluetooth", "airpods not connecting", "bluetooth devices", or mentions pairing issues. Collects Bluetooth state on macOS and writes a JSON result to ~/.mac-guardian/data/.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When invoked by daily-health-report, return JSON path only.

    line 54
  2. Distinctive:

    Read-only. Never unpair devices, never toggle Bluetooth.

    line 58
  3. Very specific:

    Do not request sudo.

    line 59
  4. Very specific:

    If system_profiler is not installed (very unusual), emit an info finding explaining the missing tool and exit cleanly.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

bluetooth-debug

Reports on the Bluetooth subsystem: controller power state, paired devices, connected devices, battery levels where available, and recent log events.

When to invoke

Trigger on phrases like: "debug bluetooth", "bluetooth not working", "check bluetooth", "airpods not connecting", "bluetooth devices".

Primary source

system_profiler SPBluetoothDataType -json 2>/dev/null.

Parse the resulting JSON with jq when available, otherwise with grep/awk. Key fields of interest:

  • controller_properties.controller_state (On / Off)
  • controller_properties.controller_address
  • device_connected (array of currently connected devices)
  • device_not_connected (array of paired but disconnected devices)

For each device, extract:

  • device_name (or first key if unnamed)
  • device_address
  • device_batteryLevelMain / device_batteryLevelLeft / device_batteryLevelRight / device_batteryLevelCase
  • device_firmwareVersion
  • device_productID / device_vendorID

Severity

  • Controller off: warn with summary "Bluetooth is off."
  • Controller on, any connected device battery < 20%: warn per device.
  • Controller on, otherwise: ok.

Recent events

log show --style compact --last 2h --predicate 'subsystem CONTAINS "bluetooth"' 2>/dev/null | tail -40.

Truncate and include in raw.log_tail. Skip gracefully on no output.

Output contract

Standard envelope. Write to ~/.mac-guardian/data/bluetooth-debug-<ISOdate>.json.

Summary example: "Controller on, 3 paired (2 connected). AirPods Pro 14% battery."

Handoff

  • On direct invocation: bash ${CLAUDE_PLUGIN_ROOT}/scripts/render-single.sh bluetooth-debug.
  • When invoked by daily-health-report, return JSON path only.

Safety

  • Read-only. Never unpair devices, never toggle Bluetooth.
  • Do not request sudo.
  • If system_profiler is not installed (very unusual), emit an info finding explaining the missing tool and exit cleanly.

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.