agentleFS
ruokeeruokee/ruokee-agent-kit/skills/msgspec/SKILL.md

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

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    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.

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
  1. Distinctive:

    Use this Skill primarily to define msgspec Structs.

    line 10
  2. Distinctive:

    When choosing between msgspec, Pydantic, and dataclasses, read comparison, often alongside best-practices.

    line 25
  3. Distinctive:

    When terminology is unclear or inconsistent, read the glossary.

    line 29
  4. Very specific:

    Treat UNSET as distinct from None.

    line 34
  5. Distinctive:

    Use hooks only for types msgspec does not support natively.

    line 35
  6. Distinctive:

    Check optional dependencies before using YAML or TOML.

    line 36
  7. Distinctive:

    Use the official benchmark method and workload when making performance comparisons.

    line 38

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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, and from_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 Struct construction from typed decoding or conversion. Type and Meta constraints apply during decoding and conversion, while direct construction only runs __post_init__.
  • Treat UNSET as distinct from None. An UNSET field is omitted during encoding; None is 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.