gum-file-format

Explains Gum XML file structure and enum-to-int mappings for safe hand-editing.

614|78|Updated Mar 11, 2015
One-click install
npx skills add https://github.com/vchelaru/Gum --skill gum-file-format
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gum-file-format
Source: https://github.com/vchelaru/Gum/tree/main/gum-skills/gum-file-format
Command: npx skills add https://github.com/vchelaru/Gum --skill gum-file-format

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hand-editing Gum's XML project files (.gumx, .gusx, .gucx, .gutx, .behx) is risky because enum values are stored as integers, wrong element names are silently dropped by XmlSerializer, and two different variable shapes exist on disk. This Skill provides the mappings and structural rules needed to read and safely edit these files without silently breaking the UI.

Core Features & Use Cases

  • Enum-to-int reference tables: Complete mappings for WidthUnits/HeightUnits (DimensionUnitType), XUnits/YUnits (PositionUnitType), XOrigin/YOrigin, and ChildrenLayout so raw integer values in XML become meaningful.
  • File structure guide: Explains root elements per extension, qualified InstanceName.Property variables, instance parenting via the Parent variable, and the two on-disk variable shapes (attribute form vs element form).
  • Silent-failure awareness: Documents how XmlSerializer drops unrecognized elements without errors and directs validation through gumcli check after every hand edit.
  • Use Case: You open a .gusx screen file and see WidthUnits set to 2. Using this Skill you identify it as RelativeToParent, adjust the value correctly, and run gumcli check to confirm the edit did not corrupt the file.

Quick Start

Ask the AI to explain what the WidthUnits and XOrigin integer values mean in your .gucx component file and whether your hand edit is safe.

Frequently Asked Questions about gum-file-format

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read WidthUnits integer values in a Gum XML file?

WidthUnits and HeightUnits use the DimensionUnitType enum stored as an integer: 0 is Absolute, 1 is PercentageOfParent, 2 is RelativeToParent, 4 is RelativeToChildren, and so on up to 10. The Type attribute holds the enum name while the Value element holds the int.

What do the Gum file extensions .gusx, .gucx, and .gutx mean?

Each extension maps to a root XML element: .gumx is the project file (GumProjectSave), .gusx is a screen (ScreenSave), .gucx is a component (ComponentSave), .gutx is a standard element (StandardElementSave), and .behx is a behavior (BehaviorSave).

Why does my hand-edited Gum file load with missing content?

XmlSerializer silently ignores XML elements it does not recognize, so typos like <States> instead of <State> or <InstanceSave> instead of <Instance> load as empty elements with no error. Run gumcli check after every hand edit to catch this.

How do I nest one instance inside another in a Gum component file?

Give the child instance a Parent variable whose value is the parent instance's name, for example Title.Parent set to MenuStack. Without this, all instances are siblings and a stacking container has nothing to lay out.

Is XUnits in the XML file the same as GeneralUnitType in C# code?

No. On disk, XUnits and YUnits use the PositionUnitType enum, which is different from the GeneralUnitType enum used in C# code. Do not copy integer values between the two enums.