{"data":{"slug":"discovered-bc4810d0111c7455b5eeca0a879bcbe002928c61f8f8f21c","title":"Roblox Luau Static Analysis And Type Safety","summary":"Analyze Roblox Luau code for type safety, linting, and formatting using project-specific configurations and tools such as Luau Analyzer, Selene, and StyLua. Deliver a structured report on findings, strictness coverage, and next steps for incremental migration.","url":"https:\/\/skillshunter.net\/skills\/discovered-bc4810d0111c7455b5eeca0a879bcbe002928c61f8f8f21c","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-bc4810d0111c7455b5eeca0a879bcbe002928c61f8f8f21c","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-bc4810d0111c7455b5eeca0a879bcbe002928c61f8f8f21c.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-bc4810d0111c7455b5eeca0a879bcbe002928c61f8f8f21c\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running any analysis, inspect `.luaurc`, `selene.toml`, `stylua.toml`, and other project configuration files to determine the installed tool versions and configured flags. Ensure that generated code, third-party packages, and legacy folders are excluded from reformatting or analysis unless explicitly allowed by the project's rules.","instructions":"---\nname: roblox-luau-static-analysis-and-type-safety\ndescription: Apply project-aware Luau type checking, lint, and formatting gates with gradual strict-mode adoption.\n---\n\n# Luau Static Analysis and Type Safety\n\n## Mission\n\nImprove the reliability of Luau code using the project's actual analyzer, type-checking configuration, lint rules, and formatter. Keep the work incremental and compatible with the existing Rojo\/Studio project.\n\n## Discovery\n\n- Inspect \\`.luaurc\\`, \\`selene.toml\\`, \\`stylua.toml\\`, \\`rokit.toml\\`, \\`aftman.toml\\`, \\`wally.toml\\`, project files, and repository guidance.\n- Identify the installed Luau Analyzer, Selene, StyLua, and package\/tool manager versions.\n- Read the current tool help and configuration before choosing flags. Do not assume command-line options are identical across versions.\n- Identify generated code, third-party packages, and legacy folders that should not be reformatted or analyzed under different rules.\n\n## Type-checking strategy\n\nLuau supports gradual type checking. Use the project's chosen mode deliberately:\n- \\`--!strict\\` for new modules and well-owned boundaries where types can be maintained.\n- \\`--!nonstrict\\` as an explicit transitional mode for modules that are not ready for full inference.\n- \\`--!nocheck\\` only where there is a documented reason; do not use it to hide errors.\n\nStart with leaf modules and high-value contracts. Add explicit types for public function parameters, return values, shared records, remote payloads after server validation, configuration, and module exports. Avoid broad \\`any\\` escape hatches. Narrow optional values and validate untrusted data before it enters typed internal state.\n\n## Execution procedure\n\n1. Record baseline analyzer findings before changing configuration.\n2. Run the analyzer against the smallest changed surface.\n3. Fix new errors and warnings caused by the change; classify pre-existing findings separately.\n4. Add or update regression tests for corrected boundary behavior.\n5. Run the repository lint and formatting tools in their documented check-only modes.\n6. Expand analysis to dependent modules and then the wider project.\n7. Review the diff for unrelated reformatting and generated-file churn.\n8. Record exact commands, tool versions, analyzer mode, findings before\/after, and output artifacts.\n\n## Roblox-specific boundaries\n\nStatic analysis cannot prove instance existence, engine scheduling, replication, permissions, DataStore behavior, physics, animation playback, or visual correctness. Those require focused Studio\/runtime scenarios. Server\/client shared contracts should have explicit types, but types do not replace runtime validation of client input.\n\n## Output\n\nProvide a concise change report, strictness coverage, remaining warnings, files excluded from checks, and the next incremental migration target. Never claim the whole project is strict when only selected modules were checked.\n\n## V18 shared workflow and handoff contract\n\n- Follow root `AGENTS.md` and `v18\/docs\/SKILL_INTEROPERABILITY.md`; consume the current work item and project profile when present.\n- Own only the bounded responsibility assigned. Do not silently redefine shared APIs, schemas, remotes, data ownership, or another specialist's files.\n- Return a structured handoff: scope, inputs, decisions, changed files, contracts consumed\/produced, checks actually run, evidence, risks, blockers, and next owner.\n- Update task\/evidence artifacts. Use PASS only for checks that actually ran; keep unavailable Studio\/device\/live-service checks NOT_RUN or BLOCKED.\n- Re-route when scope changes. Skills do not grant tools, permissions, MCP connections, or runtime capabilities.\n\n## V19 verification and evaluation contract\n\n- Select verification from changed paths, impacted systems, trust boundaries, and failure impact; do not run or report unrelated checks as proof.\n- Separate formatting, static analysis, unit, contract, integration, Studio, multi-client, device, performance, persistence, economy, and live-service checks.\n- A plan is not an execution result. Preserve NOT_RUN and BLOCKED states for checks that did not run.\n- A PASS requires the exact command or scenario, named environment, tool\/runtime version, build identity, expected behavior, observed behavior, and a non-empty inspectable evidence artifact.\n- Keep failures visible. Do not weaken acceptance criteria, delete negative benchmark cases, or convert a failed check into a pass.\n- Deterministic routing benchmarks measure router behavior only; they do not prove model reasoning quality, skill compliance, or game correctness.\n","use_cases":["Inspect and validate Roblox Luau code for type safety and consistency","Run static analysis on new or modified modules with project-specific configurations","Generate a structured report on type-checking findings, strictness coverage, and migration targets"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Aziz24666\/Codex_Roblox_skills\/blob\/eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c\/v19\/codex-skills\/roblox-luau-static-analysis-and-type-safety\/SKILL.md","source_commit":"eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c","license":null,"version":null,"listing_approved_at":"2026-11-30","created_at":"2026-11-29T10:59:52.000000Z","updated_at":"2026-11-30T06:51:47.000000Z","seo_title":"Roblox Luau Static Analysis and Type Safety","seo_description":"Apply project-aware Luau type checking, linting, and formatting with gradual strict-mode adoption for Roblox game development.","seo_keywords":["Roblox Luau","static analysis","type safety","Selene","StyLua","Luau Analyzer","Roblox game development"]}}