Skip to content

Schema-first serialization guidance for .NET: picking Protobuf, MessagePack, or System.Text.Json source generators over reflection-based options.

CCM score
65 of 100
skills.sh installs
630
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers format selection for REST APIs, gRPC, actor messaging, event sourcing, caching, and logging, with a recommendation per use case
  • Compares schema-based and reflection-based formats across versioning, performance, AOT compatibility, and wire compatibility
  • Explains setup and versioning rules for Protobuf field numbers and MessagePack [Key] attributes, including which changes break old readers
  • Designed for teams migrating from Newtonsoft.Json or building AOT-compatible .NET services that cross process boundaries

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill serialization -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Serialization in .NET

When to Use This Skill

Use this skill when:

  • Choosing a serialization format for APIs, messaging, or persistence
  • Migrating from Newtonsoft.Json to System.Text.Json
  • Implementing AOT-compatible serialization
  • Designing wire formats for distributed systems
  • Optimizing serialization performance

Schema-Based vs Reflection-Based

AspectSchema-BasedReflection-Based
ExamplesProtobuf, MessagePack, System.Text.Json (source gen)Newtonsoft.Json, BinaryFormatter
Type info in payloadNo (external schema)Yes (type names embedded)
VersioningExplicit field numbers/namesImplicit (type structure)
PerformanceFast (no reflection)Slower (runtime reflection)
AOT compatibleYesNo
Wire compatibilityExcellentPoor

Recommendation: Use schema-based serialization for anything that crosses process boundaries.


Format Recommendations

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
.NET & C#, Backend & APIs
First seen
Jun 3, 2026

Questions

What does the serialization skill for .NET do?

It helps choose the right serialization format for .NET applications, preferring schema-based formats like Protobuf and MessagePack over reflection-based ones like Newtonsoft.Json. It also covers using System.Text.Json with AOT source generators for JSON scenarios.

How do I install the serialization skill?

Run npx -y skills add aaronontheweb/dotnet-skills --skill serialization -y in a project. Once installed, the agent can guide format choices and System.Text.Json source generator setup for your .NET code.

Where does the serialization skill rank in the .NET & C# category?

It ranks in the top 100 of the .NET & C# category on Claude Marketplaces. It is listed alongside dotnet-backend-patterns, dotnet-best-practices, nuget-manager and microsoft-code-reference.

When should I use this skill instead of Newtonsoft.Json?

Use it when choosing a format for APIs, messaging or persistence, or when migrating from Newtonsoft.Json to System.Text.Json. It also helps with AOT-compatible serialization and designing wire formats for distributed systems.

More from aaronontheweb/dotnet-skills

All 34

Similar to Serialization

More .NET & C#