Roblox Toolchain 标志

Roblox Toolchain

社区
afrxo
roblox-toolchain

Filesystem-based Roblox development with Rojo + Wally + Luau LSP + StyLua + selene. Use when setting up, modifying, or debugging .project.json sync, package manifests, toolchain pinning, sourcemap regen, editor integration, CI builds, or any filesystem-to-DataModel question. Tooling layer only — language rules live in luau-expert; runtime behavior lives in roblox-dev; UI libraries live in roblox-ui.

概览

发布者afrxo
代码仓库roblox-agent-skills
技能名称roblox-toolchain
星标数
21
复刻数
4
附带文件
11
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 11 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 afrxo 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Roblox Toolchain AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/afrxo/roblox-agent-skills/tree/main/skills/roblox-toolchain
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/afrxo/roblox-agent-skills.git /tmp/roblox-agent-skills
mkdir -p .claude/skills
cp -r /tmp/roblox-agent-skills/skills/roblox-toolchain .claude/skills/roblox-toolchain
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Roblox Toolchain,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Roblox Toolchain。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Roblox Toolchain 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Roblox Rojo (Filesystem Workflow)

How to develop Roblox games with files on disk instead of inside Studio. Sources: rojo.space (official Rojo docs), github.com/rojo-rbx/rojo (Rojo source), github.com/rojo-rbx/rokit (Rokit toolchain manager — use this, not Aftman/Foreman), github.com/UpliftGames/wally (Wally package manager), github.com/pesde-pkg/pesde (Pesde — newer alternative package manager). Tooling: stylua, selene, luau-lsp.

For deep dives see:


Integration Policy

This skill describes preferred patterns; it does not authorize rewriting existing code. Apply rules to new code and to changes the user explicitly asks for. Match the codebase's existing toolchain. If the project uses Aftman, don't migrate to Rokit unprompted. If it uses Wally, don't suggest Pesde. If default.project.json follows a particular structure, extend it — don't rewrite it. Surface conflicts once and default to the existing setup.

Full rules: ../../shared/integration-policy.md.


Principles

  • One source of truth: the filesystem. The repo is canonical; Studio is the build target.
  • Toolchain is pinned per project. rokit.toml lists exact versions of rojo, wally (or pesde), stylua, selene, luau-lsp. Reproducible builds beat "works on my machine".
  • Sourcemap is rebuilt, not committed. It's generated output. Regenerate on dependency change.
  • Build and lint in CI. A green main means rojo build produces a valid .rbxl and lints pass.
  • Packages/ is generated. Wally writes it; you don't hand-edit it; it's .gitignore'd.

Rojo Basics

Install

Use Rokit (toolchain manager, successor to Foreman/Aftman) to pin versions per project:

toml
# rokit.toml — drop-in compatible with foreman.toml / aftman.toml format
[tools]
rojo = "rojo-rbx/rojo@7.5.1"
wally = "UpliftGames/wally@0.3.2"
stylua = "JohnnyMorganz/StyLua@2.0.0"
selene = "Kampfkarren/selene@0.27.1"

Then rokit install in the project root pulls those exact versions. Don't rely on globally-installed tools — versions drift between machines.

Why Rokit, not Aftman: Aftman is unmaintained (third-party author no longer working in Roblox); Foreman is maintained by Roblox but oriented toward internal use. Rokit is community-maintained, drop-in compatible with both manifest formats, and substantially faster to install. Migrate by renaming aftman.toml → rokit.toml.

Common Rokit commands: rokit init, rokit add OWNER/REPO, rokit install, rokit update, rokit list, rokit self-update.

Two modes

bash
# Live sync — Studio plugin connects to this server, applies changes as you save.
rojo serve [path/to/project.json]

# One-shot build — produces a .rbxl (place) or .rbxm (model).
rojo build [path/to/project.json] --output build/place.rbxl

rojo serve is for development. rojo build is for CI and final publish. The Studio plugin (install via Studio's plugin tab, version-matched to the CLI) is what actually applies live changes.

Project file location

Rojo looks for default.project.json in the current directory. Pass an explicit path to use any other .project.json file. A repo with multiple builds (game, plugin, library) typically has one project per target.


default.project.json Structure

json
{
  "name": "MyGame",
  "tree": {
    "$className": "DataModel",

    "ReplicatedStorage": {
      "$className": "ReplicatedStorage",
      "$path": "src/ReplicatedStorage"
    },

    "ServerScriptService": {
      "$className": "ServerScriptService",
      "$path": "src/ServerScriptService"
    },

    "StarterPlayer": {
      "$className": "StarterPlayer",
      "StarterPlayerScripts": {
        "$className": "StarterPlayerScripts",
        "$path": "src/StarterPlayerScripts"
      }
    },

    "Workspace": {
      "$className": "Workspace",
      "$properties": {
        "Gravity": 196.2
      }
    }
  }
}
  • name (required) — used as the build artifact name.
  • tree (required) — root Instance description.
  • Inside tree:
    • $className — Instance class. Optional if $path resolves it or if the key is a service name.
    • $path — folder/file on disk to mount under this Instance.
    • $properties — properties to set (e.g. Gravity, HttpEnabled).
    • $ignoreUnknownInstances — if true, Rojo leaves Instances it didn't sync alone instead of deleting them.
    • Any other key = a child Instance description.

Other top-level fields: servePort (default 34872), servePlaceIds (allowlist of place IDs to prevent accidentally syncing into the wrong game), placeId, gameId, serveAddress, globIgnorePaths, emitLegacyScripts.

emitLegacyScripts controls whether *.server.luau/*.client.luau produce legacy Script/LocalScript Instances or Script Instances with RunContext set. Documented default is true; verify against your installed Rojo version (rojo --version + release notes) before assuming. New projects should set false to use modern RunContext — see roblox-dev script-types section.

Full schema: references/project-format.md.


Filesystem → DataModel Mapping

This is the rule set you'll consult constantly. Memorize the common ones.

Path on diskBecomes
dir/ (any directory)Folder
foo.luauModuleScript named foo (Rojo also accepts legacy .lua)
foo.server.luauScript named foo (server)
foo.client.luauLocalScript named foo (client)
dir/init.luauModuleScript named dir (the directory becomes the script)
dir/init.server.luauScript named dir (directory becomes server script)
dir/init.client.luauLocalScript named dir (directory becomes local script)
foo.rbxm / foo.rbxmxModel from binary/XML
foo.csvLocalizationTable
foo.txtStringValue
foo.json (not .model.json / .project.json)ModuleScript returning the table
foo.tomlModuleScript returning the table
foo.model.jsonJSON-described model (hand-written, useful for RemoteEvent etc.)
foo.project.jsonNested project (composes into parent)
foo.meta.jsonMetadata sidecar attached to the matching file/dir

init.luau semantics

A directory + init.luau becomes one ModuleScript, where the directory's other children become children of that script. Lets a script have submodules without a separate folder.

src/Inventory/
├── init.luau          # ModuleScript "Inventory"
├── add.luau           #   ModuleScript "add" (child of Inventory)
├── remove.luau        #   ModuleScript "remove"
└── types.luau         #   ModuleScript "types"

Only one init.* file per directory (init.luau xor init.server.luau xor init.client.luau).

Meta files

foo.meta.json attaches Rojo-specific metadata to foo.*. Common uses:

json
// init.meta.json — turn the parent folder into a Tool with a Grip
{
  "className": "Tool",
  "properties": {
    "Grip": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]
  }
}
json
// foo.meta.json — disable a script
{
  "properties": { "Disabled": true }
}
json
// hello.meta.json — let Rojo leave Instances under hello.txt alone
{
  "ignoreUnknownInstances": true
}

className works only in init.meta.json. properties works on any non-model file.

Full mapping table: references/sync-mapping.md.


Recommended Project Layout

my-game/
├── rokit.toml                # toolchain pinning
├── default.project.json       # Rojo project file
├── wally.toml                 # package manifest
├── wally.lock                 # lockfile (committed)
├── stylua.toml                # formatter config
├── selene.toml                # linter config
├── sourcemap.json             # generated; .gitignore'd
├── Packages/                  # wally output; .gitignore'd
├── ServerPackages/            # wally output; .gitignore'd
├── DevPackages/               # wally output; .gitignore'd
├── .github/workflows/ci.yml   # CI
├── (editor config)            # .vscode/settings.json, .nvim, etc. — editor-specific
├── .gitignore
├── README.md
└── src/
    ├── ReplicatedStorage/
    │   ├── Shared/
    │   │   ├── init.luau
    │   │   └── ...
    │   └── Client/             # (optional) client-only scripts via RunContext
    ├── ServerScriptService/
    │   ├── init.server.luau
    │   └── Systems/
    └── StarterPlayer/
        └── StarterPlayerScripts/
            └── init.client.luau

Match src/ directory names to their DataModel mount points. Reading the path tells you exactly where the code runs.


Wally (Packages)

Install via Rokit (don't pull from a global). Add to rokit.toml:

toml
[tools]
wally = "UpliftGames/wally@0.3.2"

Then rokit install. Commands:

bash
wally init               # scaffold wally.toml
wally install            # download deps into Packages/
wally install --locked   # CI; fail if lockfile is stale
wally update [name...]   # bump deps
wally publish            # push your package to the registry
wally search <query>     # find packages

wally.toml

toml
[package]
name = "yourname/coolpkg"        # SCOPE/NAME, lowercase, dashes ok
version = "1.0.0"                # SemVer
license = "MIT"                  # SPDX
authors = ["Your Name <you@example.com>"]
realm = "shared"                 # "shared" or "server"
registry = "https://github.com/UpliftGames/wally-index"

[dependencies]
React = "jsdotlua/react@17.1.0"
Promise = "evaera/roblox-lua-promise@4.0.0"

[server-dependencies]
ProfileService = "loleris/profileservice@1.4.0"

[dev-dependencies]
Jest = "jsdotlua/jest@3.10.0"

Realms

  • shared — replicates to clients. Mount under ReplicatedStorage.
  • server — server-only. Mount under ServerStorage or ServerScriptService.
  • No client realm exists. Client-only deps live in shared and run on the client by import.

Mounting Wally output in Rojo

json
"ReplicatedStorage": {
  "$className": "ReplicatedStorage",
  "Packages": {
    "$path": "Packages"
  }
},
"ServerScriptService": {
  "$className": "ServerScriptService",
  "Packages": {
    "$path": "ServerPackages"
  }
}

Packages get installed into separate folders by realm. Shared → Packages/, server → ServerPackages/, dev → DevPackages/.

Lockfile

wally.lock pins exact versions of every dep (transitive included). Commit it. wally install --locked in CI ensures everyone builds the same thing.

Full manifest fields, lockfile format, command list: references/wally-manifest.md.


Pesde (Alternative Package Manager)

Pesde is a newer Luau-first package manager — designed to prevent runtime lock-in. It targets multiple Luau runtimes (luau, lune, roblox, roblox_server) from one tool, and can pull from existing Wally registries via a bridge. Worth using when:

  • You want one package manager across pure-Luau, Lune, and Roblox projects.
  • You need Wally packages and native pesde packages in the same project.
  • You prefer npm/pnpm-style ergonomics over Wally's Cargo-style.

pesde.toml

toml
name = "yourname/coolpkg"
version = "1.0.0"
license = "MIT"

[target]
environment = "roblox"     # luau | lune | roblox | roblox_server
lib = "src/init.luau"

[indices]
default = "https://github.com/pesde-pkg/index"

[wally_indices]
default = "https://github.com/UpliftGames/wally-index"

[dependencies]
# Native pesde dep
hello = { name = "pesde/hello", version = "^1.0.0" }
# Wally dep via the bridge
React = { wally = "jsdotlua/react", version = "^17.1.0" }

[dev_dependencies]
Jest = { wally = "jsdotlua/jest", version = "^3.10.0" }

Commands

bash
pesde init        # scaffold pesde.toml
pesde add SCOPE/NAME   # add + install a dep
pesde install     # install all deps; writes pesde.lock
pesde run         # run [scripts] entries (uses Lune)
pesde publish

Layout

  • Native pesde deps install into a target-named folder (roblox_packages/, luau_packages/, etc.).
  • Wally bridge deps still resolve through the wally-index repo.
  • pesde.lock is the lockfile — commit it.
  • For Roblox projects, pesde generates a Rojo-compatible sourcemap via a script package; pair with rojo sourcemap.

When to pick which

NeedChoice
Mature, Roblox-only, large existing ecosystemWally
Multi-runtime (Lune CLI tools, Roblox, plain Luau)Pesde
Cargo-style ergonomicsWally
npm/pnpm-style ergonomics + Wally bridgePesde
Existing project on Wally with no painStay

Wally and Pesde aren't drop-in equivalents — manifest formats and resolution semantics differ. Don't switch mid-project without reason.


Sourcemap (Luau LSP)

Luau LSP needs to know where files map to in the DataModel for proper autocomplete and require() resolution. Rojo generates the map.

bash
# Watch mode — regenerates on filesystem change
rojo sourcemap --watch --output sourcemap.json default.project.json

# One-shot
rojo sourcemap --output sourcemap.json default.project.json

Then point luau-lsp at it. Editor-specific:

  • VS Code (luau-lsp extension): "luau-lsp.sourcemap.sourcemapFile": "sourcemap.json" in .vscode/settings.json (or workspace-level config).
  • Neovim / Helix / Sublime: pass the sourcemap path as an LSP startup arg (--definitions=... / --sourcemap=...) or via your LSP client's settings; the luau-lsp binary documents the flags.
  • CLI mode: luau-lsp analyze --sourcemap sourcemap.json .... Verify the exact flag against your installed luau-lsp --help.

Regenerate after:

  • Adding/removing files in the project.
  • Running wally install (new package paths).
  • Changing default.project.json mounts.

A common workflow: run rojo sourcemap --watch in a terminal alongside rojo serve. Both run for the duration of your session.

sourcemap.json is generated output — .gitignore it.

LSP setup details: references/luau-lsp-setup.md.


Linting & Formatting

StyLua (formatter)

toml
# stylua.toml
column_width = 100
line_endings = "Unix"
indent_type = "Tabs"          # or "Spaces" with indent_width = 4
quote_style = "AutoPreferDouble"
call_parentheses = "Always"

[sort_requires]
enabled = true                # alphabetize the require block; pairs with luau-expert guidance

Run via stylua src/. Most editors auto-format on save once the StyLua extension is installed.

selene (linter)

toml
# selene.toml
std = "roblox"                # roblox stdlib definitions

# Optional: per-rule tweaks
[config]
incorrect_standard_library_use = "warn"

std = "roblox" is the key bit — without it, selene flags every Instance.new and task.wait. Run via selene src/.

Luau LSP (type-checker)

luau-lsp powers in-editor type checking, hover info, autocomplete. Combine with --!strict per-file (see luau-expert skill) for max coverage.

Project-level config (.luaurc):

json
{
  "languageMode": "strict",
  "lint": {
    "*": true
  }
}

Verify the schema against luau.org/lint — .luaurc fields evolve.


CI

A minimum-viable CI run:

  1. Setup Rokit (rokit install) to install pinned tool versions.
  2. wally install --locked — fail if lockfile drift.
  3. stylua --check src/ — fail if formatting drift.
  4. selene src/ — lint.
  5. rojo sourcemap --output sourcemap.json default.project.json — generate map.
  6. luau-lsp analyze with the sourcemap — type-check. Exact flag depends on installed version (--sourcemap or --definitions); check luau-lsp --help.
  7. rojo build default.project.json --output build/place.rbxl — build artifact.
  8. (Optional) Upload place.rbxl as artifact / publish.

Each step short-circuits the next. A green CI run means: pinned tools, locked deps, formatted, lint-clean, type-clean, builds.

GitHub Actions example sketched in examples/ci.yml.


Verification Rules

  • Don't quote .project.json field names from memory beyond name, tree, $className, $path, $properties. The full schema is short — check references/project-format.md before committing to less-common fields.
  • Don't quote Wally version semantics from memory. Wally follows Cargo-style SemVer with ^ default; specifics for ~, =, * should be checked against Wally docs before recommending non-default version specifiers.
  • emitLegacyScripts default has shifted across releases. Confirm what version of Rojo the project uses (rojo --version) before assuming the Script vs Script(RunContext=Server) distinction.
  • Editor configs differ. This skill covers the Luau LSP layer — .vscode/settings.json examples in references are illustrative; users on Neovim/Helix/Sublime configure equivalent fields.
  • Don't conflate Rojo with the engine. RunContext placement / replication / DataModel semantics belong to roblox-dev. This skill stops at "the file ends up at this DataModel path".

Anti-Patterns

❌ Don't✅ Do
Globally-installed rojo / wally / styluaPin per-project via rokit.toml
New projects on Aftman or ForemanRokit (drop-in successor; community-maintained, faster)
Hand-edit Packages/Treat as generated; wally install regenerates
Commit Packages/ / ServerPackages/ / DevPackages/.gitignore them
Commit sourcemap.json.gitignore; regenerate on demand
Forget wally.lock in gitCommit it; CI uses --locked
Multiple init.* in one folderOne init script per dir; use submodules instead
init.client.luau placed in ServerScriptService mountMatch script type to container
selene without std = "roblox"Always set; otherwise every Roblox API trips lint
Edit Studio + filesystem simultaneouslyFilesystem is canonical; close Studio when not running rojo serve
rojo build producing a place file checked inCI artifact only; binary place files don't diff
Mounting Packages only under ReplicatedStorage and using server depsMount ServerPackages separately under server containers
Bare *.luau in a StarterPlayerScripts mount expecting client behavior*.client.luau (legacy) or Script with RunContext=Client
Manually rerun rojo sourcemap after every saveUse --watch in a long-running terminal
wally publish from a dirty working treeTag a clean commit; publish from CI
luau-lsp without sourcemapGenerate sourcemap; LSP requires it for require() resolution

Examples

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Roblox Toolchain AI 技能有什么作用?

Filesystem-based Roblox development with Rojo + Wally + Luau LSP + StyLua + selene. Use when setting up, modifying, or debugging .project.json sync, package manifests, toolchain pinning, sourcemap regen, editor integration, CI builds, or any filesystem-to-DataModel question. Tooling layer only — language rules live in luau-expert; runtime behavior lives in roblox-dev; UI libraries live in roblox-ui.

为什么在 TypingMind 中使用 Roblox Toolchain?

因为您只需安装一次,就能搭配任何模型使用。Roblox Toolchain 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Roblox Toolchain?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/afrxo/roblox-agent-skills/tree/main/skills/roblox-toolchain。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Roblox Toolchain?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Roblox Toolchain 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Roblox Toolchain 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Roblox Toolchain AI 技能免费吗?

是的。afrxo 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇