mutagen-reference
Mutagen Reference
Overview
This skill provides offline lookup of record-type schemas for Skyrim plugins: for any record type, the fields it has, each field's type and cardinality, whether each field is writable, the legal values of an enum field, and the arms a polymorphic field can take. It is a reference-lookup skill: it carries no procedure, write action, or routing — just a single lookup, what is the shape of this record type? (papyrus-reference is the sibling that does the same for Papyrus function signatures.)
The reference is generated by construction by reflecting over the game's record library (Mutagen) and ships in this skill's references/ tree — so the set of record types it knows is the set the library models, not a hand-maintained subset. That property is what makes the bundled-or-warn fallback trustworthy (below).
It serves both reading and writing. Consult the schema to understand a record you're about to read (what fields exist), and — equally — to compose a legal change before a write: is the field writable? what type must the value be? what enum values or polymorphic arms are legal? Schema, not instance: "what fields does ARMO have and which are editable" is this skill; "what is the armor rating of this steel armor in this plugin" is a record read laid against this schema, not a schema lookup.
First step
When you need the shape of a record type — to answer a question about it, or to compose a read or write — open the index at references/index.jsonl. It is JSONL (one entry per line) and maps every type's name and xEdit signature to the shard file and line where its schema block lives. The index is grep-friendly: a "name":"Armor" or "sig":"ARMO" scan narrows in one step.
Do not bulk-load the index or a shard. Grep the index for the one matching line, then read the single schema line it points to — each block is exactly one line, so the read is one line. Both reads are tiny; whole-loading defeats the token economics and, worse, invites answering from a stale memory of the file instead of ground truth (see "Always fetch fresh").
Lookup procedure
- Identify the record type. From the user's words or the task: a type name (
Armor,MagicEffect), an xEdit signature (ARMO,MGEF), or a record you're reading or patching. Modders usually think in signatures; the library names types in full words — and the two often differ (ALCHisIngestible,ENCHisObjectEffect,CLFMisColorRecord). The index carries both, so either resolves.