rbx-data-schema
Skill0 starsChanged 3 months agoMITView on GitHub
Save schemas that survive years of updates — versioned plain-table templates with a forward-only migration chain, so no player's save ever breaks on a new build. Use when the user says "design the save data", "add a field to saves", "rename a stat", "migrate old data", or when veteran players error on join while fresh accounts work fine. Do not use for the load/save/locking machinery — load rbx-data-profilestore — or for restoring data already lost — load rbx-data-recovery instead.
In this repository253 other files it gives its agents.
- rbx-abtestSkill
- rbx-accessibilitySkill
- rbx-analytics-eventsSkill
- rbx-analytics-funnelsSkill
- rbx-analytics-readingSkill
- rbx-animationSkill
- rbx-anim-cutscenesSkill
- rbx-anim-npcSkill
- rbx-anim-proceduralSkill
- rbx-anim-rigsSkill
- rbx-anim-tweenSkill
- rbx-architectureSkill
- rbx-assets-audioSkill
- rbx-assets-id-policySkill
- rbx-assets-sanitizeSkill
- rbx-assetsSkill
- rbx-assets-toolboxSkill
- rbx-assets-webSkill
- rbx-audio-feedback-mapSkill
- rbx-audio-mixingSkill
- rbx-audio-musicSkill
- rbx-audio-sfxSkill
- rbx-audioSkill
- rbx-audio-spatialSkill
- rbx-badges-groupsSkill
- rbx-build-compositionSkill
- rbx-build-detailingSkill
- rbx-build-greyboxSkill
- rbx-buildingSkill
- rbx-build-interiorsSkill
- rbx-build-kitbashSkill
- rbx-build-landscapeSkill
- rbx-build-propsSkill
- rbx-build-scaleSkill
- rbx-build-structuresSkill
- rbx-camera-controllersSkill
- rbx-camera-cutsceneSkill
- rbx-camera-shakeSkill
- rbx-chat-moderationSkill
- rbx-ciSkill
- rbx-combat-abilitiesSkill
- rbx-combat-hitregSkill
- rbx-combat-meleeSkill
- rbx-combat-rangedSkill
- rbx-combatSkill
- rbx-combat-statusSkill
- rbx-complianceSkill
- rbx-comprehendSkill
- rbx-controlsSkill
- rbx-data-crossserverSkill
- rbx-data-profilestoreSkill
- rbx-data-recoverySkill
- rbx-data-sessionlockSkill
- rbx-dataSkill
- rbx-design-difficultySkill
- rbx-design-loopSkill
- rbx-design-sheetSkill
- rbx-design-socialSkill
- rbx-economy-currenciesSkill
- rbx-economy-gachaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 85
Read: the game's projects.md block — current schema version, field map, and any manual steps pending: around data.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
rbx-data-schema
Laws
- JSON-safe or it doesn't exist. Numbers, strings, booleans, tables with all-string or
all-sequential-integer keys. No Instances, Vector3/CFrame/Color3, mixed-key tables, cycles,
or NaN — serialize to ids (
"IronSword"), component arrays ({x, y, z}), and hex strings. versionfrom day one. Integer, starts at 1, lives at the schema root. A schema without it cannot be migrated, only guessed at.- Migrations are a forward-only chain.
migrations[n]transforms version n → n+1; a while loop walks the save from its stored version to CURRENT_VERSION on every load. A shipped migration is frozen forever — new changes get a new entry, never an edit to an old one. - Reconcile handles additions; migrations handle everything else. A brand-new field with a
default belongs in the template (ProfileStore
Reconcile()deep-fills it). Renames, moves, splits, and type changes need a migration — Reconcile cannot knowMoneybecameCash. - Never persist what you can recompute. Leaderstats, stat totals, equipped-bonus caches: derive on load. Every derived field saved is a future desync bug.
- No nil sentinels. DataStore drops nil keys on serialize; "unset" becomes
"indistinguishable from never existed". Use
0,"",false.
Passes
- Inventory the state. List every value the game must remember across sessions; strike
everything derivable. Sort survivors into groups: Currency, Progression, Inventory, Settings,
Statistics. Read the game's block in
projects.mdfirst — extend the shipped schema, never fork it. - Shape the template. One nested table per group. Non-stackable inventory items are
{ id = "IronSword", uuid = "...", meta = {} }— the uuid is what trading and rollback logs key on. Stackables are{ id = "Potion", count = 3 }. Write the chain. One ModuleScript,
DataMigrations, CONFIG-top with CURRENT_VERSION:migrations[1] = function(data) -- v1 → v2: Money split into Cash + Gems data.Cash, data.Gems, data.Money = data.Money or 0, 0, nil return data endThe runner:
while v < CURRENT_VERSION do data = migrations[v](data); v += 1 end, then stampdata.version = CURRENT_VERSION. If the stored version is newer than the code (old server after an update),warnand do not touch the data.- Wire the order. Load → migrate →
Reconcile()→ use. Migrate-on-load only; no bulk rewrite jobs over the whole store — untouched saves migrate whenever their player returns. - Prove it. In
execute_luau, fabricate a v1 save, run the chain, assert the final shape field-by-field; then a fresh template through the same path (must no-op). Readget_console_output— a silent migration failure is a slow-motion wipe.
Performance budget
Chain runs once per player load: a 4-version walk over a 100-field save ≤ 5 ms. Save tables ≤ 100 KB typical, 4 MB hard cap — past ~500 KB, split inventory to its own key before it becomes an incident. One migration module per game, not per system.
Load with
rbx-data-profilestore — don't ask, include it: the template plugs into its session flow.
rbx-data-sessionlock when trading or teleports touch these fields; rbx-data-recovery the
moment a bad migration has already shipped; rbx-luau-types for typing the template.
AI-tells
- ☐ No
versionfield, or version stored as a string ("1.2.3") - ☐ Rename done by editing the template only — Reconcile silently zeroes every veteran
- ☐ Migration chain with gaps (v2 → v4) or an edited already-shipped migration
- ☐ Instances, Vector3s, or CFrames assigned straight into the save table
- ☐ Derived values persisted (leaderstats mirrors, stat totals)
- ☐ Bulk store-wide rewrite job instead of migrate-on-load
- ☐
nilused to mean "unset" - ☐ Inventory items without uuids in a game that has, or will have, trading
Memory
Read: the game's projects.md block — current schema version, field map, and any
manual steps pending: around data. Write: the shipped template shape and new CURRENT_VERSION
into that block the moment a migration ships, one line per migration ("v3→v4: Wins →
Statistics.Wins, 2026-08-23"); the reusable DataMigrations runner into module-library.md.
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.

