# Roblox Luau Static Analysis V27

Analyze Roblox Luau projects using the official luau-analyze CLI for type checking, linting, and evidence-based static diagnostics. This process identifies source directories, type modes, and inventory files without claiming to be a parser or type checker.

**Canonical URL:** https://skillshunter.net/skills/discovered-5288da6a8f430d305aa8649d2a729f4c3340d31849c2788d

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-5288da6a8f430d305aa8649d2a729f4c3340d31849c2788d

**Markdown URL:** https://skillshunter.net/skills/discovered-5288da6a8f430d305aa8649d2a729f4c3340d31849c2788d.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-5288da6a8f430d305aa8649d2a729f4c3340d31849c2788d/download

**Category:** Software & Development

**Source URL:** https://github.com/Aziz24666/Codex_Roblox_skills/blob/eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c/v27/skills/roblox-luau-static-analysis-v27/SKILL.md

**Source commit:** eb2be117f63d6442c0f9b6d9d38bbdd7adf9374c

**Listing approved at:** 2026-11-30

**Created at:** 2026-11-29T11:00:45.000000Z

**Updated at:** 2026-11-30T06:51:47.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before running the analysis, ensure the official `luau-analyze` CLI is available and identify the actual game project root and source directories. Start with stable leaf modules and avoid mass edits of type directives.

### When to use it

- Diagnose and improve Luau code quality
- Perform type checking and linting on Roblox Luau projects
- Inventory source files and type modes using V27 offline audit
- Gradually migrate to strict typing with evidence-based diagnostics

## Skill instructions

---
name: roblox-luau-static-analysis-v27
description: Analyze Roblox Luau projects with the official luau-analyze CLI, incremental strict typing, and evidence-based static diagnostics.
---

# Roblox Luau Static Analysis

Use this skill when writing, reviewing, diagnosing, or improving Luau code quality.

## Establish the baseline

- Identify the actual game project root and source directories.
- Inspect the current type-mode directives and any `.luaurc` files.
- Check whether the official `luau-analyze` CLI is available.
- Use the V27 offline audit to inventory source files, type modes, and conservative architecture signals.
- Use `luau-analyze` for type checking and linting; do not claim the offline inventory is a parser or type checker.

## Gradual type migration

- Start with stable leaf modules, pure helpers, shared data definitions, and low-dependency interfaces.
- Add parameter types, return types, generic constraints, optional-field handling, and shared payload types.
- Move one bounded module or subsystem at a time to `--!strict`.
- Run the analyzer and relevant tests after each change.
- Prefer precise records and unions over broad `any` casts.
- Keep intentional dynamic/reflection-heavy modules in a justified mode until they can be typed safely.

Never add `--!strict` to every script in one mass edit. Never automatically alter type directives or suppress diagnostics to make a report green.

## Diagnostics workflow

1. Capture the baseline analyzer output.
2. Sort issues by runtime risk, affected callers, and shared-interface impact.
3. Fix root causes rather than hiding errors with casts.
4. Update affected callers and tests together.
5. Re-run static checks and focused Studio tests.
6. Report unresolved diagnostics and skipped tests.

## Honest evidence

- Keep compiler/type-checker output separate from Studio runtime logs.
- Record the exact CLI mode, project config, and files analyzed.
- Distinguish analyzer errors from heuristic warnings.
- A clean analyzer run does not prove the experience is correct at runtime.

