msgspec
Skill4 starsChanged 12 days agoMITView on GitHub
Use when defining Structs, validating data, or handling serialization with msgspec, including fields and options, constraints and typed conversion, encoding and decoding, tagged unions, and custom hooks.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- litestar-org/litestar-skillstheir own version, first seen Nov 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- litestar-org/litestar-skills★ 19same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- maintain-adrSkill
- grill-meSkill
- python-engineeringSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this Skill primarily to define msgspec Structs.
- Distinctive: line 25
When choosing between msgspec, Pydantic, and dataclasses, read comparison, often alongside best-practices.
- Distinctive: line 29
When terminology is unclear or inconsistent, read the glossary.
- Very specific: line 34
Treat UNSET as distinct from None.
- Distinctive: line 35
Use hooks only for types msgspec does not support natively.
- Distinctive: line 36
Check optional dependencies before using YAML or TOML.
- Distinctive: line 38
Use the official benchmark method and workload when making performance comparisons.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
msgspec
Use this Skill primarily to define msgspec Structs. It also covers validation, conversion, encoding, decoding, and troubleshooting.
Entry conditions
Activate this Skill when a task involves defining msgspec.Struct models, validating or converting typed data, or encoding and decoding through JSON, MessagePack, YAML, or TOML. It also covers constraints, defaults, tagged unions, custom hooks, and migration from another Python data-modeling library.
Judgment order
Route to the smallest relevant document. Read only what the task requires.
- For Struct fields, defaults, renaming, inheritance, and options, read struct, often alongside supported-types and validation.
- For
Meta, constraints,ValidationError, and__post_init__, read validation, often alongside struct. - For supported annotations,
UNSET, and native or custom types, read supported-types, often alongside struct and converters. - For
enc_hook,dec_hook,convert, andfrom_attributes, read converters, often alongside supported-types and serialization. - For JSON, MessagePack, YAML, TOML, JSONL, or reusable encoders and decoders, read serialization, often alongside supported-types and converters.
- When choosing between msgspec, Pydantic, and dataclasses, read comparison, often alongside best-practices.
- For usage guidance and common mistakes, read best-practices, often alongside the relevant API document.
- For runnable end-to-end examples, read basic usage, tagged unions, and custom conversion, often alongside the matching reference document.
When terminology is unclear or inconsistent, read the glossary.
Working rules
- Distinguish direct
Structconstruction from typed decoding or conversion. Type andMetaconstraints apply during decoding and conversion, while direct construction only runs__post_init__. - Treat
UNSETas distinct fromNone. AnUNSETfield is omitted during encoding;Noneis encoded as a null value. - Use hooks only for types msgspec does not support natively.
- Check optional dependencies before using YAML or TOML.
- Reuse configured encoder and decoder instances in repeated operations.
- Use the official benchmark method and workload when making performance comparisons. Do not repeat unqualified speed ratios.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

