Skip to main content
skill CX Codex

roblox-testing · el4cteo — Claude Code skill for Roblox testing

The roblox-testing Claude Code skill covers testing Roblox code and checking gameplay changes. It applies when adding tests, configuring a runner, or setting up CI.

MIT 1,300 installs ★ 131 updated 2026-11-03

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

What roblox-testing does

The skill explains how to structure Roblox code for tests: keep game logic in pure ModuleScripts and pass service dependencies into modules so tests can use fakes. It covers Jest Lua, legacy TestEZ, .spec files, and running Jest through runCLI.

Test options include Studio, Studio MCP, run-in-roblox, Open Cloud Luau Execution, and Lune. The guide also covers multi-client playtests and a QA checklist for feature changes. Local Jest Lua 3 runs in Studio require FFlagEnableLoadModule = true in ClientAppSettings.json. run-in-roblox needs Studio installed; Open Cloud Luau Execution needs an API key scoped to universe.place.luau-execution-session:write.

What it helps with

  • test game logic in pure ModuleScripts
  • replace DataStores and other services with test fakes
  • configure Jest Lua runs in Studio or CI
  • check replication with multiple clients
  • review a gameplay change against a QA checklist

Example prompts for the agent

  • Add Jest Lua tests for the inventory logic in Inventory.spec.luau.
  • Set up Roblox test runs in CI with Open Cloud Luau Execution.
  • Write a QA checklist for this gameplay feature and cover a two-client playtest.

How to install roblox-testing

1Skills CLI (Vercel)

npx skills add EL4CTEO/roblox-skills --skill roblox-testing -a claude-code

2Manually: put the files in place

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

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

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

Questions about roblox-testing

How do I install roblox-testing in Claude Code?

Run npx skills add EL4CTEO/roblox-skills --skill roblox-testing -a claude-code. The skill file is at ~/.claude/skills/roblox-testing/SKILL.md.

What does roblox-testing do?

It explains how to make Roblox code testable, run Jest Lua tests, and check gameplay changes in Studio, CI, and multi-client playtests.

What does roblox-testing need to run?

Local Jest Lua 3 runs in Studio need FFlagEnableLoadModule = true in ClientAppSettings.json. run-in-roblox requires Studio to be installed, while Open Cloud Luau Execution requires an API key scoped to universe.place.luau-execution-session:write.

Source text

SKILL.md · MIT
---
name: roblox-testing
description: Testing Roblox code - testable modules with dependency injection, Jest Lua (runCLI, .spec files), legacy TestEZ, running tests in Studio, via Studio MCP, run-in-roblox, or CI with Open Cloud Luau Execution, Lune for pure Luau, multi-client playtests, QA checklist. Use when adding tests, setting up a test runner or CI, or verifying a gameplay change works.
---

# Testing Roblox games

## Make code testable first

- Keep game rules in **pure ModuleScripts** (inputs → outputs, no services, no yields): damage formulas,
  inventory operations, shop pricing, state machines, serialization, validation. These are trivially testable.
- Services take their dependencies as parameters (**dependency injection**) so tests can pass fakes
  instead of real DataStores, remotes, or `Players`.

```luau
--!strict
-- ReplicatedStorage/Shared/Inventory.luau — pure logic, no Roblox services.
export type Inventory = { [string]: number }

local Inventory = {}

function Inventory.add(inventory: Inventory, itemId: string, amount: number, maxStack: number): (boolean, string?)
	if amount <= 0 or amount ~= math.floor(amount) then
		return false, "invalid amount"
	end
	local current = inventory[itemId] or 0
	if current + amount > maxStack then
		return false, "stack full"
	end
	inventory[itemId] = current + amount
	return true, nil
end

return Inventory
```

```luau
--!strict
-- A service that receives its data store, so tests can inject an in-memory fake.
type Store = {
	GetAsync: (self: Store, key: string) -> any,
	SetAsync: (self: Store, key: string, value: any) -> (),
}

local function newCurrencyService(store: Store)
	local service = {}
	function service.award(userId: number, amount: number): number
		local key = `User_{userId}`
		local balance = (store:GetAsync(key) or 0) + amount
		store:SetAsync(key, balance)
		return balance
	end
	return service
end

-- In tests: a fake store backed by a table.
local fakeData: { [string]: any } = {}
local fakeStore: Store = {
	GetAsync = function(_self, key)
		return fakeData[key]
	end,
	SetAsync = function(_self, key, value)
		fakeData[key] = value
	end,
}
print(newCurrencyService(fakeStore).award(1, 50))

return newCurrencyService
```

## Jest Lua (recommended framework)

Port of Jest (`describe`/`it`/`expect`, mocks, snapshots). TestEZ is legacy; Jest Lua 3 includes a
migration guide.

```toml
# wally.toml
[dev-dependencies]
Jest = "jsdotlua/[email protected]"
JestGlobals = "jsdotlua/[email protected]"
```

```luau
-- src/shared/Inventory.spec.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local JestGlobals = require(ReplicatedStorage.DevPackages.JestGlobals)
local Inventory = require(ReplicatedStorage.Shared.Inventory)

local describe, it, expect = JestGlobals.describe, JestGlobals.it, JestGlobals.expect

describe("Inventory.add", function()
	it("stacks items up to the limit", function()
		local inventory = {}
		expect(Inventory.add(inventory, "Apple", 3, 5)).toBe(true)
		expect(inventory.Apple).toBe(3)
		local ok, reason = Inventory.add(inventory, "Apple", 3, 5)
		expect(ok).toBe(false)
		expect(reason).toBe("stack full")
	end)

	it("rejects fractional amounts", function()
		expect(Inventory.add({}, "Apple", 0.5, 5)).toBe(false)
	end)
end)
```

- Put a `jest.config.luau` (`return { testMatch = { "**/*.spec" } }`) in each test root.
- Runner script (Studio command bar, a test place Script, or cloud task):
  `require(ReplicatedStorage.DevPackages.Jest).runCLI(root, { ci = true }, { root }):awaitStatus()` →
  inspect `result.results.numFailedTests`.
- Jest Lua 3 needs the fast flag `FFlagEnableLoadModule = true` in Studio's `ClientAppSettings.json`
  when run locally.
- Map `DevPackages` into the DataModel only for test builds (separate Rojo project, e.g. `test.project.json`).

## Where tests run

| Runner | Use |
| --- | --- |
| Studio (command bar / test Script) | Local development. |
| Studio MCP (`execute_luau`, `start_stop_play`, `get_console_output`) | Agents running tests and playtests against the open place — see `roblox-studio-mcp`. |
| `run-in-roblox` | CLI that opens Studio, runs a script, pipes output (needs Studio installed; local/Windows/mac CI runners). |
| **Open Cloud Luau Execution** | Headless CI: runs a script in a real Roblox server for a published place version. |
| Lune | Pure-Luau modules with no Roblox API dependencies (fast, runs anywhere). |

Open Cloud Luau Execution flow (details and a script: [references/cloud-test-runner.md](references/cloud-test-runner.md)):
1. Build the test place (`rojo build test.project.json -o test.rbxl`) and upload it as a **Saved** version
   of a dedicated test place.
2. `POST /cloud/v2/universes/{u}/places/{p}/versions/{v}/luau-execution-session-tasks` with `{ "script": ... }`
   (API key scope `universe.place.luau-execution-session:write`; rate limit ≈ 5 tasks/min per key owner).
3. Poll the task `path` until `state` is `COMPLETE`/`FAILED`; read `output.results` and `.../logs`.

## Playtesting in Studio

- **Test** tab: Play (you + server), Run (server only, no character), **Clients and Servers** with 2+
  players to test replication, trading, and PvP. Most multiplayer bugs only appear with ≥ 2 clients.
- **Device Simulator** toolbar (Test → Device Simulator, top of the viewport): switch phone/tablet/console
  mid-playtest, with touch-control hints; its **Network Simulator** applies 3G/4G/Wi-Fi/wired or custom
  inbound/outbound latency, jitter, and packet loss to test lag compensation and loading/retry UX.
  Controller Emulator for gamepad input.
- Streaming: test with `StreamingTargetRadius = 64`.
- DataStores in Studio: enable API access and use a separate test universe or data store names.

## QA checklist before shipping a feature

- [ ] Works for a player who joins **after** the feature started (late joiners), and after respawn.
- [ ] Works with 2+ clients; server state is authoritative; UI updates on all clients.
- [ ] Player leaving mid-action (trade, purchase, round) leaves no broken state or leaked tables.
- [ ] Remotes rejected when spammed or sent malformed arguments.
- [ ] Data saves and reloads (rejoin), including teleports between places.
- [ ] Mobile, gamepad, and keyboard all work; UI readable on a phone.
- [ ] No errors/warnings in Output (server and client).

## Related skills

`roblox-tooling` (CI, Rojo), `roblox-studio-mcp` (agent-driven playtests), `roblox-open-cloud`,
`roblox-code-review`.

© EL4CTEO · MIT · EL4CTEO/roblox-skills

Similar skills

All skills for Testing and QA →

roblox-testing by other authors comes first.

roblox-testing nonlooped roblox-testing is a Claude Code skill for debugging, profiling, and testing Roblox Studio projects with TestEZ, Luau type checking, and engine diagnostics. CX Codex +1 560installs scenario-roblox-tooling scenario-labs scenario-roblox-tooling — a skill for Claude Code that sets up Roblox build pipelines, synchronizes code, and runs tests outside Studio. CX Codex +1 350installs roblox-studio-workflow gamedev-skills roblox-studio-workflow — a skill for Claude Code and Codex guides edits across Roblox places and Rojo projects. Activates when editing .rbxl files, working with Studio MCP tools, or verifying changes. CX Codex +1 9,300installs scenario-roblox-expert scenario-labs scenario-roblox-expert is a Claude Code skill for building, fixing, and testing Roblox Studio projects. It covers Luau scripts, MCP-driven Studio work, Rojo projects, and code-driven playtests. CX Codex +1 411installs roblox-debugging LihFolk roblox-debugging is a Claude Code skill that enforces a structured diagnosis flow for Luau codebases. It activates during desync issues, race conditions, physics glitches, and live server errors. CX Codex +1 ★ 98repo stars roblox-performance-audit LihFolk roblox-performance-audit is a Claude Code skill that diagnoses bottlenecks, memory leaks, and network overhead in Roblox experiences using measured profiles. CX Codex +1 ★ 98repo stars roblox-luau gamedev-skills This Claude Code skill helps write Roblox Luau and run project checks. It activates for a LocalScript that will not run, a client-side nil after joining, or legacy wait() calls. CX Codex +1 12,300installs

From the same set22

The whole set →
roblox-characters-animation roblox-characters-animation — a Claude Code skill for Roblox characters and animation. It applies to work on movement, damage, respawns, avatars, weapons, and tweens. CX Codex +1 1,300installs roblox-game-systems roblox-game-systems — a skill for Claude Code and Codex providing server-authoritative Roblox gameplay recipes. Activates when building currencies, inventory, weapons, round loops, or progression. CX Codex +1 1,300installs roblox-luau The roblox-luau Claude Code skill supports writing and explaining Roblox scripts in Luau. It activates for script creation, refactoring, type-error fixes, and updates to older Lua code. CX Codex +1 1,300installs roblox-ui roblox-ui — a skill for Claude Code and Codex constructs responsive Roblox interfaces. Runs when building HUDs, inventories, storefronts, or fixing layouts across mobile devices and consoles. CX Codex +1 1,300installs roblox-open-cloud This Claude Code skill covers Roblox Open Cloud APIs and HttpService. It applies to external tools, bots, CI/CD, and web requests from a game. CX Codex +1 1,200installs roblox-text-chat roblox-text-chat is a Claude Code and Cursor skill that configures TextChatService and text filtering in Roblox for adding chat, commands, or player-authored signs. CX Codex +1 1,200installs roblox-monetization This Claude Code skill covers Roblox monetization and purchase troubleshooting. It activates for work on shops, passes, subscriptions, rewarded ads, or paid random items. CX Codex +1 1,200installs roblox-physics The roblox-physics skill for Claude Code manages physics simulations and spatial queries. Use it when setting up raycasts, collisions, and vehicle mechanics. CX Codex +1 1,200installs

Project sponsors

Companies that keep this analytics open