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.
In this repository51 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- asset-auditSkill
- asset-from-imageSkill
- balance-checkSkill
- brainstormSkill
- bug-reportSkill
- changelogSkill
- code-reviewSkill
- design-reviewSkill
- design-systemSkill
- doctorSkill
- economy-auditSkill
- estimateSkill
- exploit-checkSkill
- gate-checkSkill
- gddSkill
- generate-assetSkill
- hotfixSkill
- launch-checklistSkill
- luau-lintSkill
- map-systemsSkill
- milestone-reviewSkill
- monetization-modelSkill
- onboardSkill
- patch-notesSkill
- perf-profileSkill
- project-stage-detectSkill
- prototypeSkill
- publish-reviewSkill
- release-checklistSkill
- remotes-auditSkill
- retention-analysisSkill
- retrospectiveSkill
- reverse-documentSkill
- scope-checkSkill
- sprint-planSkill
- startSkill
- studio-inspectSkill
- studio-screenshotSkill
- studio-testSkill
- team-combatSkill
- team-economySkill
- team-polishSkill
- team-releaseSkill
- team-uiSkill
- tech-debtSkill
- wiki-ingestSkill
- wiki-lintSkill
- wiki-querySkill
- wiki-seedSkill
- wiki-updateSkill
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
- Very specific: line 11
Search for all DataStore usage: grep -rn "DataStoreService" src/
- Very specific: line 12
Search for all MemoryStore usage: grep -rn "MemoryStoreService" src/
- Very specific: line 13
Search for all BindToClose handlers: grep -rn "BindToClose" src/
- Very specific: line 14
Search for PlayerAdded / PlayerRemoving: grep -rn "PlayerAdded\|PlayerRemoving" src/
- Very specific: line 69
If no DataStore code exists yet, suggest the recommended architecture pattern and offer to scaffold it via datastore-architect.
≈ “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.
Files
/datastore-review — DataStore Audit
Delegate to: datastore-architect
Steps:
- Search for all DataStore usage:
grep -rn "DataStoreService" src/ - Search for all MemoryStore usage:
grep -rn "MemoryStoreService" src/ - Search for all BindToClose handlers:
grep -rn "BindToClose" src/ - 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.
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.

