Skip to content
Skills Library
Programming · Building & coding

data-model-guide

/data-model-guide

Use when designing a central in-memory data model / object database for a tool, editor, or engine: typed objects with properties, stable cross-references and sub-object ownership, change notification, undo/redo, and serialization. Triggers on prompts about a runtime object/property schema, referencing objects by stable id/GUID, observing/notifying changes, transactional edits and undo history, save/load with versioning/migration, or copy-on-write snapshots, even when the user doesn't name a specific model.

Repository
platform ↗
Licence
MIT
Last repository change
08.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when designing a central in-memory data model / object database for a tool, editor, or engine: typed objects with properties, stable cross-references and sub-object ownership, change notification, undo/redo, and serialization. Triggers on prompts about a runtime object/property schema, referencing objects by stable id/GUID, observing/notifying changes, transactional edits and undo history, save/load with versioning/migration, or copy-on-write snapshots, even when the user doesn't name a specific model.

Original author description

Use when designing a central in-memory data model / object database for a tool, editor, or engine: typed objects with properties, stable cross-references and sub-object ownership, change notification, undo/redo, and serialization. Triggers on prompts about a runtime object/property schema, referencing objects by stable id/GUID, observing/notifying changes, transactional edits and undo history, save/load with versioning/migration, or copy-on-write snapshots, even when the user doesn't name a specific model.

How it works

  1. Essentials
  2. Object model
  3. References & ownership
  4. Prototypes & overrides
  5. Mutation
  6. Persistence
  7. Gotchas
  8. Progressive Disclosure
Original SKILL.md headings · 58 lines, 548 words
SKILL.md preview
---
name: data-model-guide
description: "Use when designing a central in-memory data model / object database for a tool, editor, or engine: typed objects with properties, stable cross-references and sub-object ownership, change notification, undo/redo, and serialization. Triggers on prompts about a runtime object/property schema, referencing objects by stable id/GUID, observing/notifying changes, transactional edits and undo history, save/load with versioning/migration, or copy-on-write snapshots, even when the user doesn't name a specific model."
---

# Data-Model Guidelines

Keep editor and tool state in one typed object model with stable identity, explicit ownership, and reversible changes.

## Essentials

- **One central model** - Route tool/editor state through a single typed object store, not scattered structs, see [references/object-model.md](references/object-model.md)
- **Make mutation observable** - Edits go through the model so it can notify, undo, and persist, see [references/change-notification.md](references/change-notification.md)

## Object model

- **Typed objects** - Describe each type by a runtime schema, not a hand-written C struct, see [references/object-model.md](references/object-model.md)
- **Property set per type** - bool/int/float/string/reference/sub-object/buffer/array properties, see [references/object-model.md](references/object-model.md)
- **Data-driven types** - Add a type or property at runtime without recompiling, see [references/object-model.md](references/object-model.md)
- **Separate metadata from instances** - Type/schema lives once; instance data is just values, see [references/object-model.md](references/object-model.md)

## References & ownership

- **Strong = owning sub-object** - A parent owns its sub-objects; deleting the parent deletes them, see [references/references-and-ownership.md](references/references-and-ownership.md)
- **Local vs global ids** - Local ids inside a file, GUIDs for cross-file/cross-session links, see [references/references-and-ownership.md](references/references-and-ownership.md)
- **Identity vs role** - A GUID names a fixed identity; a name/path names a role that late-binds: default to GUIDs, see [references/references-and-ownership.md](references/references-and-ownership.md)

## Prototypes & overrides

- **Per-property override bitmask** - One bit per property marks local-vs-inherited; sub-object sets track inherited / instantiated / removed children, see [references/prototypes.md](references/prototypes.md)

## Mutation

- **Pull vs push** - Poll a version number, or register callbacks; avoid notification storms, see [references/change-notification.md](references/change-notification.md)
- **Undo/redo** - Record inverse ops or before/after snapshots into an undo journal, see [references/undo-redo.md](references/undo-redo.md)

## Persistence

- **References serialize by id** - Persist ids/GUIDs, re-resolve on load, see [references/serialization.md](references/serialization.md)
- **Deterministic output** - Stable ordering for diff/version control; choose text vs binary, see [references/serialization.md](references/serialization.md)
- **Save changes or re-spawn from assets** - Persist member-level deltas for runtime state, asset references for content; POD serializes by default, see [references/serialization.md](references/serialization.md)
- **ABI-stable struct evolution** - Append fields at the end, add a leading `size`, never reorder/retype; semantic-version the API, see [references/serialization.md](references/serialization.md)
- **Snapshots & threading** - Publish immutable/copy-on-write versions for readers, see [references/snapshots-and-threading.md](references/snapshots-and-threading.md)

## Gotchas

- An undo entry that captured a pointer/index breaks once storage moves: capture ids and values, not addresses.
- External side effects (file writes, network) are not undoable; keep them out of the transactional journal.
- A loader that rejects unknown fields cannot open older OR newer files: migrate forward and ignore-or-preserve unknowns.
- Overriding a sub-object in an instance gives it a new id, so references to the prototype's original silently miss: resolve references through the override, don't store the new id everywhere.
- Allowing computed overrides (a property defined as an expression over the prototype's value) drags evaluation order and cycles into the data model: keep overrides concrete values.

## Progressive Disclosure

- Read [references/object-model.md](references/object-model.md) - Load when defining typed objects, property kinds, or data-driven schemas
- Read [references/references-and-ownership.md](references/references-and-ownership.md) - Load when linking objects by id, modeling ownership, or handling deletes
- Read [references/prototypes.md](references/prototypes.md) - Load when adding prefabs/templates/presets: prototype-instance inheritance, per-property overrides, override propagation
- Read [references/change-notification.md](references/change-notification.md) - Load when making edits observable, batching, or recomputing derived data
- Read [references/undo-redo.md](references/undo-redo.md) - Load when adding transactional edits, undo journals, or redo stacks
- Read [references/serialization.md](references/serialization.md) - Load when saving/loading, versioning the format, or migrating old files
- Read [references/snapshots-and-threading.md](references/snapshots-and-threading.md) - Load when giving reader threads a consistent view while writers mutate
Files in this package (12)
  • SKILL.md 5 KB
  • SOURCES.md 5 KB
  • eval-queries.json 6 KB
  • evals.json 3 KB
  • moon.yml 1 KB
  • references/change-notification.md 3 KB
  • references/object-model.md 4 KB
  • references/prototypes.md 3 KB
  • references/references-and-ownership.md 5 KB
  • references/serialization.md 6 KB
  • references/snapshots-and-threading.md 5 KB
  • references/undo-redo.md 5 KB

Versions

The database has no other skills named data-model-guide.

Database snapshot: 13.11.2026 · package version b17177df5baf (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95sui-object-model
    Deep reference for the Sui object model: ownership types, object abilities, dynamic fields, collections, versioning, transfer patterns, and derived objects. Use this skill whenever the user asks about Sui objects, object ownership (address-owned, shared, immutable, wrapped), how…
  • 95playwright-page-object-model
    Use when creating page objects or refactoring Playwright tests for better maintainability with Page Object Model patterns.
  • 100blender-errors-data
    Use when debugging Blender ReferenceError from removed objects, undo-invalidated bpy.data references, or stale ID pointers. Prevents the common crash of caching bpy.data references across undo/redo operations (references become invalid). Covers safe data access patterns, ID…
  • 100godot-save-load-systems
    Expert blueprint for save/load systems using JSON/binary serialization, PERSIST group pattern, versioning, and migration. Covers player progress, settings, game state persistence, and error recovery. Use when implementing save systems OR data persistence. Keywords save, load,…
  • 100godot-save-load-systems
    Expert blueprint for save/load systems using JSON/binary serialization, PERSIST group pattern, versioning, and migration. Covers player progress, settings, game state persistence, and error recovery. Use when implementing save systems OR data persistence. Keywords save, load,…
  • 100creatio-schema-naming
    Creatio data-model naming assistant for creating names for Creatio object schemas, object titles, object columns, field titles, lookup objects, lookup columns, Guid columns, UId references, and relation/link objects. Use when generating new Creatio schemas, metadata, migration…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.