Skip to main content
skill CX Codex

roblox-data — Claude Code skill for Roblox player saves

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.

MIT 3,300 installs ★ 199 updated 2026-10-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add TabooHarmony/roblox-brain --skill roblox-data -a claude-code
Open on GitHub

What roblox-data 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.

What it helps with

  • 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 for the agent

  • 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?

How to install roblox-data

1Skills CLI (Vercel)

npx skills add TabooHarmony/roblox-brain --skill roblox-data -a claude-code

2Manually: put the files in place

~/.claude/skills/roblox-data/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/roblox-data/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about roblox-data

How do I install roblox-data in Claude Code?

Run npx skills add TabooHarmony/roblox-brain --skill roblox-data -a claude-code. The skill lands at ~/.claude/skills/roblox-data/SKILL.md.

What does roblox-data do?

It gives the agent rules for Roblox player saves: DataStore, ProfileStore, session locks, schemas and migrations. Use it when writing, changing, debugging or auditing persistence code.

Why does a fresh write not show up in a read?

GetAsync serves a 4-second local cache by default. If a write seems missing right after UpdateAsync, read with UseCache = false to bypass that cache.

Source text

SKILL.md · MIT
---
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.
- RTBF: keep the user ID as a static substring in keys (`player_<UserId>`) so `{UserId}` deletion templates match; hashed/random keys make erasure manual.
- `GetAsync` serves a 4-second local cache (`DataStoreGetOptions.UseCache`, default `true`); verify writes with `UseCache = false`.
- Poll `DataStoreService:GetRequestBudgetForRequestType` for live headroom; quotas scale with concurrent users (experience reads: 300 + CCU x 40/min).
- New code identifies users with `player.User` (`User.Id`, `DomainType`, `DomainId`); `UserId` remains valid, but never mix the two IDs in one key scheme.
- First-session traces: `roblox-analytics` §8.

> Persistence workflows: [references/full.md](references/full.md)

© TabooHarmony · MIT · TabooHarmony/roblox-brain

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set29

The whole set →
roblox-luau-types roblox-luau-types — a skill for Luau type annotations: generics, unions, narrowing, strict mode, module type exports. Useful when migrating to --!strict. CX Codex +1 3,400installs roblox-npc-ai roblox-npc-ai — a skill for Claude Code, Codex, Cursor, Copilot, Gemini CLI and OpenCode. Adds Roblox PathfindingService knowledge, NPC state machines, line-of-sight detection and server-side AI loops to the agent. CX Codex +1 3,400installs roblox-camera A skill for scripting Roblox camera behavior: CFrame placement, screen raycasts, first and third person, cutscenes. Useful when the camera jitters or clips through walls. CX Codex +1 3,300installs roblox-publish-checklist roblox-publish-checklist runs release gates and a pre-release audit before you publish or update a Roblox experience, so blockers surface before players do. CX Codex +1 3,300installs roblox-luau-core roblox-luau-core — a skill for writing and debugging Luau that teaches the agent the language's semantics and catches syntax carried over from JavaScript or Python. CX Codex +1 3,300installs roblox-networking roblox-networking audits Roblox client-server networking: RemoteEvent validation, rate limits, NaN checks, and exploit defense. Useful when writing network remotes. CX Codex +1 3,300installs roblox-tooling roblox-tooling helps configure and fix Roblox development toolchains: Rojo, Wally, pesde, Selene, StyLua, Lune, and CI/CD pipelines. CX Codex +1 3,200installs roblox-analytics A skill for Roblox analytics work: AnalyticsService events, economy, funnels, onboarding traces and rate limits. Useful when instrumenting a feature or finding where players drop off. CX Codex +1 3,200installs

Project sponsors

Companies that keep this analytics open