营销与写作

roblox-luau-patterns

tabooharmony/ro…ox-brain

Use when writing or refactoring Roblox Luau modules, object lifecycles, signals, task scheduling, pcall, and cleanup.

  • 2263 次安装
  • 138 星标
  • 收录于

安装命令

npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-luau-patterns

SKILL.md

Luau Patterns

When to Load

Load for module shapes, resource ownership, scheduling, and failure contracts. See roblox-luau-core for semantics, roblox-luau-types for types, roblox-architecture for startup.

Quick Reference

Choose a shape

  • Plain functions: default for stateless transformation or validation.
  • Module with private state: one explicit subsystem owner. Do not create a manager class merely to namespace functions.
  • Object with metatable: multiple independent values need shared behavior and lifecycle.
  • Existing library abstraction: follow it when the project already uses it consistently. Do not add Promise, signal, cleanup, or framework dependencies for one call site.

Constructors use ., instance methods use :, and mutable fields belong on the instance, not the class table.

Make ownership visible