agentleFS
blushneybusiness-glitchblushneybusiness-glitch/roblox-omniskills/skills/rbx-chat-moderation/SKILL.md

rbx-chat-moderation

Skill0 starsChanged 3 months agoMITView on GitHub

TextChatService chat that ships safe by construction — service config, custom channels, chat commands, and the filtering law applied to every user string the game displays. Use when the user says "set up chat", "add a team/proximity/VIP channel", "add chat commands", "filter pet names/sign text", or when chat broke, messages show as hashtags, or a player-typed string is appearing unfiltered. Do not use for policy questions about what content is allowed — load rbx-policy — or for reporting/moderating players via dashboard — load rbx-badges-groups instead.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 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.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read: the game's projects.md block (existing channels, tag scheme, token palette) before adding channels — the second channel matches the …

    line 88
  2. Very specific:

    Write: channel names, tag scheme, and the FilterText module path into the game's projects.md block.

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

rbx-chat-moderation

Laws

  1. Every user-originated string displayed to anyone passes through the filter. Chat rides TextChatService's built-in pipeline. Everything else — pet names, sign text, booth titles, guild names, plot messages — goes through TextService server-side: GetNonChatStringForBroadcastAsync for text all players see, GetNonChatStringForUserAsync for one recipient. "It's just a pet name" is how games get moderated.
  2. Fail closed. Filter calls are async and can throw — pcall, and on failure display nothing (or a placeholder like "..."), never the raw string. Store only the filtered result; the raw input never touches a DataStore or a TextLabel.
  3. TextChatService is the only chat. ChatVersion must be TextChatService; the legacy Lua chat is dead. Never fork legacy chat modules from old tutorials.
  4. Filter results are per-receiver. One player's filter output is not another's — age settings differ. For chat, TextChatService handles this; for custom display paths to a specific player, use the per-user variant with the receiver's UserId.
  5. Delivery callbacks never yield. ShouldDeliverCallback and OnIncomingMessage run per message; a yield or throw inside them silently kills delivery.

Passes

  1. Service config — set ChatVersion = Enum.ChatVersion.TextChatService (Studio property on TextChatService; not scriptable at runtime). Style via ChatWindowConfiguration and ChatInputBarConfiguration (font, colors, corner radius from the game's tokens); BubbleChatConfiguration for overhead bubbles (BackgroundColor3, TextColor3, MaxDistance ~64–100 studs).
  2. Channels — one TextChannel per scope under TextChatService, created server-side. AddUserAsync(userId) on PlayerAdded (pcall — the TextSource may not exist yet on very early joins; retry once). Scope delivery with ShouldDeliverCallback on the channel: team checks via Player.Team, proximity via character distance ≤ N studs. Return true fast; no yields.
  3. Tags and formatting — client-side OnIncomingMessage returns a TextChatMessageProperties with PrefixText for [VIP]/level/team tags (rich-text color the prefix, never the body). Read gamepass/team state from attributes replicated by the server — never a remote call inside the callback.
  4. Commands — TextChatCommand instances with PrimaryAlias/SecondaryAlias ("/trade", "/e dance"); Triggered fires on client and server — do the authoritative work in the server connection only.
  5. Non-chat surfaces — a single server module FilterText wrapping the two TextService calls with pcall + fail-closed fallback; every sign/pet-name/booth feature calls it. One module, one law, no per-feature copies.
  6. Verify — two-client Studio playtest: send in each channel, confirm scoping, confirm tags render, type a filtered-word test string and confirm hashtags appear for the other client, check get_console_output for callback errors after every exchange.

Performance budget

OnIncomingMessage and ShouldDeliverCallback complete in well under 1ms — table lookups and attribute reads only, no remote calls, no WaitForChild, no yields. Custom send surfaces rate-limit at the server (≥ 1s between sends per player per channel via rbx-net-ratelimit middleware). Filter calls for bulk content (loading 50 saved sign texts) are batched with task.spawn per string, never serialized on one thread at join.

Load with

rbx-net-ratelimit (send-path limits — don't ask, include it), rbx-security (server authority over anything a command grants), rbx-policy (what content is allowed at all), rbx-ui-tokens (chat window styling matches the game).

AI-tells

  • ☐ Player-typed string parented straight to a TextLabel or BillboardGui, no filter call
  • ☐ Filtering done client-side, or only on the sender's machine
  • ☐ No pcall around TextService calls, or failure path shows the raw string (fails open)
  • ☐ Forked legacy chat modules or ChatService requires from 2019 tutorials
  • ☐ Remote call or WaitForChild inside OnIncomingMessage / ShouldDeliverCallback
  • ☐ One broadcast-filtered string reused for whisper/targeted display
  • ☐ Raw (unfiltered) input written to DataStore
  • ☐ Chat window left at default gray when the game has a token palette

Memory

Read: the game's projects.md block (existing channels, tag scheme, token palette) before adding channels — the second channel matches the first one's naming and prefix style. Write: channel names, tag scheme, and the FilterText module path into the game's projects.md block; the FilterText module itself into module-library.md once it ships in a second game, per MEMORY-PROTOCOL.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.