accessorysetupkit — for Claude Code accessorysetupkit, community, for Claude Code, ide skills, NSAccessorySetupSupports, Bluetooth, NSAccessorySetupBluetoothServices, NSAccessorySetupBluetoothNames, ASDiscoveryDescriptor, CBCentralManager

v1.0.0

À propos de ce Skill

Scenario recommande : Ideal for AI agents that need privacy-preserving accessory discovery and setup for bluetooth and wi-fi. Resume localise : A macOS menu bar app for real-time CPU, RAM, and thermal monitoring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Fonctionnalités

Privacy-preserving accessory discovery and setup for Bluetooth and Wi-Fi
devices. Replaces broad Bluetooth/Wi-Fi permission prompts with a
system-provided picker that grants per-accessory access with a single tap.
Available iOS 18+ / Swift 6.3.
After setup, apps continue using CoreBluetooth and NetworkExtension for

# Sujets clés

femitz femitz
[0]
[0]
Mis à jour: 4/19/2026

Skill Overview

Start with fit, limitations, and setup before diving into the repository.

Scenario recommande : Ideal for AI agents that need privacy-preserving accessory discovery and setup for bluetooth and wi-fi. Resume localise : A macOS menu bar app for real-time CPU, RAM, and thermal monitoring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Pourquoi utiliser cette compétence

Recommandation : accessorysetupkit helps agents privacy-preserving accessory discovery and setup for bluetooth and wi-fi. A macOS menu bar app for real-time CPU, RAM, and thermal monitoring. This AI agent skill

Meilleur pour

Scenario recommande : Ideal for AI agents that need privacy-preserving accessory discovery and setup for bluetooth and wi-fi.

Cas d'utilisation exploitables for accessorysetupkit

Cas d'usage : Applying Privacy-preserving accessory discovery and setup for Bluetooth and Wi-Fi
Cas d'usage : Applying devices. Replaces broad Bluetooth/Wi-Fi permission prompts with a
Cas d'usage : Applying system-provided picker that grants per-accessory access with a single tap

! Sécurité et Limitations

  • Limitation : communication. AccessorySetupKit handles only the discovery and authorization
  • Limitation : The Bluetooth-specific keys must match the values used in ASDiscoveryDescriptor.
  • Limitation : The central manager's state transitions to poweredOn only when the app has

About The Source

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Démo Labs

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ et étapes d’installation

These questions and steps mirror the structured data on this page for better search understanding.

? Questions fréquentes

Qu’est-ce que accessorysetupkit ?

Scenario recommande : Ideal for AI agents that need privacy-preserving accessory discovery and setup for bluetooth and wi-fi. Resume localise : A macOS menu bar app for real-time CPU, RAM, and thermal monitoring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

Comment installer accessorysetupkit ?

Exécutez la commande : npx killer-skills add femitz/flyby/accessorysetupkit. Elle fonctionne avec Cursor, Windsurf, VS Code, Claude Code et plus de 19 autres IDE.

Quels sont les cas d’usage de accessorysetupkit ?

Les principaux cas d’usage incluent : Cas d'usage : Applying Privacy-preserving accessory discovery and setup for Bluetooth and Wi-Fi, Cas d'usage : Applying devices. Replaces broad Bluetooth/Wi-Fi permission prompts with a, Cas d'usage : Applying system-provided picker that grants per-accessory access with a single tap.

Quels IDE sont compatibles avec accessorysetupkit ?

Cette skill est compatible avec Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Utilisez la CLI Killer-Skills pour une installation unifiée.

Y a-t-il des limites pour accessorysetupkit ?

Limitation : communication. AccessorySetupKit handles only the discovery and authorization. Limitation : The Bluetooth-specific keys must match the values used in ASDiscoveryDescriptor.. Limitation : The central manager's state transitions to poweredOn only when the app has.

Comment installer ce skill

  1. 1. Ouvrir le terminal

    Ouvrez le terminal ou la ligne de commande dans le dossier du projet.

  2. 2. Lancer la commande d’installation

    Exécutez : npx killer-skills add femitz/flyby/accessorysetupkit. La CLI détectera automatiquement votre IDE ou votre agent et configurera la skill.

  3. 3. Commencer à utiliser le skill

    Le skill est maintenant actif. Votre agent IA peut utiliser accessorysetupkit immédiatement dans le projet.

! Source Notes

This page is still useful for installation and source reference. Before using it, compare the fit, limitations, and upstream repository notes above.

Upstream Repository Material

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Upstream Source

accessorysetupkit

A macOS menu bar app for real-time CPU, RAM, and thermal monitoring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

SKILL.md
Readonly
Upstream Repository Material
The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.
Upstream Source

AccessorySetupKit

Privacy-preserving accessory discovery and setup for Bluetooth and Wi-Fi devices. Replaces broad Bluetooth/Wi-Fi permission prompts with a system-provided picker that grants per-accessory access with a single tap. Available iOS 18+ / Swift 6.3.

After setup, apps continue using CoreBluetooth and NetworkExtension for communication. AccessorySetupKit handles only the discovery and authorization step.

Contents

Setup and Entitlements

Info.plist Configuration

Add these keys to the app's Info.plist:

KeyTypePurpose
NSAccessorySetupSupports[String]Required. Array containing Bluetooth and/or WiFi
NSAccessorySetupBluetoothServices[String]Service UUIDs the app discovers (Bluetooth)
NSAccessorySetupBluetoothNames[String]Bluetooth names or substrings to match
NSAccessorySetupBluetoothCompanyIdentifiers[Number]Bluetooth company identifiers

The Bluetooth-specific keys must match the values used in ASDiscoveryDescriptor. If the app uses identifiers, names, or services not declared in Info.plist, the app crashes at discovery time.

No Bluetooth Permission Required

When an app declares NSAccessorySetupSupports with Bluetooth, creating a CBCentralManager no longer triggers the system Bluetooth permission dialog. The central manager's state transitions to poweredOn only when the app has at least one paired accessory via AccessorySetupKit.

Discovery Descriptors

ASDiscoveryDescriptor defines the matching criteria for finding accessories. The system matches scanned results against all rules in the descriptor to filter for the target accessory.

Bluetooth Descriptor

swift
1import AccessorySetupKit 2import CoreBluetooth 3 4var descriptor = ASDiscoveryDescriptor() 5descriptor.bluetoothServiceUUID = CBUUID(string: "12345678-1234-1234-1234-123456789ABC") 6descriptor.bluetoothNameSubstring = "MyDevice" 7descriptor.bluetoothRange = .immediate // Only nearby devices

A Bluetooth descriptor requires bluetoothCompanyIdentifier or bluetoothServiceUUID, plus at least one of:

  • bluetoothNameSubstring
  • bluetoothManufacturerDataBlob and bluetoothManufacturerDataMask (same length)
  • bluetoothServiceDataBlob and bluetoothServiceDataMask (same length)

Wi-Fi Descriptor

swift
1var descriptor = ASDiscoveryDescriptor() 2descriptor.ssid = "MyAccessory-Network" 3// OR use a prefix: 4// descriptor.ssidPrefix = "MyAccessory-"

Supply either ssid or ssidPrefix, not both. The app crashes if both are set. The ssidPrefix must have a non-zero length.

Bluetooth Range

Control the physical proximity required for discovery:

ValueBehavior
.defaultStandard Bluetooth range
.immediateOnly accessories in close physical proximity

Support Options

Set supportedOptions on the descriptor to declare the accessory's capabilities:

swift
1descriptor.supportedOptions = [.bluetoothPairingLE, .bluetoothTransportBridging]
OptionPurpose
.bluetoothPairingLEBLE pairing support
.bluetoothTransportBridgingBluetooth transport bridging
.bluetoothHIDBluetooth HID device

Presenting the Picker

Creating the Session

Create and activate an ASAccessorySession to manage discovery lifecycle:

swift
1import AccessorySetupKit 2 3final class AccessoryManager { 4 private let session = ASAccessorySession() 5 6 func start() { 7 session.activate(on: .main) { [weak self] event in 8 self?.handleEvent(event) 9 } 10 } 11 12 private func handleEvent(_ event: ASAccessoryEvent) { 13 switch event.eventType { 14 case .activated: 15 // Session ready. Check session.accessories for previously paired devices. 16 break 17 case .accessoryAdded: 18 guard let accessory = event.accessory else { return } 19 handleAccessoryAdded(accessory) 20 case .accessoryChanged: 21 // Accessory properties changed (e.g., display name updated in Settings) 22 break 23 case .accessoryRemoved: 24 // Accessory removed by user or app 25 break 26 case .invalidated: 27 // Session invalidated, cannot be reused 28 break 29 default: 30 break 31 } 32 } 33}

Showing the Picker

Create ASPickerDisplayItem instances with a name, product image, and discovery descriptor, then pass them to the session:

swift
1func showAccessoryPicker() { 2 var descriptor = ASDiscoveryDescriptor() 3 descriptor.bluetoothServiceUUID = CBUUID(string: "ABCD1234-0000-1000-8000-00805F9B34FB") 4 5 guard let image = UIImage(named: "my-accessory") else { return } 6 7 let item = ASPickerDisplayItem( 8 name: "My Bluetooth Accessory", 9 productImage: image, 10 descriptor: descriptor 11 ) 12 13 session.showPicker(for: [item]) { error in 14 if let error { 15 print("Picker failed: \(error.localizedDescription)") 16 } 17 } 18}

The picker runs in a separate system process. It shows each matching device as a separate item. When multiple devices match a given descriptor, the picker creates a horizontal carousel.

Setup Options

Configure picker behavior per display item:

swift
1var item = ASPickerDisplayItem( 2 name: "My Accessory", 3 productImage: image, 4 descriptor: descriptor 5) 6item.setupOptions = [.rename, .confirmAuthorization]
OptionEffect
.renameAllow renaming the accessory during setup
.confirmAuthorizationShow authorization confirmation before setup
.finishInAppSignal that setup continues in the app after pairing

Product Images

The picker displays images in a 180x120 point container. Best practices:

  • Use high-resolution images for all screen scale factors
  • Use transparent backgrounds for correct light/dark mode appearance
  • Adjust transparent borders as padding to control apparent accessory size
  • Test in both light and dark mode

Event Handling

Event Types

The session delivers ASAccessoryEvent objects through the event handler:

EventWhen
.activatedSession is active, query session.accessories
.accessoryAddedUser selected an accessory in the picker
.accessoryChangedAccessory properties updated (e.g., renamed)
.accessoryRemovedAccessory removed from system
.invalidatedSession invalidated, create a new one
.migrationCompleteMigration of legacy accessories completed
.pickerDidPresentPicker appeared on screen
.pickerDidDismissPicker dismissed
.pickerSetupBridgingTransport bridging setup in progress
.pickerSetupPairingBluetooth pairing in progress
.pickerSetupFailedSetup failed
.pickerSetupRenameUser is renaming the accessory
.accessoryDiscoveredNew accessory found (custom filtering mode)

Coordinating Picker Dismissal

When the user selects an accessory, .accessoryAdded fires before .pickerDidDismiss. To show custom setup UI after the picker closes, store the accessory on the first event and act on it after dismissal:

swift
1private var pendingAccessory: ASAccessory? 2 3private func handleEvent(_ event: ASAccessoryEvent) { 4 switch event.eventType { 5 case .accessoryAdded: 6 pendingAccessory = event.accessory 7 case .pickerDidDismiss: 8 if let accessory = pendingAccessory { 9 pendingAccessory = nil 10 beginCustomSetup(accessory) 11 } 12 default: 13 break 14 } 15}

Bluetooth Accessories

After an accessory is added via the picker, use CoreBluetooth to communicate. The bluetoothIdentifier on the ASAccessory maps to a CBPeripheral.

swift
1import CoreBluetooth 2 3func handleAccessoryAdded(_ accessory: ASAccessory) { 4 guard let btIdentifier = accessory.bluetoothIdentifier else { return } 5 6 // Create CBCentralManager — no Bluetooth permission prompt appears 7 let centralManager = CBCentralManager(delegate: self, queue: nil) 8 9 // After poweredOn, retrieve the peripheral 10 let peripherals = centralManager.retrievePeripherals( 11 withIdentifiers: [btIdentifier] 12 ) 13 guard let peripheral = peripherals.first else { return } 14 centralManager.connect(peripheral, options: nil) 15}

Key points:

  • CBCentralManager state reaches .poweredOn only when the app has paired accessories
  • Scanning with scanForPeripherals(withServices:) returns only accessories paired through AccessorySetupKit
  • No NSBluetoothAlwaysUsageDescription is needed when using AccessorySetupKit exclusively

Wi-Fi Accessories

For Wi-Fi accessories, the ssid on the ASAccessory identifies the network. Use NEHotspotConfiguration from NetworkExtension to join it:

swift
1import NetworkExtension 2 3func handleWiFiAccessoryAdded(_ accessory: ASAccessory) { 4 guard let ssid = accessory.ssid else { return } 5 6 let configuration = NEHotspotConfiguration(ssid: ssid) 7 NEHotspotConfigurationManager.shared.apply(configuration) { error in 8 if let error { 9 print("Wi-Fi join failed: \(error.localizedDescription)") 10 } 11 } 12}

Because the accessory was discovered through AccessorySetupKit, joining the network does not trigger the standard Wi-Fi access prompt.

Migration from CoreBluetooth

Apps with existing CoreBluetooth-authorized accessories can migrate them to AccessorySetupKit using ASMigrationDisplayItem. This is a one-time operation that registers known accessories in the new system.

swift
1func migrateExistingAccessories() { 2 guard let image = UIImage(named: "my-accessory") else { return } 3 4 var descriptor = ASDiscoveryDescriptor() 5 descriptor.bluetoothServiceUUID = CBUUID(string: "ABCD1234-0000-1000-8000-00805F9B34FB") 6 7 let migrationItem = ASMigrationDisplayItem( 8 name: "My Accessory", 9 productImage: image, 10 descriptor: descriptor 11 ) 12 // Set the peripheral identifier from CoreBluetooth 13 migrationItem.peripheralIdentifier = existingPeripheralUUID 14 15 // For Wi-Fi accessories: 16 // migrationItem.hotspotSSID = "MyAccessory-WiFi" 17 18 session.showPicker(for: [migrationItem]) { error in 19 if let error { 20 print("Migration failed: \(error.localizedDescription)") 21 } 22 } 23}

Migration rules:

  • If showPicker contains only migration items, the system shows an informational page instead of a discovery picker
  • If migration items are mixed with regular display items, migration happens only when a new accessory is discovered and set up
  • Do not initialize CBCentralManager before migration completes — doing so causes an error and the picker fails to appear
  • The session receives .migrationComplete when migration finishes

Common Mistakes

DON'T: Omit Info.plist keys for Bluetooth discovery

The app crashes if it uses identifiers, names, or services in descriptors that are not declared in Info.plist.

swift
1// WRONG — service UUID not in NSAccessorySetupBluetoothServices 2var descriptor = ASDiscoveryDescriptor() 3descriptor.bluetoothServiceUUID = CBUUID(string: "UNDECLARED-UUID") 4session.showPicker(for: [item]) { _ in } // Crash 5 6// CORRECT — declare all UUIDs in Info.plist first 7// Info.plist: NSAccessorySetupBluetoothServices = ["ABCD1234-..."] 8var descriptor = ASDiscoveryDescriptor() 9descriptor.bluetoothServiceUUID = CBUUID(string: "ABCD1234-...")

DON'T: Set both ssid and ssidPrefix

swift
1// WRONG — crashes at runtime 2var descriptor = ASDiscoveryDescriptor() 3descriptor.ssid = "MyNetwork" 4descriptor.ssidPrefix = "My" // Cannot set both 5 6// CORRECT — use one or the other 7var descriptor = ASDiscoveryDescriptor() 8descriptor.ssid = "MyNetwork"

DON'T: Initialize CBCentralManager before migration

swift
1// WRONG — migration fails, picker does not appear 2let central = CBCentralManager(delegate: self, queue: nil) 3session.showPicker(for: [migrationItem]) { error in 4 // error is non-nil 5} 6 7// CORRECT — wait for .migrationComplete before using CoreBluetooth 8session.activate(on: .main) { event in 9 if event.eventType == .migrationComplete { 10 let central = CBCentralManager(delegate: self, queue: nil) 11 } 12}

DON'T: Show the picker without user intent

swift
1// WRONG — picker appears unexpectedly on app launch 2override func viewDidLoad() { 3 super.viewDidLoad() 4 session.showPicker(for: items) { _ in } 5} 6 7// CORRECT — bind picker to a user action 8@IBAction func addAccessoryTapped(_ sender: UIButton) { 9 session.showPicker(for: items) { _ in } 10}

DON'T: Reuse an invalidated session

swift
1// WRONG — session is dead after invalidation 2session.showPicker(for: items) { _ in } // No effect 3 4// CORRECT — create a new session 5let newSession = ASAccessorySession() 6newSession.activate(on: .main) { event in 7 // Handle events 8}

Review Checklist

  • NSAccessorySetupSupports added to Info.plist with Bluetooth and/or WiFi
  • Bluetooth-specific plist keys (NSAccessorySetupBluetoothServices, NSAccessorySetupBluetoothNames, NSAccessorySetupBluetoothCompanyIdentifiers) match descriptor values
  • Session activated before calling showPicker
  • Event handler uses [weak self] to avoid retain cycles
  • All ASAccessoryEventType cases handled, including @unknown default
  • Product images use transparent backgrounds and appropriate resolution
  • ssid and ssidPrefix are never set simultaneously on a descriptor
  • Picker presentation tied to explicit user action, not automatic
  • CBCentralManager not initialized until after migration completes (if migrating)
  • bluetoothIdentifier or ssid from ASAccessory used to connect post-setup
  • Invalidated sessions replaced with new instances
  • Accessory removal events handled to clean up app state

References

Compétences associées

Looking for an alternative to accessorysetupkit or another community skill for your workflow? Explore these related open-source skills.

Voir tout

openclaw-release-maintainer

Logo of openclaw
openclaw

Resume localise : 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

widget-generator

Logo of f
f

Resume localise : Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and

flags

Logo of vercel
vercel

Resume localise : The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
Navigateur

pr-review

Logo of pytorch
pytorch

Resume localise : Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
Développeur