roblox-datastore-persistence
Skill5 starsChanged 5 months agoMITView on GitHub
Design, implement, and review Roblox DataStore persistence. Use for save/load schemas, migrations, autosave, retries, player leave saves, server shutdown saves, rollback-safe state, profile locking, and data-loss debugging.
In this repository39 other files it gives its agents.
- handoffSkill
- roblox-admin-tools-observabilitySkill
- roblox-analytics-instrumentationSkill
- roblox-animation-audio-feedbackSkill
- roblox-asset-pipelineSkill
- roblox-code-maintenance-refactorSkill
- roblox-combat-systemsSkill
- roblox-community-opsSkill
- roblox-creator-store-security-auditSkill
- roblox-debugging-bugfixSkill
- roblox-economy-balancingSkill
- roblox-game-development-lifecycleSkill
- roblox-game-ideasSkill
- roblox-game-uxSkill
- roblox-genre-patternsSkill
- roblox-growth-marketingSkill
- roblox-liveops-roadmapSkill
- roblox-localization-accessibilitySkill
- roblox-luau-architectureSkill
- roblox-mobile-playtestSkill
- roblox-monetization-optimizationSkill
- roblox-performance-optimizationSkill
- roblox-playtest-qaSkill
- roblox-policy-complianceSkill
- roblox-publishing-discoverySkill
- roblox-quest-progression-systemsSkill
- roblox-release-operationsSkill
- roblox-retention-monetizationSkill
- roblox-security-economySkill
- roblox-social-systemsSkill
- roblox-studio-workflowSkill
- roblox-to-issuesSkill
- roblox-to-prdSkill
- roblox-triageSkill
- roblox-ui-implementationSkill
- roblox-world-level-designSkill
- setup-roblox-skillsSkill
- write-a-skillSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Write migrations that can handle old, missing, or partial data.
- Distinctive: line 19
Keep transient match/session state separate from permanent profile state.
- Distinctive: line 24
Keep an in-memory authoritative profile on the server.
- Very specific: line 43
Use script_grep for DataStore, UpdateAsync, SetAsync, GetAsync, profile, save, and load.
- Very specific: line 44
Read all persistence scripts with script_read.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Roblox DataStore Persistence
Goal
Save player progress reliably without corrupting or losing valuable state.
Schema Rules
- Store compact canonical state, not UI state.
- Include
schemaVersion. - Keep defaults centralized.
- Validate loaded data before using it.
- Write migrations that can handle old, missing, or partial data.
- Keep transient match/session state separate from permanent profile state.
Save Strategy
- Load once when the player joins.
- Keep an in-memory authoritative profile on the server.
- Save on meaningful intervals and player leave.
- Save on server shutdown with a bounded timeout.
- Debounce rapid save requests.
- Retry transient failures with backoff.
- Mark dirty profiles and avoid unnecessary writes.
Valuable State
Treat these carefully:
- Currency and premium currency.
- Inventory, pets, cosmetics, boosts, quest progress, achievements.
- Purchases and receipt-granted items.
- Trading or gifting results.
- Daily streaks and time-gated rewards.
MCP Review Workflow
- Use
script_grepforDataStore,UpdateAsync,SetAsync,GetAsync, profile, save, and load. - Read all persistence scripts with
script_read. - Map load, mutation, save, and shutdown flow.
- Patch with
multi_edit. - Playtest join/change/leave-like paths where possible and check
get_console_output.
Output
Return:
- Profile schema.
- Save/load flow.
- Migration plan.
- Failure modes handled.
- Manual tests still needed in published or multi-server conditions.
Next
Harden the save path against exploits with roblox-security-economy, then verify saves survive rejoin and shutdown with roblox-playtest-qa.
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.

