serialization · wshaddix — Claude Code skill: what it does, how to install
Guides your assistant on selecting and configuring .NET serialization formats, focusing on Native AOT, source generators, Protobuf, and MessagePack.
npx skills add wshaddix/dotnet-skills --skill serialization -a claude-codeWhat serialization does
This skill equips your coding agent with decision guidelines and code structures for modern .NET serialization. It guides the choice between text and binary formats based on payload size, network throughput, and client requirements.
The skill covers JsonSerializerContext declarations, polymorphic type mapping, ASP.NET Core integration, and Google.Protobuf schemas. It also includes explicit field-numbering conventions to prevent contract breakages across distributed updates.
Newtonsoft.Json relies on runtime reflection and breaks under Native AOT. This skill keeps codebases strictly aligned with compile-time source generation.
What it helps with
- configure System.Text.Json source generators for Native AOT
- design Protobuf messages with safe field versioning rules
- register custom JsonSerializerContext into ASP.NET Core APIs
- replace reflection-based serializers with compile-time code generation
Example prompts for the agent
- Set up a source-generated JsonSerializerContext for Order records with polymorphic types
- Draft a proto3 schema for order items while reserving deleted field numbers
- Configure ASP.NET Core Minimal APIs to use source generators instead of reflection
How to install serialization
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill serialization -a claude-code2Manually: put the files in place
~/.claude/skills/serialization/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/serialization/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill serialization -a codex2Manually: put the files in place
.agents/skills/serialization/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill serialization -a cursor2Manually: put the files in place
.cursor/skills/serialization/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshaddix/dotnet-skills serialization2Manually: put the files in place
.github/skills/serialization/SKILL.md1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill serialization -a gemini-cli2Platform CLI
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/serializationManually: put the files in place
.devin/skills/serialization/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill serialization -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about serialization
How to install serialization in Claude Code?
Run npx skills add wshaddix/dotnet-skills --skill serialization -a claude-code in your terminal. This writes the configuration into ~/.claude/skills/serialization/SKILL.md.
What does the serialization skill do?
It teaches AI agents how to write high-throughput serialization code in .NET using source generators, Protobuf, and MessagePack.
Why avoid Newtonsoft.Json for Native AOT apps?
Newtonsoft.Json relies on runtime reflection, which is incompatible with Native AOT trimming. It also embeds type structures directly into payloads, creating versioning risks.
Similar skills
All skills for Backend and APIs →serialization by other authors comes first.