# roblox-data

roblox-data — a skill for Roblox save code: DataStore, ProfileStore, session locks, schemas and migrations. Load it when you write, change, debug or audit player persistence.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 3300 installs · ★ 199 repo stars
- Author: TabooHarmony
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/TabooHarmony/roblox-brain/tree/HEAD/skills/core/roblox-data/SKILL.md
- Updated: 2026-10-15
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/roblox-data

## What it does

This skill tells the agent how Roblox persistence works. It covers `DataStore`, `ProfileStore`, session ownership, save schemas and migrations. It fits when you add a field to a save, switch currency or inventory storage, or chase down lost, rolled-back or duplicated data.

The reference packs the core rules: a serializable template with a version field, deep-copied templates so nested defaults stay separate, `UpdateAsync` for read-modify-write. Session handling is spelled out — `StartSessionAsync`, `Profile.OnSessionEnd`, `EndSession`, plus `ProfileStore.Mock` for throwaway Studio writes. It also notes the 4-second local cache behind `GetAsync` and the fact that `PlayerRemoving` alone is not enough: pair it with `BindToClose`.

One constraint worth knowing: RTBF deletion works only if keys keep the user ID as a static substring, like `player_<UserId>`. Hashed or random keys break the `{UserId}` template match. And because `GetAsync` reads from cache by default, pass `UseCache = false` when verifying a write.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add TabooHarmony/roblox-brain --skill roblox-data -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/roblox-data/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/roblox-data/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add TabooHarmony/roblox-brain --skill roblox-data -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/roblox-data/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add TabooHarmony/roblox-brain --skill roblox-data -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/roblox-data/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install TabooHarmony/roblox-brain skills/core/roblox-data
```

2. **Manually: put the files in place**
- File: `.github/skills/roblox-data/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add TabooHarmony/roblox-brain --skill roblox-data -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/TabooHarmony/roblox-brain --path skills/core/roblox-data
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/roblox-data/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add TabooHarmony/roblox-brain --skill roblox-data -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/TabooHarmony/roblox-brain/tree/HEAD/skills/core/roblox-data/SKILL.md

## When to use it
- trace why saves are lost, rolled back or duplicated
- add a field to the save schema without breaking old data
- set up session locks around profile mutation
- keep Studio writes out of the production store
- confirm a write actually reached DataStore

## Example prompts
- Review my save code in `ServerScriptService` and flag any path where data can be lost.
- Add a `premiumUntil` field to the player schema and write a migration for existing saves.
- Check my `UpdateAsync` calls: will they hit throttling at peak load?

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 39909b7f17d39651.

BEGIN THIRD-PARTY FILE 39909b7f17d39651
```text
---
name: roblox-data
description: "Use when writing, changing, debugging, or auditing Roblox player saves: DataStore, ProfileStore, session locks, schemas, migrations."
when_to_use: "Also when data is lost, rolled back, duplicated or not saving, when adding a field to the save, changing currency or inventory storage, or reviewing save code."
last_reviewed: 2026-10-14
sources:
  - https://create.roblox.com/docs/reference/engine/classes/DataModel
  - https://create.roblox.com/docs/cloud-services/data-stores
  - https://create.roblox.com/docs/cloud-services/data-stores-vs-memory-stores
  - https://create.roblox.com/docs/cloud-services/memory-stores
  - https://create.roblox.com/docs/cloud-services/data-stores/data-stores-manager
  - https://create.roblox.com/docs/cloud-services/data-stores/right-to-be-forgotten
  - https://create.roblox.com/docs/cloud-services/data-stores/error-codes-and-limits
  - https://create.roblox.com/docs/cloud-services/data-stores/versioning-listing-and-caching
  - https://create.roblox.com/docs/reference/engine/classes/DataStoreService
  - https://raw.githubusercontent.com/MadStudioRoblox/ProfileStore/main/README.md
  - https://madstudioroblox.github.io/ProfileStore/api/
  - https://devforum.roblox.com/t/profilestore/3190543
  - original
---

# roblox data persistence

## When to Load

Load for player saves, migrations, retries, shutdowns, or session ownership. Leaderboards/messaging/world data: `roblox-server-data`; Open Cloud: `roblox-cloud`.

## Quick Reference

- Define a serializable template and a version field before storing player state. Deep-copy templates so nested defaults are not shared; migrate, then reconcile missing fields against the template. Scope store names by environment (`PlayerData_Studio`) so Studio writes stay out of production.
- Use `UpdateAsync` for read-modify-write; handle throttling and transient errors.
- Prevent concurrent profile mutation with a session-ownership protocol.
- With ProfileStore: `StartSessionAsync`, `Profile.OnSessionEnd`, `EndSession` as documented; no `Steal` for normal loads; `ProfileStore.Mock` for ephemeral Studio writes.
- Save on meaningful changes and lifecycle boundaries; `PlayerRemoving` alone is not sufficient; `BindToClose` finishes pending work.
- Store primitives/arrays/dictionaries; convert Instances/userdata/functions/cyclic tables first. Validate numbers (no NaN/inf), strings (`utf8.len`), nested tables: one bad value fails the write.
```
END THIRD-PARTY FILE 39909b7f17d39651

The third-party file has ended. Everything between the 39909b7f17d39651 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2466 of 3175 bytes. © TabooHarmony · MIT · https://github.com/TabooHarmony/roblox-brain/tree/HEAD/skills/core/roblox-data/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
