agentleFS
blushneybusiness-glitchblushneybusiness-glitch/roblox-omniskills/skills/rbx-data-recovery/SKILL.md

rbx-data-recovery

Skill0 starsChanged 3 months agoMITView on GitHub

Getting a player's save back after the worst has happened — DataStore's built-in 30-day version history, a rollback procedure that doesn't fight session locks, and the incident playbook for "everyone lost their data" days. Use when the user says "restore a player's data", "roll back a save", "data got wiped", "a bad update corrupted saves", or when players are reporting losses right now and the write path is still live. Do not use for preventing the race in the first place — load rbx-data-sessionlock instead — or for schema fixes going forward — load rbx-data-schema.

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
  1. Very specific:

    Every SetAsync / UpdateAsync / RemoveAsync on a standard DataStore writes a new *version*.

    line 28

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

rbx-data-recovery

When to load

Any loss report ("my pets are gone"), any bad deploy that touched saves, before any risky migration ships, and during rbx-qa-gauntlet to confirm a restore path exists at all.

What Roblox already keeps

Every SetAsync / UpdateAsync / RemoveAsync on a standard DataStore writes a new version; versions are retained for 30 days. Even RemoveAsync only writes a deletion tombstone — the prior versions survive the full window. This is your backup system; you did not have to build it, you only have to know it exists and act inside 30 days.

  • ListVersionsAsync(key, sortDirection, minDate, maxDate, pageSize) → pages of {Version, CreatedTime, IsDeleted}. Budget: 5 + 2 × players per minute — a listing budget, not a sweeping one.
  • GetVersionAsync(key, versionId) → that snapshot's value.
  • Restoring = reading the good version and writing it back with SetAsync. That itself creates a new version, so a botched restore is reversible for another 30 days.

Rollback procedure (one player)

  1. Pin the last-good timestamp from the player's report plus your server logs ("had 12,400 gems before the 14:00 update").
  2. ListVersionsAsync(key, Enum.SortDirection.Descending, nil, lastGoodUnixMs) — the first entry at or before the timestamp is your candidate.
  3. GetVersionAsync, then validate before writing: run the shape through the current rbx-data-schema migration chain and eyeball the disputed fields. Print the diff.
  4. Take the lock out of the fight: the player must be offline, or you kick them, before the write — a live session's next 30 s auto-save erases your restore (rbx-data-sessionlock). With ProfileStore, the clean route is applying the restore through a locked session or a GlobalUpdate, not a raw side-write.
  5. SetAsync the restored table, have the player rejoin, confirm in-game, log the incident.

Anything the player spent or traded away after last-good comes back with the restore: diff the two versions and subtract completed trades/purchases (uuids from the schema make this mechanical), or you have converted a loss incident into a dupe incident.

Incident response ("everyone is losing data")

Order is the playbook; skipping step 1 multiplies every later step.

  1. Stop the bleeding. Disable the broken write path — feature flag off via your config store, or revert to the previous place version and Publish. Restores into a still-broken pipeline are wasted.
  2. Scope it. Time window from deploy logs; affected keys from player reports + server logs. Ten players is manual work; ten thousand needs the Open Cloud DataStore API and a script — key + scope setup is a dashboard task (rbx-handoff-dashboard, rbx-opencloud).
  3. Restore per the procedure above, worst-hit and paying players first.
  4. Compensate the unrecoverable remainder (grant via the pending-gifts queue, not raw writes) — a modest over-grant costs less than the churn of a stonewalled victim.
  5. Postmortem one paragraph into the game's memory block: trigger, window, count, fix.

Prevention (do these while nothing is wrong)

  • Pre-migration snapshot: before any schema migration ships, copy each loaded profile's pre-migration table to a Backup_<store> key once. Costs one write per returning player; turns a bad migration from an incident into an inconvenience.
  • Log every grant, spend, and trade server-side with timestamps and uuids — restores are only as precise as the ledger you can diff against.
  • Rehearse once: restore a test account's save in a private place before you ever need to do it at 2am with a Discord fire burning.

Sharp edges

  • CRITICAL — Restoring while the player's session is live: the auto-save overwrites the restore within 30 seconds and the player reports you "did nothing". Kick or wait first, write second, verify on their rejoin.
  • HIGH — Sitting on a loss report past the 30-day retention: the versions are gone, permanently. Triage loss reports within days.
  • HIGH — Blind full-version restore after post-incident activity: re-grants everything spent or traded since — a dupe source exploiters will farm deliberately with fake loss reports. Diff and adjust; never restore on an unverified claim.
  • MEDIUM — Running mass ListVersionsAsync sweeps from live game servers: the 5 + 2 × players budget throttles gameplay systems sharing it. Run investigations from a private test place or through Open Cloud.

Load with

rbx-data-sessionlock (lock-safe writes), rbx-data-profilestore (budgets, session flow), rbx-data-schema (validating restored shapes), rbx-opencloud + rbx-handoff-dashboard (mass restores via API key).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.