Skip to content

Souvik-223/agent-skills-agentic-tools / .agents/skills/game-development/roblox-games

roblox-game

Verified

Expert Roblox game development companion — Luau, Roblox Studio, MCP integration, simulator, tycoon, obby, RPG, horror, battle royale, game design, security, performance.

FileKindSize
.gitignoreother9 B
README.mdmarkdown5.2 KB
SKILL.mdskill md5.1 KB
docs/plans/2026-03-04-roblox-game-skill-design.mdmarkdown11.6 KB
docs/plans/2026-03-04-roblox-game-skill-plan/_index.mdmarkdown5.3 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-001-create-directory-structure.mdmarkdown753 B
docs/plans/2026-03-04-roblox-game-skill-plan/task-002-write-skill-router.mdmarkdown1.5 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-003-luau-mastery.mdmarkdown2.1 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-004-architecture-patterns.mdmarkdown2.1 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-005-mcp-orchestration.mdmarkdown2.5 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-006-security-hardening.mdmarkdown2.2 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-007-datastore-persistence.mdmarkdown2.2 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-008-gui-systems.mdmarkdown2.1 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-009-performance-optimization.mdmarkdown2.2 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-010-monetization-systems.mdmarkdown2.3 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-011-combat-systems.mdmarkdown1.8 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-012-inventory-systems.mdmarkdown1.8 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-013-game-design-roblox.mdmarkdown2.1 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-014-tooling-ecosystem.mdmarkdown1.9 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-015-animation-vfx.mdmarkdown2.0 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-016-multiplayer-networking.mdmarkdown1.9 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-017-testing-patterns.mdmarkdown1.9 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-018-sharp-edges.mdmarkdown2.7 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-019-game-scaffold.mdmarkdown1.7 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-020-genre-simulator.mdmarkdown1.8 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-021-genre-tycoon.mdmarkdown1.3 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-022-genre-obby.mdmarkdown1.4 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-023-genre-rpg.mdmarkdown1.5 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-024-genre-horror.mdmarkdown1.6 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-025-genre-battle-royale.mdmarkdown1.7 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-026-workflow-new-game.mdmarkdown1.6 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-027-workflow-debug-loop.mdmarkdown1.4 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-028-workflow-performance-audit.mdmarkdown1.4 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-029-workflow-security-audit.mdmarkdown1.4 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-030-workflow-publish-checklist.mdmarkdown1.7 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-031-workflow-monetization-audit.mdmarkdown1.5 KB
docs/plans/2026-03-04-roblox-game-skill-plan/task-032-workflow-code-review.mdmarkdown1.6 KB
references/animation-vfx.mdmarkdown38.4 KB
references/architecture-patterns.mdmarkdown32.2 KB
references/combat-systems.mdmarkdown42.0 KB
references/datastore-persistence.mdmarkdown31.6 KB
references/game-design-roblox.mdmarkdown34.9 KB
references/gui-systems.mdmarkdown46.2 KB
references/inventory-systems.mdmarkdown51.7 KB
references/luau-mastery.mdmarkdown42.9 KB
references/mcp-orchestration.mdmarkdown16.4 KB
references/monetization-systems.mdmarkdown24.4 KB
references/multiplayer-networking.mdmarkdown50.0 KB
references/performance-optimization.mdmarkdown17.7 KB
references/security-hardening.mdmarkdown35.2 KB
references/sharp-edges.mdmarkdown40.3 KB
references/testing-patterns.mdmarkdown29.6 KB
references/tooling-ecosystem.mdmarkdown29.2 KB
templates/game-scaffold.mdmarkdown57.6 KB
templates/genre-battle-royale.mdmarkdown44.2 KB
templates/genre-horror.mdmarkdown49.9 KB
templates/genre-obby.mdmarkdown26.0 KB
templates/genre-rpg.mdmarkdown43.2 KB
templates/genre-simulator.mdmarkdown48.7 KB
templates/genre-tycoon.mdmarkdown50.9 KB
workflows/code-review.mdmarkdown10.3 KB
workflows/debug-loop.mdmarkdown7.8 KB
workflows/monetization-audit.mdmarkdown11.3 KB
workflows/new-game.mdmarkdown19.6 KB
workflows/performance-audit.mdmarkdown7.6 KB
workflows/publish-checklist.mdmarkdown9.6 KB
workflows/security-audit.mdmarkdown9.1 KB

workflows/security-audit.md

View on GitHub
# Security Audit Workflow

A step-by-step guided workflow for auditing and hardening security in a Roblox game project.

---

## Step 1: Remote Surface Scan

Identify every RemoteEvent and RemoteFunction in the project to map the attack surface.

### MCP Full (Rojo/Argon project on disk)

- Use `get_project_structure` to locate all script files.
- Use `grep_scripts` to search for:
  - `RemoteEvent` — all declarations and references.
  - `RemoteFunction` — all declarations and references.
  - `BindableEvent` / `BindableFunction` — internal communication that could be exploited if misplaced.
  - `:FireServer(` — client-to-server calls.
  - `:FireClient(` / `:FireAllClients(` — server-to-client calls.
  - `:InvokeServer(` / `:InvokeClient(` — synchronous remote calls.
- Build a complete remote inventory: name, location, direction (client->server or server->client), and purpose.

### MCP Standard (partial access)

- Use available MCP tools to read script files and search for the patterns above.
- Ask the user to confirm completeness of the inventory.

### Offline (no MCP / in-Studio only)

- Ask the user to:
  - List all RemoteEvents and RemoteFunctions (check ReplicatedStorage, ServerStorage, and any folders).
  - For each remote, describe: what data is sent, who fires it, who listens.
- Review any pasted server-side handler code.

---

## Step 2: Validation Check

For each RemoteEvent/RemoteFunction handler on the server, verify the following defenses are in place.

### 2a. Type Checking

- Every argument received from the client must be type-checked before use.
- Use `typeof()` or explicit `type()` checks.
- Reject the request entirely if any argument fails validation (do not attempt to coerce).

```lua
-- GOOD
RemoteEvent.OnServerEvent:Connect(function(player, itemId, quantity)
    if typeof(itemId) ~= "string" then return end
    if typeof(quantity) ~= "number" then return end
    if quantity ~= math.floor(quantity) then return end -- must be integer
    -- proceed
end)
```

### 2b. Range Validation

- Numeric values must be bounds-checked (e.g., quantity between 1 and 99).
- String values must be length-checked and sanitized.
- Enum-like values must be checked against a whitelist.

### 2c. Cooldowns

- Verify that rate limiting or cooldown logic exists to prevent spam-firing.
- Typical pattern: per-player timestamp table with minimum interval.

```lua
local lastFire = {}
RemoteEvent.OnServerEvent:Connect(function(player, ...)
    local now = tick()
    if lastFire[player] and now - lastFire[player] < 0.5 then return end
    lastFire[player] = now
    -- proceed
end)
```

### 2d. Authorization

- Verify the player is allowed to perform the requested action.
- Examples: Does the player own the item they are trying to equip? Are they in the right game state?
- Never trust the client to report its own permissions.

---

## Step 3: Client Trust Audit

Search for game logic on the client that should only exist on the server.

### Red Flags

- **Currency manipulation**: Any client script that sets or modifies currency/coins/gems values and sends the result to the server.
- **Damage calculation**: Client computing damage and telling the server the result instead of the server computing it.
- **Inventory operations**: Client adding items to its own inventory and syncing to the server.
- **Position/teleport authority**: Client setting its own CFrame and the server trusting it without validation.
- **Purchase completion**: Client telling the server a purchase succeeded without server-side MarketplaceService verification.

### MCP Search Patterns

- `grep_scripts` for: `leaderstats`, `Currency`, `Coins`, `Gems`, `Gold`, `Damage`, `Health` in client scripts (StarterPlayerScripts, StarterGui).
- Look for patterns where client fires a remote with a value it computed rather than an action request.

### Correct Pattern

The client should send **intent** ("I want to buy item X"), and the server should:
1. Validate the request.
2. Check if the player can afford it.
3. Deduct currency.
4. Grant the item.
5. Notify the client of the result.

---

## Step 4: Data Exposure Check

Audit what data is visible or accessible to clients.

1. **ReplicatedStorage contents** — Everything here is visible to all clients. Search for:
   - Admin keys, API tokens, or secrets (should never be here).
   - Server configuration data that reveals game mechanics exploitably (e.g., exact drop rates, spawn timers).
   - ModuleScripts containing server logic that should be in ServerScriptService or ServerStorage.
2. **Remote payloads** — Review what data is sent via `FireClient` / `FireAllClients`:
   - Other players' private data (inventory, currency, stats) should not be broadcast.
   - Internal IDs or keys that could be replayed in forged requests.
3. **Attribute exposure** — Attributes set on replicated instances (Players, Characters, Workspace objects) are visible to all clients. Ensure sensitive values are not stored as attributes.
4. **StringValues / ObjectValues** — Check for value objects under replicated instances containing sensitive data.

---

## Step 5: Rate Limiting Check

Verify that all server-side remote handlers have rate limiting.

### Requirements

- Every `OnServerEvent` / `OnServerInvoke` handler must have a cooldown mechanism.
- Cooldowns should be **per-player** (not global).
- Recommended minimum intervals:
  - Combat actions: 0.1-0.5 seconds.
  - Economy actions (buy/sell): 0.5-1.0 seconds.
  - Chat/social actions: 1.0-3.0 seconds.
  - UI/cosmetic actions: 0.2-0.5 seconds.
- Players who exceed rate limits should be warned or kicked, not just silently ignored (to detect exploit attempts).

### Additional Checks

- **RemoteFunction abuse** — `OnServerInvoke` is synchronous and blocks the calling thread. An exploiter can spam-invoke to exhaust server threads. Prefer RemoteEvents where possible; if RemoteFunctions are used, they must have aggressive rate limiting.
- **Payload size** — Large tables sent via remotes can be used for denial-of-service. Validate table size/depth.

---

## Step 6: Vulnerability Report

Compile findings into a prioritized security report.

### Format

```
## Security Audit Report

### Critical (actively exploitable, immediate fix required)
- [Finding]: [File:Line] — [Description, attack vector, and impact]
  - Fix: [Specific remediation]

### High (exploitable with moderate effort)
- [Finding]: [File:Line] — [Description, attack vector, and impact]
  - Fix: [Specific remediation]

### Medium (defense-in-depth gaps)
- [Finding]: [File:Line] — [Description and impact]
  - Fix: [Specific remediation]

### Low (best practice improvements)
- [Finding]: [File:Line] — [Description]
  - Fix: [Specific remediation]

### Summary
- Total remotes audited: X
- Remotes missing validation: X
- Client-trusted logic found: X
- Data exposure issues: X
- Rate limiting gaps: X
```

### Severity Criteria

- **Critical**: An exploiter can directly manipulate currency, items, stats, or crash the server. No validation on a sensitive remote.
- **High**: An exploiter can gain unfair advantage (speed, damage, duplication) or access other players' data.
- **Medium**: Missing defense-in-depth layers (e.g., cooldowns exist but no type checking, or vice versa).
- **Low**: Best practice gaps that do not currently create an exploit path but weaken the security posture.

---

## Step 7: Apply Hardened Code

For each vulnerability found, provide or apply the fix.

### Fix Categories

1. **Validation wrappers** — Create a reusable validation module:
   ```lua
   -- ServerStorage/Modules/RemoteValidator.lua
   local Validator = {}

   function Validator.validateArgs(args, schema)
       for i, expected in ipairs(schema) do
           local arg = args[i]
           if typeof(arg) ~= expected.type then return false end
           if expected.range and (arg < expected.range[1] or arg > expected.range[2]) then return false end
           if expected.maxLength and typeof(arg) == "string" and #arg > expected.maxLength then return false end
           if expected.whitelist and not table.find(expected.whitelist, arg) then return false end
       end
       return true
   end

   return Validator
   ```

2. **Rate limiting module** — Centralized cooldown management.
3. **Server-authoritative rewrites** — Move any client-trusted logic to the server.
4. **Data relocation** — Move sensitive modules/data from ReplicatedStorage to ServerStorage/ServerScriptService.

Apply fixes directly if MCP write access is available. Otherwise, provide the complete corrected code for each file.

---

## Step 8: Re-Verify

After fixes are applied, re-run the audit to confirm all issues are resolved.

1. Repeat Step 1 (Remote Surface Scan) to confirm no new unprotected remotes were introduced.
2. Repeat Step 2 (Validation Check) on all modified handlers.
3. Confirm all Critical and High findings are resolved.
4. Document any accepted risks (Medium/Low findings intentionally deferred) with justification.

### Final Output

```
## Re-Verification Results

- Findings resolved: X/Y
- Remaining accepted risks: X (with justifications)
- New issues introduced: X (if any)
- Security posture: [Hardened / Improved / Unchanged]
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall