roblox-code-maintenance-refactor

roblox-code-maintenance-refactor is a skill for Claude Code, Codex from AshExplained/roblox-skills. It costs 49 tokens per session (526 once invoked), scanned A, original, MIT.

A set of practices for safely maintaining and reorganizing Roblox Luau code, Roblox's programming language. It covers duplicate logic, dead code, unclear names, module boundaries, dependencies, and client-server responsibilities.

In plain words
What is it for?
Use it to remove unused code, simplify large scripts, review modules and dependencies, clarify remote communication, replace magic numbers with balance tables, and prevent regressions through playtesting.
Why use it?
It helps improve the code without accidentally changing how the game behaves or breaking communication between the player's device and the server.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to remove unused code, simplify large scripts, review modules and dependencies, clarify remote communication, replace magic numbers with balance tables, and prevent regressions through playtesting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ashexplained/roblox-skills/roblox-code-maintenance-refactor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AshExplained/roblox-skills --skill roblox-code-maintenance-refactor
Clone the repo
git clone --depth 1 https://github.com/AshExplained/roblox-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for roblox-code-maintenance-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/ashexplained/roblox-skills/roblox-code-maintenance-refactor.svg)](https://agentmods.dev/skills/ashexplained/roblox-skills/roblox-code-maintenance-refactor)
Your own site
<a href="https://agentmods.dev/skills/ashexplained/roblox-skills/roblox-code-maintenance-refactor"><img src="https://agentmods.dev/badge/skills/ashexplained/roblox-skills/roblox-code-maintenance-refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 526 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.00526
Opus 5 $0.00024 $0.00263
Sonnet 5 $0.00010 $0.00105
Haiku 4.5 $0.00005 $0.00053

Measured 8d ago against content hash 029e51575487, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

roblox-code-maintenance-refactor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

roblox-code-maintenance-refactor/SKILL.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Roblox Code Maintenance Refactor

Goal

Improve code health without changing player-facing behavior accidentally.

Refactor Rules

  • Read before editing.
  • Keep changes scoped.
  • Preserve remote contracts unless intentionally migrating.
  • Avoid mixing behavior changes with cleanup.
  • Playtest after meaningful refactors.
  • Check console output.

Targets

  • Duplicated constants and reward formulas.
  • Large scripts with mixed responsibilities.
  • Client/server boundary confusion.
  • Dead remotes, stale UI paths, unused modules.
  • Repeated event connection patterns.
  • Unclear names around valuable state.
  • Magic numbers that should be balance tables.

Finding Deepening Opportunities

Beyond obvious cleanup, hunt for shallow modules to deepen — where the interface is nearly as complex as the implementation, so callers carry complexity that should be hidden.

  • Where does understanding one concept require bouncing between many tiny scripts?
  • Where were pure helpers extracted only for tidiness, but the real bugs live in how they're called (no locality)?
  • Where do client and server share a responsibility that leaks across the remote boundary?

Apply the deletion test to anything you suspect is shallow: if deleting it just moves complexity around, inline it; if deleting it would scatter the same complexity across many call sites, keep it and give it a small, stable interface named from the game's vocabulary. Present each opportunity as: files involved · the friction today · the proposed change · the benefit (locality + testability). Don't propose new indirection for a single implementation. See roblox-luau-architecture for the deep-module model.

MCP Workflow

  1. Use script_grep to find duplication, old names, or call sites.
  2. Read all affected scripts with script_read.
  3. Make small edits with multi_edit.
  4. Use start_stop_play to verify the relevant loop.
  5. Check get_console_output.

Output

Return:

  • Refactor goal.
  • Behavior preserved.
  • Scripts changed.
  • Verification performed.
  • Follow-up debt items.

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 63 lines · 49 tokens per session scan A 029e51575487

Subscribe to this mod's changes

roblox-code-maintenance-refactor is a skill published in the GitHub repository AshExplained/roblox-skills (6 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 526 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

game-code-review

Invoke when the user wants a game-specific code review, architecture check, or technical analysis of game code. Covers frame independence, hot path performance, state machine integrity, and resource lifecycle. Triggers on: "code review", "review my code", "check architecture", "game code quality". Do NOT invoke for…

AlterLab-IEU/AlterLab_GameForge · 96 tokens

refactor

Guides a refactor, cleanup, or restructure with the right decomposition. Use when the user asks to refactor, simplify, extract, or modernize code.

code-yeongyu/oh-my-openagent · 36 tokens

pre-publish-review

Nuclear-grade 12-agent pre-publish release gate. Runs /get-unpublished-changes to detect all changes since last npm release, spawns up to 10 ultrabrain agents for deep per-change analysis, invokes /review-work (orchestrator manual QA plus one gate reviewer) for holistic review, and 1 oracle for overall release…

code-yeongyu/oh-my-openagent · 161 tokens

work-with-pr

Full PR lifecycle in a fresh task-owned git worktree: implement via the ulw-loop skill with mandatory evidence-bound manual QA → reviewer-readable English PR → verification loop (CI + Cubic, where Cubic is skipped only when its quota is exhausted) → merge by default → worktree cleanup. Decomposes one task into the…

code-yeongyu/oh-my-openagent · 211 tokens

remove-ai-slops

Removes AI-generated code smells from branch changes or an explicit file list behind regression tests. Use when the user asks to clean up, deslop, or remove AI-slop patterns from recent changes.

code-yeongyu/oh-my-openagent · 45 tokens

review-work

Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.

code-yeongyu/oh-my-openagent · 63 tokens