plugins/shiny-extensions/skills/shiny-stores/SKILL.md
Generate and configure Shiny Stores for .NET - cross-platform key/value stores with persistent service binding for mobile, desktop, and Blazor WebAssembly
npx skillsauth add shinyorg/skills shiny-storesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in Shiny Extensions Stores, a .NET library providing cross-platform key/value store abstraction with persistent service binding.
Invoke this skill when the user wants to:
INotifyPropertyChanged objects to persistent storageDocumentation: https://shinylib.net/extensions/stores/
Repository: https://github.com/shinyorg/Shiny.Extensions
Packages: Shiny.Extensions.Stores, Shiny.Extensions.Stores.Web
| Alias | Platform | Implementation |
|-------|----------|---------------|
| "memory" | All | In-memory dictionary |
| "settings" | Android | SharedPreferences |
| "settings" | iOS/macOS | NSUserDefaults |
| "settings" | Windows | ApplicationData.LocalSettings |
| "settings" | Blazor | localStorage |
| "secure" | Android | EncryptedSharedPreferences |
| "secure" | iOS/macOS | Keychain |
| "session" | Blazor | sessionStorage |
// Mobile/Desktop - registers memory, settings, and secure stores
services.AddShinyStores();
// Blazor WebAssembly - adds localStorage and sessionStorage
services.AddShinyWebAssemblyStores();
// Via IKeyValueStoreFactory
public class MyService(IKeyValueStoreFactory storeFactory)
{
public void SaveSetting(string key, string value)
{
var store = storeFactory.GetStore("settings");
store.Set(key, value);
}
public T GetSetting<T>(string key, T defaultValue = default)
{
var store = storeFactory.DefaultStore;
return store.Get<T>(key, defaultValue);
}
}
Bind INotifyPropertyChanged objects to a store so property changes are automatically persisted:
// Register a persistent service
services.AddPersistentService<AppSettings>(); // Uses default store
services.AddPersistentService<SecureSettings>("secure"); // Uses secure store
// The class
public class AppSettings : INotifyPropertyChanged
{
string theme = "light";
public string Theme
{
get => theme;
set { theme = value; OnPropertyChanged(); }
}
// ... INotifyPropertyChanged implementation
}
You can also target a specific store with the attribute:
[ObjectStoreBinder("secure")]
public class SecureSettings : INotifyPropertyChanged
{
// Properties are automatically persisted to the secure store
}
store.Get<T>(key, defaultValue); // Get with default
store.GetRequired<T>(key); // Throws if not found
store.SetOrRemove(key, value); // Removes if value is null
store.SetDefault<T>(key, value); // Only sets if key doesn't exist
store.IncrementValue(key); // Thread-safe integer increment
AddShinyStores() for mobile/desktop, AddShinyWebAssemblyStores() for BlazorAddPersistentService<T>() for auto-persisting settings classesINotifyPropertyChanged for persistent servicesAddPersistentService<T>()"secure" store alias for sensitive data (tokens, credentials)[Reflector] and make them partial to bypass reflection for faster bindingdevelopment
Guide for generating code that uses Shiny.Data.Sync for reliable, background-capable bidirectional JSON sync over HTTP on iOS, Android, Windows, Linux, macOS, and Blazor WASM
devops
Guide for implementing push notifications in .NET MAUI apps using Shiny.Push (native FCM/APNs) and Shiny.Push.AzureNotificationHubs
tools
Cross-platform local notification management for .NET MAUI apps using Shiny, supporting scheduled, repeating, and geofence-triggered notifications with channels, badges, and interactive actions.
tools
GPS tracking, geofence monitoring, and motion activity recognition for .NET MAUI, iOS, and Android using Shiny.Locations