# core-bluetooth

Guides Bluetooth Low Energy workflows in Swift, covering GATT communication, scanning, and background modes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3700 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/core-bluetooth/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/core-bluetooth

## What it does

This skill guides direct Bluetooth Low Energy implementation in iOS projects using `CBCentralManager` and `CBPeripheralManager`. It covers filtering scans by `CBUUID`, establishing connections, discovering GATT services, and handling value updates through notifications.

Starting any Bluetooth task before reaching `.poweredOn` state will fail immediately. Core Bluetooth lacks a standalone permission prompt API, so you must add `NSBluetoothAlwaysUsageDescription` to `Info.plist` and monitor state transitions manually.

When accessory pairing requires privacy-focused picker flows, `AccessorySetupKit` comes first. This skill handles direct GATT traffic once the device is paired, along with background modes and state restoration.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill core-bluetooth -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/core-bluetooth/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/core-bluetooth/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill core-bluetooth -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/core-bluetooth/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill core-bluetooth -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/core-bluetooth/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills core-bluetooth
```

2. **Manually: put the files in place**
- File: `.github/skills/core-bluetooth/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill core-bluetooth -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/core-bluetooth
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/core-bluetooth/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill core-bluetooth -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/core-bluetooth/SKILL.md

## When to use it
- scan for specific BLE peripherals using service UUIDs
- subscribe to GATT characteristic updates with `CBPeripheral`
- handle Bluetooth authorization and manager state changes
- configure background execution modes in `Info.plist`

## Example prompts
- Write a Swift manager to discover a heart rate monitor via Core Bluetooth and stream notifications.
- Show how to handle write flow control and value reads on CBPeripheral.
- Set up CBCentralManager with background scanning and state restoration support.

## Similar
- [core-data-expert](https://affpapa.org/en/nevibecode/skills/core-data-expert.md) — skill · 2500 installs
- [core-ml](https://affpapa.org/en/nevibecode/skills/core-ml.md) — skill · 414 installs
- [xcode-project-setup](https://affpapa.org/en/nevibecode/skills/xcode-project-setup.md) — skill · 130700 installs
- [expo-migrate-module](https://affpapa.org/en/nevibecode/skills/expo-migrate-module.md) — skill · 19400 installs
- [clerk-swift](https://affpapa.org/en/nevibecode/skills/clerk-swift.md) — skill · 14500 installs
- [swiftdata-pro](https://affpapa.org/en/nevibecode/skills/swiftdata-pro.md) — skill · 9300 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
