dotnet-source-gen-json

Community

Generate AOT-ready JSON codecs with source-gen

AuthorIm5tu
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill streamlines the creation of System.Text.Json source generation for AOT-friendly JSON serialization, reducing runtime reflection and improving startup performance.

Core Features & Use Cases

  • Generate a JsonSerializerContext: automatically creates a {ProjectName}JsonContext class with JsonSerializable types.
  • ASP.NET Core integration: configures HttpJsonOptions to use the generated context for type resolution.
  • Reduce reflection overhead: enables compile-time generation of serialization code for faster startup.

Quick Start

  • Run the dotnet-json-polymorphic skill to prepare polymorphic types for source generation.
  • Identify the target project (ASP.NET Core or library) and ensure .NET 8+ is installed.
  • Allow the skill to create {ProjectName}JsonContext.cs and update Program.cs to hook MyApiJsonContext.Default into the JSON options.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dotnet-source-gen-json
Download link: https://github.com/Im5tu/claude/archive/main.zip#dotnet-source-gen-json

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.