bluetooth
Skill21 starsChanged 4 months agoMITView on GitHub
Guide an Android agent to inspect Bluetooth state, nearby, paired, and publicly visible connected devices, start pairing, and request Bluetooth enable or disable within normal Android app limits.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- pigweed-project/pigweedtheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- pigweed-project/pigweed★ 561same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- daily-device-briefSkill
- mailSkill
- RoutePlanningNavigationSkillSkill
- OpenAppSkillSkill
- shoppingSkill
- my-skillSkill
- web researchSkill
- wifiSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
35 rules. About 0 are common, 29 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈29
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when the user wants the Agent to inspect, scan, pair, or guide enabling/disabling Bluetooth.
- Distinctive: line 18
Check the current Bluetooth on/off state.
- Distinctive: line 55
If a tool reports a missing permission, the Agent should first guide the user to the permissions page to grant it, then retry the original …
- Distinctive: line 61
When the user asks "What Bluetooth devices are nearby?" or "Help me find my Bluetooth headphones":
- Distinctive: line 65
Use the default 3000 ms scan duration.
- Distinctive: line 67
If the result is empty, explain the possible causes: Bluetooth is off, permission is missing, the device is not discoverable/broadcasting, …
- Distinctive: line 71
When the user asks "What devices have I paired?" or "Which Bluetooth devices does this phone remember":
- Distinctive: line 75
If the list is empty, explain that the system has no paired devices, or that permissions are insufficient.
- Distinctive: line 79
When the user asks "Which Bluetooth devices are connected right now":
- Distinctive: line 87
When the user asks to pair a Bluetooth device:
- Very specific: line 90
Prefer calling bluetooth_state to check the current on/off state.
- Very specific: line 91
If the tool returns Bluetooth is disabled, call bluetooth_request_enable first to ask the user to turn Bluetooth on.
- Distinctive: line 92
If the tool reports a missing permission, guide the user to grant it first, then continue.
- Very specific: line 93
Call bluetooth_paired_devices to check whether the target device is already paired:
- Distinctive: line 94
If the target device is already in the list, tell the user it is already paired.
- Very specific: line 95
If the target device is not paired, call bluetooth_nearby_devices to search for nearby devices:
- Distinctive: line 96
Prefer matching by the device name, model, or MAC address provided by the user.
- Distinctive: line 97
If there is no match, explain the possible causes: the device is not in pairing mode, it is too far away, its name is not visible, it is …
- Distinctive: line 98
If there are multiple similar candidates, ask the user to confirm the target device first.
- Distinctive: line 106
When the user asks to turn Bluetooth on:
- Very specific: line 109
If it returns that the enable request was accepted, the system accepted the request.
- Distinctive: line 110
If it returns that the system confirmation dialog is open, prompt the user to confirm in the dialog.
- Distinctive: line 111
If it returns not supported, tell the user that normal apps cannot open that confirmation UI and they need to enable Bluetooth manually in …
- Distinctive: line 113
Do not fall back to the system settings page on tool failure unless a separate tool explicitly provides an "open Bluetooth settings" …
- Distinctive: line 117
When the user asks to turn Bluetooth off:
- Very specific: line 120
If it returns that the disable request was accepted, the system accepted the request.
- Distinctive: line 121
If it returns not supported, clearly tell the user that normal Android apps cannot disable Bluetooth and they need to turn it off manually.
- Distinctive: line 123
Do not claim that Bluetooth has been disabled unless the tool explicitly returns that the disable request was sent or that the system state …
- Distinctive: line 129
Only include unknowns in these scenarios:
- Distinctive: line 136
When including unknowns, remind the user: an unknown device is not necessarily a pairable peripheral, and not necessarily someone else's …
- Distinctive: line 153
When a tool reports a missing permission, prioritize guiding the user to grant it.
- Distinctive: line 154
When a scan result is empty, do not immediately conclude that the device does not exist.
- Distinctive: line 155
When the connected-device list is empty, do not immediately conclude that there are no Bluetooth connections at all.
- Distinctive: line 158
Do not promise or perform "connect to a Bluetooth device".
- Distinctive: line 169
When a permission is missing, the missing permission and the authorization path have been clearly stated.
≈ “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.
Files
Bluetooth Tool Guide
Scope
Use this skill when the user wants the Agent to inspect, scan, pair, or guide enabling/disabling Bluetooth. The Bluetooth tools operate at the normal Android app layer — they are not equivalent to the system Settings app and do not have system-level privileges.
Good fits:
- View nearby Bluetooth devices.
- View already paired Bluetooth devices.
- View connected devices visible through public app profiles.
- Check the current Bluetooth on/off state.
- Initiate the system pairing flow using a Bluetooth MAC address.
- Request to enable Bluetooth.
- Request to disable Bluetooth; under targetSdk 28, prefer the legacy public disable API, and when the system rejects it, clearly tell the user to disable Bluetooth manually.
Not good fits:
- Fully simulate the interaction of the system Bluetooth settings page.
- Guarantee retrieval of all connected Bluetooth devices.
- Bypass system restrictions to silently force-enable or force-disable Bluetooth; when the legacy public toggle API is rejected by the system, the user must handle it manually.
- Directly establish protocol-level connections such as GATT, RFCOMM, HID, or audio.
- Bypass system permissions, system dialogs, or user confirmation.
Available Tools
bluetooth_nearby_devices: Scan for nearby Bluetooth devices. Default scan duration is 3000 ms; unknown devices without a readable name are hidden by default.bluetooth_state: Read the Bluetooth adapter state. Returns on, off, turning_on, turning_off, or unknown.bluetooth_paired_devices: Read the system's list of paired devices.bluetooth_connected_devices: Read connected devices visible to a normal app through public Bluetooth profile APIs.bluetooth_pair_device: Initiate the Android system pairing flow using a Bluetooth MAC address.bluetooth_request_enable: Request to enable Bluetooth. Under targetSdk 28, it tries the legacy public enable API first, then falls back to the system confirmation dialog.bluetooth_disable: Request to disable Bluetooth. Under targetSdk 28, it tries the legacy public disable API first; on failure it reports that normal apps cannot disable Bluetooth.bluetooth_request_disable: Compatibility alias forbluetooth_disable.
Permissions and System Boundaries
Android 12 and above typically require:
BLUETOOTH_SCAN: to scan for nearby Bluetooth devices.BLUETOOTH_CONNECT: to read paired/connected devices, initiate pairing, and request enable/disable.
The current app targets SDK 28, so it can still try legacy public toggle APIs such as BluetoothAdapter.enable() / BluetoothAdapter.disable(). However, the system ROM, device policy, or a future targetSdk bump may still reject them. When a tool fails, follow the returned information and guide the user to handle it manually.
On Android 11 and below, scanning for nearby Bluetooth devices usually depends on location permissions:
ACCESS_FINE_LOCATIONorACCESS_COARSE_LOCATION
If a tool reports a missing permission, the Agent should first guide the user to the permissions page to grant it, then retry the original action. Do not interpret a missing permission as "no devices."
Recommended Workflows
1. Inspect the Bluetooth Environment
When the user asks "What Bluetooth devices are nearby?" or "Help me find my Bluetooth headphones":
- You may call
bluetooth_statefirst to check whether Bluetooth is enabled. - Call
bluetooth_nearby_devices. - Use the default 3000 ms scan duration.
- By default, do not include unknown devices, unless the user explicitly wants troubleshooting, debugging, or cannot find a device.
- If the result is empty, explain the possible causes: Bluetooth is off, permission is missing, the device is not discoverable/broadcasting, it is too far away, or the scan window was too short.
2. View Paired Devices
When the user asks "What devices have I paired?" or "Which Bluetooth devices does this phone remember":
- Call
bluetooth_paired_devices. - Tell the user that "paired" does not mean "currently connected."
- If the list is empty, explain that the system has no paired devices, or that permissions are insufficient.
3. View Connected Devices
When the user asks "Which Bluetooth devices are connected right now":
- Call
bluetooth_connected_devices. - Explain that this list only covers public profiles visible to normal apps, such as GATT, A2DP, and HEADSET.
- If the user sees a device in the system Bluetooth page but the tool does not return it, do not assert that the device is not connected. Explain that it may be an HID connection, a vendor-private profile, a system-internal connection, or a connection Android does not expose to normal apps.
4. Pair a Device
When the user asks to pair a Bluetooth device:
- First confirm Bluetooth is enabled:
- Prefer calling
bluetooth_stateto check the current on/off state. - If the tool returns
Bluetooth is disabled, callbluetooth_request_enablefirst to ask the user to turn Bluetooth on; continue after the user confirms. - If the tool reports a missing permission, guide the user to grant it first, then continue.
- Prefer calling
- Call
bluetooth_paired_devicesto check whether the target device is already paired:- If the target device is already in the list, tell the user it is already paired. Do not initiate pairing again.
- If the target device is not paired, call
bluetooth_nearby_devicesto search for nearby devices:- Prefer matching by the device name, model, or MAC address provided by the user.
- If there is no match, explain the possible causes: the device is not in pairing mode, it is too far away, its name is not visible, it is not broadcasting, or the scan window was too short.
- If there are multiple similar candidates, ask the user to confirm the target device first.
- Once a clearly matched candidate is found, call
bluetooth_pair_devicewith a standard MAC address, for example01:23:45:67:89:AB. - Tell the user that the system may show a confirmation dialog, a PIN entry prompt, or require confirmation on the device side.
Note: The current Bluetooth tools only support initiating the system pairing flow. They do not provide the ability to actively connect to a Bluetooth device.
5. Enable Bluetooth
When the user asks to turn Bluetooth on:
- Call
bluetooth_request_enable. - If it returns that the enable request was accepted, the system accepted the request; you may call
bluetooth_stateagain to confirm the final state. - If it returns that the system confirmation dialog is open, prompt the user to confirm in the dialog.
- If it returns not supported, tell the user that normal apps cannot open that confirmation UI and they need to enable Bluetooth manually in system settings.
Do not fall back to the system settings page on tool failure unless a separate tool explicitly provides an "open Bluetooth settings" capability.
6. Disable Bluetooth
When the user asks to turn Bluetooth off:
- Call
bluetooth_disable. - If it returns that the disable request was accepted, the system accepted the request; you may call
bluetooth_stateagain to confirm the final state. - If it returns not supported, clearly tell the user that normal Android apps cannot disable Bluetooth and they need to turn it off manually.
Do not claim that Bluetooth has been disabled unless the tool explicitly returns that the disable request was sent or that the system state is confirmed off.
Handling Unknown Devices
Unknown devices are filtered out by default. Bluetooth broadcasts without a readable name are usually very noisy — they may be low-energy sensors, temporary broadcasts, privacy (random) addresses, nearby phones, wearables, or other unidentifiable devices.
Only include unknowns in these scenarios:
- The user explicitly says "I can't find the device, help me troubleshoot."
- The user knows the target device has no name.
- Bluetooth scan debugging is in progress.
- You need to observe the volume of surrounding BLE broadcasts.
When including unknowns, remind the user: an unknown device is not necessarily a pairable peripheral, and not necessarily someone else's phone.
Common Returns and Explanations
Bluetooth adapter is unavailable: The current device has no available Bluetooth adapter, or the system service is unavailable.Bluetooth state: on/off/turning_on/turning_off/unknown: The current Bluetooth adapter state.Bluetooth is disabled: Bluetooth is not enabled; it needs to be turned on first.missing permission: Missing Android Bluetooth or location permission; authorization is required first.No named nearby Bluetooth devices found: No nearby devices with a name were found within the scan window.No paired Bluetooth devices found: The system has no paired devices.No connected Bluetooth devices found from public Bluetooth profiles: No connected devices are visible through public app profiles; this does not mean the system Bluetooth page has no connection.Bluetooth enable prompt is not supported: The current system does not allow a normal app to open the Bluetooth confirmation dialog, and the legacy enable API was not accepted; the user must enable it manually.Bluetooth disable is not supported: The current system does not allow a normal app to disable Bluetooth, or the legacy disable API was not accepted; the user must disable it manually.
Agent Behavior Requirements
- Explain the system boundaries first, then give the user the next step. Do not promise capabilities that a normal app cannot deliver.
- When a tool reports a missing permission, prioritize guiding the user to grant it. Do not repeatedly retry the same tool.
- When a scan result is empty, do not immediately conclude that the device does not exist.
- When the connected-device list is empty, do not immediately conclude that there are no Bluetooth connections at all.
- Confirm the target device before pairing to avoid initiating an incorrect pairing against a similarly named device.
- Enabling/disabling Bluetooth must respect system limits; when a tool returns a system confirmation dialog, the user must be prompted to confirm.
- Do not promise or perform "connect to a Bluetooth device"; the current tools have no active-connect capability.
Completion Criteria
The task is complete when one of the following is true:
- The nearby, paired, or connected device list has been shown to the user, with the result boundaries explained.
- The Bluetooth state has been shown, with an explanation of whether further user action is needed.
- A pairing flow has been initiated, and the user has been told that confirmation may be required.
- The system Bluetooth enable confirmation dialog has been opened, and the user has been prompted to confirm.
- It has been clearly stated that the system does not support the current enable/disable request, with a manual-operation suggestion.
- When a permission is missing, the missing permission and the authorization path have been clearly stated.
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
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.

