agentleFS
CodePhobiiaCodePhobiia/claude-roblox-game-studio/.claude/skills/datastore-review/SKILL.md

datastore-review

Skill9 starsChanged 7 months agoMITView on GitHub

Audit all DataStore usage in the project for correctness, security, and best practices. Checks for session locking, pcall usage, schema versioning, budget management, and common anti-patterns.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are 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.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search for all DataStore usage: grep -rn "DataStoreService" src/

    line 11
  2. Very specific:

    Search for all MemoryStore usage: grep -rn "MemoryStoreService" src/

    line 12
  3. Very specific:

    Search for all BindToClose handlers: grep -rn "BindToClose" src/

    line 13
  4. Very specific:

    Search for PlayerAdded / PlayerRemoving: grep -rn "PlayerAdded\|PlayerRemoving" src/

    line 14
  5. Very specific:

    If no DataStore code exists yet, suggest the recommended architecture pattern and offer to scaffold it via datastore-architect.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

/datastore-review — DataStore Audit

Delegate to: datastore-architect

Steps:

  1. Search for all DataStore usage: grep -rn "DataStoreService" src/
  2. Search for all MemoryStore usage: grep -rn "MemoryStoreService" src/
  3. Search for all BindToClose handlers: grep -rn "BindToClose" src/
  4. Search for PlayerAdded / PlayerRemoving: grep -rn "PlayerAdded\|PlayerRemoving" src/

Check each DataStore operation for:

Critical (must fix):

  • All GetAsync/SetAsync/UpdateAsync wrapped in pcall
  • Session locking implemented (acquire lock on join, release on leave)
  • BindToClose handler saves all player data with timeout
  • Player data keyed by UserId (not Name)
  • Schema includes version number
  • No synchronous DataStore calls in PlayerAdded without yielding protection

Important (should fix):

  • Auto-save interval implemented (recommended: every 5 minutes)
  • Save debouncing with dirty flag
  • Retry logic for failed operations (with exponential backoff)
  • Data migration functions for schema version upgrades
  • OrderedDataStore used appropriately (leaderboards, rankings)
  • Budget monitoring (not exceeding request limits)

Nice to have:

  • Data backup system (periodic full save to backup key)
  • Analytics on save failures
  • Admin tools for data inspection/correction

Output:

Generate a report with findings organized by severity:

# DataStore Review

## Scope
Files analyzed: X
DataStore references found: Y
MemoryStore references found: Z

## Critical Findings
1. **[filepath:line]**: [issue]
   - Impact: [data loss / duplication / exploit]
   - Fix: [specific code change]

## Important Findings
...

## Anti-Patterns Detected
...

## Recommended Architecture
[If no DataStore code exists yet, suggest the recommended architecture pattern:]
- ServerStorage/PlayerData/PlayerDataService.lua (main API)
- ServerStorage/PlayerData/SessionLock.lua (lock mechanism)
- ServerStorage/PlayerData/Schema.lua (current schema + migrations)
- ServerStorage/PlayerData/Serializer.lua (compress/decompress)

If no DataStore code exists yet, suggest the recommended architecture pattern and offer to scaffold it via datastore-architect.

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.