Agent skill · software engineering · dpearson2699

core-bluetooth

Build direct Bluetooth Low Energy workflows with Core Bluetooth. Use when implementing BLE central or peripheral GATT communication, scanning or connecting with CBCentralManager, discovering services and characteristics, reading/writing/subscribing with CBPeripheral, publishing local services with CBPeripheralManager, handling Bluetooth authorization, background BLE modes, state restoration, write flow control, or CBUUID-based workflows. For privacy-preserving accessory setup/picker flows, use accessorysetupkit first and return here for post-setup GATT communication.

Why this skill is useful

Provides specific Core Bluetooth GATT communication patterns and workflows that the AI wouldn't reliably generate on its own.

What it needs

About 6k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.

What this skill does

Core Bluetooth Scan for, connect to, and exchange data with Bluetooth Low Energy (BLE) devices. Covers the central role (scanning and connecting to peripherals), the peripheral role (advertising services), background modes, and state restoration. Use accessorysetupkit for privacy-preserving accessory discovery and setup; use this skill for direct Core Bluetooth GATT communication. Contents Setup Central Role: Scanning Central Role: Connecting Discovering Services and Characteristics Reading, Writing, and Notifications Peripheral Role: Advertising Background BLE State Restoration Common Mistakes Review Checklist References Setup Info.plist Keys Key Purpose --- --- NSBluetoothAlwaysUsageDescription Required. Explains why the app uses Bluetooth UIBackgroundModes with bluetooth-central Background scanning and connecting UIBackgroundModes with bluetooth-peripheral Background advertising Bluetooth Authorization Core Bluetooth has no explicit permission request API. Add NSBluetoothAlwaysUsageDescription, create the manager when the app is ready for Bluetooth access, then check manager.authorization and manager.state. Treat .denied and .restricted as terminal until the user changes Settings; wait for .poweredOn before scanning, connecting, advertising, or publishing services. Central Role: Scanning Creating the Central Manager Always wait for the poweredOn state before scanning. Scanning for Peripherals Scan for specific service UUIDs to save power. Pass nil to discover all peripherals (not recommended in production). Central Role: Connecting Discovering Services and Characteristics Implement CBPeripheralDelegate to walk the service/characteristic tree. Reading, Writing, and Notifications Reading a Value Writing a Value Subscribing to Notifications Peripheral Role: Advertising Publish services from the local device using CBPeripheralManager. Background BLE Background Central Mode Add bluetooth-central to UIBackgroundModes. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills dpearson2699/core-bluetooth

View the source on GitHub

Browse the @skills marketplace