shiny-reflector

Generate C# source code for AOT-compliant reflection and property access.

4|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/shinyorg/skills --skill shiny-reflector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shiny-reflector
Source: https://github.com/shinyorg/skills/tree/main/skills/shiny-reflector
Command: npx skills add https://github.com/shinyorg/skills --skill shiny-reflector

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a high-performance, AOT-compliant alternative to traditional .NET reflection, eliminating runtime overhead by using C# source generators.

Core Features & Use Cases

  • Source-Generated Reflection: Generate reflection code at compile time for faster, zero-allocation property access.
  • Assembly Info Generation: Automatically create static classes with build constants from project properties.
  • JSON Serialization: Integrate reflection-free JSON serialization using ReflectorJsonConverter.
  • Use Case: Integrate Shiny Reflector into your .NET application to significantly speed up property access and serialization, especially in performance-critical scenarios or when targeting AOT compilation.

Quick Start

Add the Shiny.Reflector NuGet package to your project and mark your classes with the [Reflector] attribute.

Frequently Asked Questions about shiny-reflector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve .NET reflection performance for property access?

You can improve .NET reflection performance by using C# source generators to generate compile-time code. This approach eliminates traditional runtime reflection overhead, providing high-performance, zero-allocation property access for .NET applications.

What is source-generated reflection and how does it work for AOT compilation?

Source-generated reflection is a technique that uses C# source generators to produce static reflection code at compile time. It works for AOT compilation by replacing dynamic runtime reflection with pre-generated, compile-time code, ensuring AOT compatibility and faster execution.

How do I implement reflection-free JSON serialization in .NET?

To implement reflection-free JSON serialization in .NET, integrate ReflectorJsonConverter into your application. This uses source-generated property access to serialize objects dynamically without incurring traditional runtime reflection overhead.

Can I use source generators to generate assembly info and build constants?

Yes, you can use source generators to generate assembly info by automatically creating static classes. These classes are populated with build constants derived directly from your project properties at compile time.

Does traditional .NET reflection work with AOT compilation?

Traditional .NET reflection often encounters limitations and overhead with AOT compilation because it relies on dynamic runtime metadata. Replacing it with compile-time, source-generated reflection code ensures AOT compliance and eliminates runtime overhead.

What is the best way to set up source-generated property access in a .NET project?

The best way to set up source-generated property access is to add the Shiny.Reflector NuGet package to your project and mark your target classes with the [Reflector] attribute, enabling compile-time code generation for high-performance property manipulation.