/shiny:shiny-notificationsfrom shiny
Cross-platform local notification management for .NET MAUI apps using Shiny, supporting scheduled, repeating, and geofence-triggered notifications with channels, badges, and interactive actions.
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.
Use this skill when the user needs to:
| Item | Value |
|---|---|
| NuGet Package | Shiny.Notifications (iOS, Mac Catalyst, Android, macOS, Windows); Shiny.Notifications.Linux (Linux) |
| Primary Namespace | Shiny.Notifications |
| Registration Namespace | Shiny (extension methods on IServiceCollection) |
| Platforms | iOS, Mac Catalyst, Android, macOS, Windows, Linux |
| Dependencies | Shiny.Core, Shiny.Geofencing (Android only - geofence-triggered notifications), Shiny.Support.Repositories |
Linux notifications ship in a separate package, Shiny.Notifications.Linux. They are delivered via the freedesktop org.freedesktop.Notifications D-Bus service (GNOME, KDE, XFCE, etc.) and support the same INotificationManager API surface as the other platforms. Scheduled notifications are tracked in-process only — there is no OS-level scheduler like BGTaskScheduler or WorkManager, so the host process must be running for a scheduled notification to fire. Scheduled and repeating notifications are checked every 30 seconds, so expect up to ~30s of lateness. IntervalTrigger.Interval repeats every interval from the Send call; IntervalTrigger.TimeOfDay is local time and fires today if that time is still ahead, otherwise the next day (or next matching DayOfWeek). Channels are exposed but only a subset of freedesktop hints (urgency, category, image) are actually honoured by most daemons. Geofence triggers and time-sensitive flags are not applicable.
Register with services.AddNotifications<TDelegate>(); from the Shiny namespace — the same call site as the other platforms.
Register the notification services in your MauiProgram.cs:
using Shiny;
// Without a delegate (fire-and-forget notifications)
services.AddNotifications();
// With a delegate to handle notification taps
services.AddNotifications<MyNotificationDelegate>();
On iOS, you can optionally pass an IosConfiguration to control authorization and presentation options:
#if IOS || MACCATALYST
services.AddNotifications<MyNotificationDelegate>(new IosConfiguration(
UNAuthorizationOptions: UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound,
PresentationOptions: UNNotificationPresentationOptions.Banner | UNNotificationPresentationOptions.Badge | UNNotificationPresentationOptions.Sound
));
#endif
When generating code that uses Shiny Notifications, follow these conventions:
Always request access before sending notifications:
var access = await notificationManager.RequestAccess();
if (access != AccessState.Available)
{
// Handle denied permission
return;
}
Use AccessRequestFlags when the notification uses triggers:
AccessRequestFlags.TimeSensitivity for scheduled or repeating notifications.AccessRequestFlags.LocationAware for geofence-triggered notifications.RequestRequiredAccess extension method that infers flags from the notification object.A Notification must have a Message set -- validation will throw otherwise.
Only one trigger type per notification -- you cannot mix ScheduleDate, RepeatInterval, and Geofence on the same notification.
Implement INotificationDelegate for handling user taps:
public class MyNotificationDelegate : INotificationDelegate
{
public async Task OnEntry(NotificationResponse response)
{
// response.Notification -- the original notification
// response.ActionIdentifier -- which action button was pressed
// response.Text -- text reply if action was TextReply type
}
}
Create channels before sending notifications that reference them:
notificationManager.AddChannel(new Channel
{
Identifier = "alerts",
Importance = ChannelImportance.High,
Sound = ChannelSound.High
});
Use the convenience Send extension for simple notifications:
await notificationManager.Send("Title", "Message body");
For platform-specific properties, use the native subclasses:
AndroidNotification and AndroidChannelAppleNotification and AppleChannelAlways inject INotificationManager via constructor injection -- never create instances directly.
Show an image with ImageUri - an https URL, a file:// URI or a local path. Never build
UNNotificationAttachments or BigPictureStyle by hand for this:
await notificationManager.Send(new Notification
{
Title = "Your order shipped",
Message = "Arriving Thursday",
ImageUri = "https://cdn.example.com/orders/1234.jpg",
ScheduleDate = DateTimeOffset.Now.AddHours(1)
});
It is downloaded/copied when Send runs (so a scheduled notification needs no network when it fires, and shows the
image as it was at send time). A failed download is logged and the notification still goes out without it. iOS/macOS
attach it (JPEG/PNG/GIF/HEIC, max 10 MB), Android shows a big picture plus large icon (it replaces UseBigTextStyle),
Windows uses it as the toast's hero image; Linux ignores it. The source file is never moved. For an image that needs
auth, download it yourself and pass the local path. For push images see the shiny-push skill.
Use CancelScope wisely when cancelling:
CancelScope.DisplayedOnly -- clears only shown notifications.CancelScope.Pending -- clears only scheduled/triggered notifications.CancelScope.All -- clears everything (default).Notification: Both Shiny.Notifications and Shiny.Push define a Notification type. If both packages are referenced in the same project, do NOT add both namespaces as global usings. Use Shiny.Notifications.Notification FQN or a file-level using Shiny.Notifications; directive to disambiguate.AccessState result before attempting to send notifications.Channel.Default) always exists with Identifier = "Notifications" and ChannelImportance.Low.InvalidOperationException.ChannelAction.RequiresUnlock = true (or ChannelAction.Create(id, title, type, requiresUnlock: true)) for any action with a real-world effect ("Open Garage", "Disarm") - otherwise it runs straight from the lock screen. It combines with any ChannelActionType; do not use OpenApp just to force an unlock. Honoured on iOS/Mac Catalyst/macOS and Android 12+ (API 31); older Android runs the action without prompting, and Windows/Linux ignore it.BadgeCount only on immediate notifications (not triggered ones) -- validation will fail otherwise.IntervalTrigger with either Interval (raw TimeSpan) or TimeOfDay (daily/weekly recurring), never both.Center and Radius are both set on GeofenceTrigger.notification for the default small icon, or set SmallIconResourceName on AndroidNotification.RequestRequiredAccess extension method to automatically determine needed permission flags from a Notification object.Payload dictionary on Notification to pass custom data that you can read back in your INotificationDelegate.OnEntry.The optional Shiny.Notifications.Extensions.AI package exposes INotificationManager as reminder-framed Microsoft.Extensions.AI tool functions (AIFunctions) for LLM agents. You opt-in exactly which operations the model can see — a read/write allow-list you control on behalf of the agent (not an OS permission prompt; the platform notification permission must already be granted). Read-only by default; write is opt-in. AOT-compatible (hand-built schemas, JsonNode results — no reflection).
using Shiny.Notifications;
using Shiny.Notifications.Extensions.AI;
builder.Services.AddNotifications(); // registers INotificationManager
builder.Services.AddNotificationAITools(tools => tools
.AddReminders(ReminderAICapabilities.ReadWrite, channel: "reminders") // channel is optional
);
// resolve the bundle and pass the tools to any IChatClient
var tools = sp.GetRequiredService<NotificationAITools>().Tools;
var response = await chatClient.GetResponseAsync(
messages,
new ChatOptions { Tools = [.. tools] }
);
Key types:
AddNotificationAITools(Action<INotificationAIToolBuilder>) — DI extension; throws if nothing is added.INotificationAIToolBuilder — AddReminders(ReminderAICapabilities, string? channel = null). The channel (if supplied) must already be registered via AddChannel.ReminderAICapabilities [Flags] — None, Read (default), Write, ReadWrite.NotificationAITools — resolve from DI; .Tools is IReadOnlyList<AITool>.Generated tools (only for opted-in capabilities): list_reminders (pending/scheduled), create_reminder (omit both scheduleFor/repeatDailyAt to send now, scheduleFor for a one-time reminder, repeatDailyAt "HH:mm" for a daily one), cancel_reminder (by id). scheduleFor and repeatDailyAt are mutually exclusive; dates are ISO-8601.
The AI tools assume permissions are already granted — they do not trigger the platform permission UI (needs a foreground activity). Call
INotificationManager.RequestAccess(...)from the app before invoking the agent.
Combine with the app's own functions:
Shiny.AppFunctions.Extensions.AI(AddAppFunctionAITools, see the shiny-appfunctions skill) exposes the[AppFunction]s Siri and Gemini call as tools in the same*AIToolsbundle shape - concatenate the.Toolslists into oneChatOptions.Tools.
What 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