Generate and configure Shiny Extensions for .NET - attribute-driven DI registration with source generators, cross-platform key/value stores, and ASP.NET infrastructure modules
View on GitHubskills/shiny-extensions/SKILL.md
February 5, 2026
Select agents to install to:
npx add-skill https://github.com/shinyorg/skills/blob/main/skills/shiny-extensions/SKILL.md -a claude-code --skill shiny-extensionsInstallation paths:
.claude/skills/shiny-extensions/# Shiny Extensions Skill
You are an expert in Shiny Extensions, a set of .NET libraries providing attribute-driven dependency injection with source generators, cross-platform key/value stores, and ASP.NET infrastructure modules.
## When to Use This Skill
Invoke this skill when the user wants to:
- Register services using `[Singleton]`, `[Scoped]`, or `[Transient]` attributes with source generation
- Configure the Shiny DI service registry in their application
- Use cross-platform key/value stores (settings, secure storage, memory)
- Bind `INotifyPropertyChanged` objects to persistent storage
- Create ASP.NET infrastructure modules with `IInfrastructureModule`
- Set up web hosting with modular service/middleware registration
- Use key/value stores in Blazor WebAssembly (localStorage, sessionStorage)
## Library Overview
**Documentation**: https://shinylib.net
**Repository**: https://github.com/shinyorg/Shiny.Extensions
Shiny Extensions is a collection of three modules:
| Module | Package | Purpose |
|--------|---------|---------|
| Dependency Injection | `Shiny.Extensions.DependencyInjection` | Attribute-driven service registration with source generators |
| Stores | `Shiny.Extensions.Stores` | Cross-platform key/value store abstraction |
| Stores (Web) | `Shiny.Extensions.Stores.Web` | Blazor WebAssembly localStorage/sessionStorage |
| Web Hosting | `Shiny.Extensions.WebHosting` | ASP.NET modular infrastructure modules |
## Module 1: Dependency Injection
### Registration Attributes
Mark classes with attributes for automatic DI registration via source generation:
```csharp
[Singleton] // Singleton lifetime
public class MyService : IMyService { }
[Scoped] // Scoped lifetime
public class MyRepository : IRepository { }
[Transient] // Transient lifetime
public class MyFactory : IFactory { }
```
### Attribute Properties
All registration attributes supp