/shiny:shiny-ble-hostingfrom shiny
Generate code using Shiny.BluetoothLE.Hosting, a BLE peripheral hosting library for .NET with GATT server, advertising, and L2CAP CoC channels
Ships in shiny. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in Shiny.BluetoothLE.Hosting, a .NET library for turning a device into a BLE peripheral. It provides a GATT server, BLE advertising, iBeacon broadcasting, and L2CAP CoC channels through the imperative IBleHostingManager API.
Every GATT service is registered by injecting IBleHostingManager and calling AddService(uuid, primary, sb => ...); every L2CAP listener by calling OpenL2Cap(...) (or one of the file server / ticket broker helpers built on it).
v6 removed the
[BleService]source generator.Shiny.BluetoothLE.Hosting.SourceGeneratorsand its attributes ([BleService],[ReadCharacteristic],[WriteCharacteristic],[NotifyCharacteristic],[RequestResponseCharacteristic],[L2CapService],[OnChannelOpened]), its runtime types (BleServiceContext/ generated{Service}Context,BleContextStore,BleHostingRuntime,BleSubscription,BleL2CapContext,BleHostedServiceSession, theGetMessageReassembler(this BleServiceContext, ...)extension), its generated members (AddBleHostedServices(),AttachBleHostedServices(...),StartBleHostedAdvertising(...),NotifyXoverloads, theBleServiceproperty, attribute-driven PSM publication) and itsSBH0xxdiagnostics no longer exist. The older reflection-based pattern (BleGattCharacteristicbase class,[BleGattCharacteristic],AddBleHostedCharacteristic<T>,AttachRegisteredServices) was removed before that. Never generate code against any of those - register services withIBleHostingManagerdirectly.
Invoke this skill when the user wants to:
StreamShiny.BluetoothLE.Hosting (Android, iOS/macOS, Mac Catalyst, Windows stub), Shiny.BluetoothLE.Hosting.Linux (Linux via BlueZ)Shiny.BluetoothLE.HostingNotSupportedException for advertising/GATT-server hosting; only the OpenL2Cap API is exposed and it also throws on Windows. There is no tvOS target and there cannot be one — CBMutableService and CBMutableCharacteristic have no constructors on tvOS, which is Apple's way of saying an Apple TV cannot act as a GATT peripheral. If asked to build a GATT server or advertise from tvOS, say it is impossible rather than generating code; the central role (Shiny.BluetoothLE) does support tvOS.Shiny.Core, Shiny.BluetoothLE.CommonInject IBleHostingManager and call AddService(uuid, primary, builder) to register a GATT service. The package ships no source generator or attributes.
dotnet add package Shiny.BluetoothLE.Hosting
builder.Services.AddBluetoothLeHosting();
When generating code for Shiny.BluetoothLE.Hosting projects, follow these conventions:
Always request access before advertising or adding services:
var access = await hostingManager.RequestAccess();
if (access != AccessState.Available)
{
// Handle denied/disabled/not supported
return;
}
Use the builder pattern to add services and characteristics inline:
var service = await hostingManager.AddService("12345678-1234-1234-1234-123456789abc", true, sb =>
{
sb.AddCharacteristic("12345678-1234-1234-1234-123456789ab1", cb =>
{
cb.SetRead(request =>
{
var data = System.Text.Encoding.UTF8.GetBytes("Hello");
return Task.FromResult(GattResult.Success(data));
});
cb.SetWrite(request =>
{
var received = request.Data;
if (request.IsReplyNeeded)
request.Respond(GattState.Success);
return Task.CompletedTask;
}, WriteOptions.Write);
cb.SetNotification(sub =>
{
// sub.IsSubscribing tells you if subscribing or unsubscribing
// sub.Peripheral is the central device
return Task.CompletedTask;
}, NotificationOptions.Notify);
});
});
IBleHostingManagerFor anything with more than a characteristic or two, wrap the AddService(...) call in your own class
so the handlers, the IGattCharacteristic references you notify through, and any per-central state
live in one place. Always pass the full 128-bit UUID - the API does not normalize short forms.
public class HeartRateService(IBleHostingManager hosting, IHeartRateSensor sensor) : IAsyncDisposable
{
public const string ServiceUuid = "0000180d-0000-1000-8000-00805f9b34fb";
const string MeasurementUuid = "00002a37-0000-1000-8000-00805f9b34fb";
const string ControlPointUuid = "00002a39-0000-1000-8000-00805f9b34fb";
IGattCharacteristic? measurement;
public async Task Start()
{
await hosting.AddService(ServiceUuid, true, sb =>
{
// read + indicate on one characteristic
this.measurement = sb.AddCharacteristic(MeasurementUuid, cb => cb
.SetRead(request =>
{
// IPeripheral.Context is yours - per-central state lives as long as Shiny caches that central
var user = request.Peripheral.Context as AuthUser;
return Task.FromResult(GattResult.Success(new byte[] { 0x00, sensor.Read(user) }));
})
.SetNotification(options: NotificationOptions.Indicate)
);
sb.AddCharacteristic(ControlPointUuid, cb => cb.SetWrite(request =>
{
var state = request.Offset == 0 ? GattState.Success : GattState.InvalidOffset;
if (request.IsReplyNeeded)
request.Respond(state);
return Task.CompletedTask;
}));
});
}
public Task PushMeasurement(byte value, CancellationToken cancellationToken)
=> this.measurement is { SubscribedCentrals.Count: > 0 } m
? m.Notify(new byte[] { 0x00, value }, cancellationToken) // all subscribers
: Task.CompletedTask;
public ValueTask DisposeAsync()
{
hosting.RemoveService(ServiceUuid);
return ValueTask.CompletedTask;
}
}
Register the class yourself (builder.Services.AddSingleton<HeartRateService>()) and call Start()
after RequestAccess(). Keep the instance alive for as long as the service should be hosted.
A GATT write response cannot carry a payload, so a request/response exchange is a characteristic with both write and notify: the central subscribes, writes the request, and the reply comes back to that central as a notification. Respond to the write first, then notify only the writing central:
sb.AddCharacteristic(CommandUuid, cb => cb
.SetNotification()
.SetWrite(async request =>
{
if (request.IsReplyNeeded)
request.Respond(GattState.Success);
var reply = await this.Handle(request.Data);
if (request.Characteristic.SubscribedCentrals.Any(x => x.Uuid == request.Peripheral.Uuid))
await request.Characteristic.Notify(reply, request.Peripheral);
})
);
A write or notification carries at most Mtu bytes - 20 on a link that never negotiated more. When a
request or reply can be longer (JSON, a certificate, a scan result), use BleMessageFraming rather than
inventing a chunking protocol: feed each write fragment into a BleMessageReassembler kept per central,
run the handler once the message is whole, and send the reply with NotifyMessage:
readonly ConcurrentDictionary<string, BleMessageReassembler> reassemblers = new();
sb.AddCharacteristic(CommandUuid, cb => cb
.SetNotification(sub =>
{
// the central's partial message goes with its subscription
if (!sub.IsSubscribing)
this.reassemblers.TryRemove(sub.Peripheral.Uuid, out _);
return Task.CompletedTask;
})
.SetWrite(async request =>
{
var reassembler = this.reassemblers.GetOrAdd(
request.Peripheral.Uuid,
_ => new BleMessageReassembler(maxMessageBytes: 16 * 1024)
);
BleMessageFrameResult frame;
byte[]? message;
lock (reassembler)
frame = reassembler.Push(request.Data, out message);
if (frame == BleMessageFrameResult.Partial)
{
if (request.IsReplyNeeded)
request.Respond(GattState.Success);
return;
}
if (frame != BleMessageFrameResult.Complete)
{
// Malformed / OutOfSequence / TooLarge - the reassembler has already reset
if (request.IsReplyNeeded)
request.Respond(GattState.Failure);
return;
}
if (request.IsReplyNeeded)
request.Respond(GattState.Success);
var command = JsonSerializer.Deserialize(message!, AppJsonContext.Default.Command)!;
var reply = JsonSerializer.SerializeToUtf8Bytes(await this.Run(command), AppJsonContext.Default.Result);
await request.Characteristic.NotifyMessage(reply, request.Peripheral);
})
);
Never share one BleMessageReassembler across centrals - two centrals writing at once would interleave
fragments and both messages would be discarded. Key it by IPeripheral.Uuid (one per central, per
characteristic, per direction) and remove it when the central unsubscribes or goes away.
The central must speak the same format - WriteCharacteristicMessageAsync to send and
NotifyCharacteristicMessages to receive, in Shiny.BluetoothLE (see the shiny-bluetoothle skill). A
plain WriteCharacteristicAsync against a framed characteristic is not a valid fragment. As with any
request/response characteristic, the central subscribes before it writes.
A central has no in-band way to learn a PSM, so open the listener first and serve instance.Psm from a
read characteristic (two little-endian bytes):
var instance = await hosting.OpenL2Cap(secure: false, onOpen: channel => _ = Echo(channel));
await hosting.AddService(StreamServiceUuid, true, sb =>
sb.AddCharacteristic(PsmCharacteristicUuid, cb => cb.SetRead(_ =>
{
var psm = instance.Psm;
return Task.FromResult(GattResult.Success(new[] { (byte)(psm & 0xFF), (byte)(psm >> 8) }));
}))
);
static async Task Echo(L2CapChannel channel)
{
using (channel)
{
// ReadAll: IAsyncEnumerable over DataReceived, ends when the central closes the channel
await foreach (var buffer in channel.ReadAll())
await channel.Write(buffer).ToTask();
}
}
// Advertise with local name and service UUIDs
await hostingManager.StartAdvertising(new AdvertisementOptions(
LocalName: "MyDevice",
ServiceUuids: "12345678-1234-1234-1234-123456789abc"
));
// Advertise with defaults (no name, no service UUIDs)
await hostingManager.StartAdvertising();
// Stop advertising
hostingManager.StopAdvertising();
await hostingManager.AdvertiseBeacon(
uuid: Guid.Parse("12345678-1234-1234-1234-123456789abc"),
major: 1,
minor: 100,
txpower: -59
);
// From an IGattCharacteristic reference
var data = System.Text.Encoding.UTF8.GetBytes("Updated value");
// Notify all subscribed centrals
await characteristic.Notify(data);
// Notify specific centrals
await characteristic.Notify(data, specificPeripheral1, specificPeripheral2);
IPeripheral.Mtu is the usable payload -- the negotiated ATT MTU
already minus the 3-byte ATT header. Cap a notification at peripheral.Mtu directly; do not
subtract the header again. Anything larger is silently truncated by the platform.
On iOS, Mac Catalyst and macOS Notify applies CoreBluetooth's back-pressure: when the transmit queue
is full it waits for peripheralManagerIsReadyToUpdateSubscribers and retries, so the task completes
only once the value is actually queued. Await each Notify before sending the next one -- do not fire
many in parallel with Task.WhenAll, and do not add your own delay or retry loop around it.
Pass a CancellationToken to bound that wait - it goes before the params centrals:
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
await characteristic.Notify(data, cts.Token); // all subscribers
await characteristic.Notify(data, cts.Token, request.Peripheral); // one central
If Bluetooth powers off while an Apple Notify is waiting, the task faults with InvalidOperationException.
An empty centrals list means every
subscriber on all platforms; a named list goes only to those centrals. SubscribedCentrals is tracked whether
or not SetNotification was given a subscribe hook, so never register a no-op hook just to populate it.
Android paces Notify per central - it waits for onNotificationSent before sending that central the next
value and throws if Android refuses the notification or reports a failed status. Do not add delays between
notifications. A central that enabled indications receives indications.
Linux (BlueZ) has two limits the code you generate must respect. BlueZ only tells the app whether any
central has notifications enabled, so while one is subscribed every connected central appears in
SubscribedCentrals. And every Notify reaches all subscribed centrals - the centrals argument cannot narrow
it (the send is skipped only when none of the named centrals is subscribed). Never put per-central data on a
notify characteristic that several centrals subscribe to on Linux; request/response replies sent with
Notify(reply, request.Peripheral) fan out to every subscriber there. Adding or removing a service re-registers the whole GATT application with BlueZ.
public Task Push(IGattCharacteristic characteristic, IPeripheral central, byte[] payload)
{
var max = central.Mtu; // NOT central.Mtu - 3
return characteristic.Notify(payload.Take(max).ToArray(), central);
}
Do not truncate a payload that has to arrive whole, and do not hand-roll chunking. NotifyMessage (in
GattMessageExtensions) splits it with BleMessageFraming - a one-byte header per fragment: bit 7 START,
bit 6 END, bits 0-5 a sequence number - sized to that central's MTU, and awaits each notification in turn:
await characteristic.NotifyMessage(bigPayload, request.Peripheral, cancellationToken);
It addresses one central, because fragments are sized per central. Never send two messages to the same
central on the same characteristic concurrently - the fragments interleave and the central discards both.
The central receives with NotifyCharacteristicMessages (Shiny.BluetoothLE).
For framed writes, keep a BleMessageReassembler per central - a dictionary keyed by
request.Peripheral.Uuid, removed on unsubscribe/disconnect - and push each write fragment into it, as in
the request/response example in section 2b. Never share one reassembler across centrals.
When WriteRequest.IsReplyNeeded is true, you must call Respond:
cb.SetWrite(request =>
{
try
{
// Process data
if (request.IsReplyNeeded)
request.Respond(GattState.Success);
}
catch
{
if (request.IsReplyNeeded)
request.Respond(GattState.Failure);
}
return Task.CompletedTask;
}, WriteOptions.Write);
Publish an L2CAP PSM that centrals can connect to for streaming data without going through GATT. OpenL2Cap returns an L2CapInstance representing the listener; the onOpen callback fires for every accepted central connection. Each L2CapChannel is itself an IDisposable — dispose it to close that specific central's channel; dispose the L2CapInstance to stop accepting new connections and release the PSM.
using System.Reactive.Threading.Tasks;
using Shiny.BluetoothLE;
using Shiny.BluetoothLE.Hosting;
var instance = await hostingManager.OpenL2Cap(
secure: false,
onOpen: channel =>
{
Console.WriteLine($"Central {channel.Identifier} connected on PSM {channel.Psm}");
channel.DataReceived.Subscribe(
async payload =>
{
// Echo back
await channel.Write(payload).ToTask();
},
ex => Console.WriteLine($"Channel error: {ex.Message}"),
() => channel.Dispose()
);
}
);
Console.WriteLine($"Listening on PSM {instance.Psm}");
// Later, when shutting down:
instance.Dispose();
The platform-assigned PSM is on instance.Psm — advertise it to centrals out-of-band (typically through a GATT characteristic exposed by your service).
Platform notes:
CBPeripheralManager.PublishL2CapChannel(encryptionRequired). The secure flag maps to encryption-required.BluetoothAdapter.ListenUsing[Insecure]L2capChannel. Requires API 29+ — throws InvalidOperationException on older versions.AF_BLUETOOTH / BTPROTO_L2CAP / SOCK_SEQPACKET socket via Shiny.BluetoothLE.Hosting.Linux. PSM is kernel-assigned from the LE dynamic range (≥ 0x80); secure=true maps to BT_SECURITY_MEDIUM, secure=false to BT_SECURITY_LOW. Independent of GATT-server / LE-advertisement hosting (still WIP on Linux) — centrals must learn the device address out-of-band.OpenL2Cap throws NotSupportedException.OpenL2CapFileServer(...) publishes a PSM backed by a directory: connected centrals can push files to
it and pull files from it, using IPeripheral.UploadFile / IPeripheral.DownloadFile on the client
side (see the shiny-bluetoothle skill). This is the API to reach for — do not hand-roll a
protocol over DataReceived.
using Shiny.BluetoothLE;
using Shiny.BluetoothLE.Hosting;
var instance = await hostingManager.OpenL2CapFileServer(
rootDirectory: Path.Combine(FileSystem.AppDataDirectory, "ble-share"),
secure: false,
configure: o =>
{
o.AllowUploads = true;
o.AllowDownloads = true;
o.MaxUploadSize = 10 * 1024 * 1024; // refused as TooLarge before any body byte moves
o.OverwriteExistingUploads = false;
o.Authorize = req => req.FileName.EndsWith(".bin");
o.OnProgress = e => Console.WriteLine($"{e.PeerIdentifier} {e.FileName} {e.Progress.PercentComplete:P0}");
o.OnCompleted = r => Console.WriteLine($"{r.LocalFilePath} <- {r.Result.BytesTransferred} bytes in {r.Result.Elapsed}");
o.OnError = (req, ex) => Console.WriteLine($"{req?.FileName}: {ex.Message}");
}
);
Console.WriteLine($"File server on PSM {instance.Psm}");
instance.Dispose(); // unpublish and drop connected peers
Peer-supplied file names are resolved under RootDirectory; absolute paths and anything traversing
out (../) are refused with NotPermitted and never touch the filesystem.
For anything the directory server does not cover, handle requests yourself — this is also how you serve from a database, generate content on the fly, or route by peer:
var instance = await hostingManager.HandleL2CapRequests(
secure: false,
onRequest: async (request, ct) =>
{
// request.Type (Upload/Download), .FileName, .Size, .PeerIdentifier, .Psm
if (request.Type == L2CapTransferType.Download && request.FileName == "config.json")
{
var bytes = Encoding.UTF8.GetBytes(BuildConfigJson());
await request.AcceptDownload(new MemoryStream(bytes), bytes.Length, cancellationToken: ct);
}
else if (request.Type == L2CapTransferType.Upload && request.Size < 1_000_000)
{
await request.AcceptUpload(Path.Combine(inbox, Guid.NewGuid() + ".bin"), cancellationToken: ct);
}
else
{
await request.Reject(L2CapTransferError.NotPermitted, "nope", ct);
}
}
);
Every request must be answered with an accept or Reject before returning; the peer is blocked waiting
on the answer. Requests are served one at a time per channel. A refusal keeps the channel alive for the
next request.
Progress on the hosting side uses the same TransferProgress shape as the client
(PercentComplete, BytesPerSecond, BytesTransferred, BytesToTransfer, EstimatedTimeRemaining).
Raw streaming: channel.SendFile(...) remains available as the protocol-less primitive — bytes with
progress, no handshake, receiver must already know the length and framing. Use the file server unless
you are talking to a non-Shiny central.
Streamchannel.AsStream() (L2CapChannelStream, namespace Shiny.BluetoothLE) wraps an open channel as a
System.IO.Stream for anything that reads or writes streams - CopyToAsync, JsonSerializer, a hash:
await using var stream = channel.AsStream(maxWriteSize: 4096); // disposing closes the channel unless leaveOpen: true
await source.CopyToAsync(stream, cancellationToken);
Read/Write throw NotSupportedException. Not seekable.DataReceived on construction, and bytes the
peer sends before anything is subscribed are lost.MaxWriteSize (default 4096, settable after creation) are split. A read returns 0 when
the peer closes the channel.UploadFile/ReadFileRequest
can take turns on one channel without losing bytes.L2CapTicketBroker)Do not open a PSM per transfer - PSMs come from a small dynamic range, and a released one can be handed straight to another process, so a PSM you gave a central can go stale before it connects. When a device offers several bulk transfers (a camera frame, a log dump, a firmware image) use the ticket broker: one listener, and each channel claims its transfer with a single-use token.
builder.Services.AddBluetoothLeHosting();
builder.Services.AddL2CapTicketBroker(o =>
{
o.Secure = true; // default; the central must open with the same setting
o.HandshakeTimeout = TimeSpan.FromSeconds(15); // default; a silent channel is closed after this
o.MaxWriteSize = 4096; // default per-write size on claimed channels
});
Reserve a ticket from an authenticated route - typically a GATT command - and return ticket.Psm and
ticket.Token to that central only:
public class CameraService(IBleHostingManager hosting, L2CapTicketBroker broker, ICamera camera)
{
const string ServiceUuid = "7a5e0000-5c2d-4f5e-9b1a-3c6d2e8f1a00";
const string CaptureUuid = "7a5e0001-5c2d-4f5e-9b1a-3c6d2e8f1a00";
public Task Start() => hosting.AddService(ServiceUuid, true, sb =>
sb.AddCharacteristic(CaptureUuid, cb => cb
.SetNotification()
.SetWrite(async request =>
{
if (request.IsReplyNeeded)
request.Respond(GattState.Success);
byte[] reply;
if (request.Peripheral.Context is not AuthUser) // your own per-central state
{
reply = Error("not authorised"); // Error/Encode: your reply format
}
else
{
var ticket = await broker.Reserve(
label: "capture",
lifetime: TimeSpan.FromSeconds(30), // unclaimed token expires after this
handler: async (stream, token) =>
{
// stream is an L2CapChannelStream; it is closed when this returns, which ends the transfer
await using var jpeg = await camera.Capture(token);
await jpeg.CopyToAsync(stream, token);
},
maxWriteSize: 8192 // optional, overrides the broker default
);
reply = Encode(ticket.Psm, ticket.Token);
}
// a PSM + 32-char token is longer than a 20-byte notification - frame the reply
await request.Characteristic.NotifyMessage(reply, request.Peripheral);
})
)
);
}
The central subscribes with NotifyCharacteristicMessages, then writes the capture command. If the command
itself can exceed one write, reassemble it per central first (section 2b).
Reserve opens the listener on first use; broker.Psm is 0 until then. Every ticket shares the same PSM.HandshakeTimeout - is answered (UnknownTicket, AlreadyClaimed,
Malformed, VersionMismatch) and closed without reaching any handler.broker.Release(token) withdraws an unclaimed ticket and cancels the handler's token if one is running -
call it when the central abandons the transfer (a cancel command, a disconnect).PendingTickets counts issued tickets not yet finished, released or expired. Disposing the broker cancels
every ticket and closes the listener.The central claims it with peripheral.OpenL2CapTicketChannel(psm, token) (see the shiny-bluetoothle
skill). The wire format is L2CapTickets: the central sends "SL2T" [version:1] [length:1] [token:32 ASCII],
the host answers "SL2T" [version:1] [status:1], and only after Accepted does the channel carry the transfer.
BleHosting/ folder, one class per GATT serviceFeatures/{Feature}/{Name}HostingService.csIPeripheral: Both Shiny.BluetoothLE (client) and Shiny.BluetoothLE.Hosting define an IPeripheral interface with different members. If both packages are referenced in the same project, do NOT add both namespaces as global usings. Use file-level using directives or FQN (Shiny.BluetoothLE.Hosting.IPeripheral) to disambiguate.RequestAccess() and check the result before any hosting operations, so a denied permission or a switched-off adapter reaches the user rather than surfacing as a thrown InvalidOperationException deeper in. On Apple platforms it is no longer required for correctness: as of 5.6, AddService(...) and StartAdvertising(...) wait out the CBPeripheralManager power-on handshake themselves. Before that they issued the native call against a manager still reporting Unknown, which CoreBluetooth drops without ever invoking the completion delegate both methods await -- so a call made at app startup hung indefinitely instead of failing. Do not work around it with your own await RequestAccess() retry loop or a Task.Delay before advertisingIBleHostingManager.AddService directly -- the [BleService] source generator was removed in v6. For anything non-trivial, wrap the AddService(uuid, primary, sb => ...) call in your own service class that keeps the IGattCharacteristic references and per-central state"180D" work on Apple (CBUUID.FromString) but throw on Android (java.util.UUID.fromString). AddService / AddCharacteristic do not normalizeWriteRequest.IsReplyNeeded and call Respond with the appropriate GattStateGattResult.Error(GattState.Failure) in read handlers when an error occurs. A handler that throws instead is caught: on Apple, Android and Linux the central gets a generic error (CBATTError.UnlikelyError / GattStatus.Failure / org.bluez.Error.Failed) and the exception goes no further - it never crashes the app. Windows swallows it without answering, so the central waits for its own timeout. Same for a throwing SetNotification subscribe hook: the subscription is still recorded. Return or Respond with a specific GattState rather than relying on thisStopAdvertising() and ClearServices() when doneStartAdvertising if already advertisingL2CapInstance and per-central L2CapChannels explicitly -- disposing the instance closes the listener but does not auto-close already-open channels. Dispose each channel when your handler for it finishesRemoveService(uuid) / ClearServices() for GATT services and L2CapInstance.Dispose() for listeners; nothing does it for youMtu as-is -- IPeripheral.Mtu is the payload (ATT MTU minus BleConstants.AttHeaderSize), not the ATT MTU. Add the header back with + BleConstants.AttHeaderSize only when feeding an API that genuinely wants an ATT MTUBleHostingManager keys services by UUID. Put every characteristic of a service in one AddService callMtu -- NotifyMessage for replies and a per-central BleMessageReassembler (keyed by IPeripheral.Uuid) for writes, paired with WriteCharacteristicMessageAsync / NotifyCharacteristicMessages on the central. Never truncate, and never hand-roll a chunk counterL2CapTicketBroker -- one Reserve per transfer, the token handed out over an authenticated GATT route, instead of an OpenL2Cap per transferFor detailed API signatures and examples, see:
reference/api-reference.md - Full API surface, interfaces, enums, records, and usage examplesWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub shinyorg/skills --plugin shiny57 skills in this plugin
/localizegenGenerate strongly-typed localization classes from .resx resource files using Shiny.Extensions.Localization.Generator for .NET applications/shiny-accessorysetupGenerate code using Shiny.BluetoothLE.AccessorySetup - the system accessory pairing sheet for BLE devices (AccessorySetupKit on iOS 18+, CompanionDeviceManager on Android) with no MFi, no location prompt and no general Bluetooth prompt on iOS; picked accessories open as Shiny.BluetoothLE peripherals, and Android adds background presence (device appeared / disappeared) events/shiny-actorsGenerate code using Shiny.Actors — Orleans-style virtual actors without the ceremony, AOT/trim-clean, running anywhere .NET runs including .NET MAUI and Blazor WebAssembly. Covers actor interfaces and source-generated proxies, the ShinyActorBuilder (AddShinyActors), persistent state with ETags, named states and auto-save, event-sourced JournaledActor with snapshots, state and event migrations, typed streams (durable, implicit consumers), timers and persistent reminders (background jobs via Shiny.Jobs, on-time OS notifications via Shiny.Notifications), concurrency control ([Reentrant], [AlwaysInterleave], [ReadOnly], [StatelessWorker]), call filters and request context, OpenTelemetry traces and metrics, remoting over HTTP (Shiny.Net.HttpServer server, RemoteActorSystem client), mDNS discovery of actor servers, Shiny.DocumentDb storage (SQLite, PostgreSQL, IndexedDB...), and the ActorTestHost testing kit.Other plugins' skills for the same job