Tools and workflow for maintaining quality and style in World of Warcraft addon development.

Install

mkdir -p .claude/skills/s-lint && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9625" && unzip -o skill.zip -d .claude/skills/s-lint && rm skill.zip

Installs to .claude/skills/s-lint

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Ensure code quality using Luacheck linting and StyLua formatting. Covers common warnings, style rules, and auto-formatting. Use when checking code quality, fixing style issues, or preparing code for review. Triggers: lint, format, style, luacheck, stylua, code quality, warnings.
279 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Beginner

Key capabilities

  • →Lint Lua code
  • →Format code with StyLua
  • →Perform security analysis
  • →Analyze code complexity

How it works

It uses Luacheck for syntax and style linting and StyLua for consistent formatting.

Inputs & outputs

You give it
Lua source code
You get back
Linted and formatted code

When to use s-lint

  • →Formatting Lua code for WoW
  • →Detecting undefined globals in addons
  • →Performing complexity analysis on functions

About this skill

Linting WoW Addons

Guidance for code quality and formatting. Call the MCP tools directly (using-mechanic).

Related Commands

  • c-lint - Lint and format workflow
  • c-review - Full code review (includes lint)
  • c-audit - Security, complexity, deprecation and dead-code analysis (not part of lint)

MCP Tools

TaskMCP Tool
Lintaddon.lint(addon="MyAddon") (read-only)
Check formatting onlyaddon.format(addon="MyAddon", check=true) (read-only in effect)
Format (rewrites files)addon.format(addon="MyAddon")

addon.lint and addon.format run in the addon folder, so the addon's .luacheckrc / stylua.toml apply. If the tools are missing, tools.status reports it (mech setup installs them for the user). Security, complexity and dead-code analysis live in the analyzers: s-audit, s-clean.

Workflow

  1. addon.format(check=true) to see what would change; then addon.format if the diff is only style.
  2. addon.lint; fix real problems (undefined globals are usually typos or missing read_globals).
  3. Re-run addon.lint to confirm. Do not reformat whole files you are not otherwise changing.

Common Luacheck warnings

CodeMeaningFix
W111Setting undefined globalFix the typo or declare it in globals
W112Mutating undefined globalSame as W111
W113Accessing undefined globalCheck the API exists; add to read_globals
W211Unused local variableRemove it or prefix with _
W212Unused argumentPrefix with _ (for example _event)
W213Unused loop variablePrefix with _
W311Value assigned but never usedRemove the assignment or use the value
W431Shadowing upvalueRename the local

Configuration in this repository

  • The root .luacheckrc is the central config: std = "lua51", max_line_length = 120, codes = true, plus the WoW, Ace3 and FenUI globals. CI runs luacheck "!Mechanic/" "Mechanic/" --config .luacheckrc.
  • _TemplateAddon/TemplateAddon/.luacheckrc is a standalone per-addon starting point (std = "lua51", max_line_length = 160, ignores W212/W213, Libs/ excluded). Per-addon configs list their own globals (addon table, SavedVariables) and read_globals (WoW API, libraries).
  • std = "lua51" is required: addon Lua is 5.1, so goto, bit32 and // are errors.
  • There is no stylua.toml in this repository, so StyLua uses its defaults, which match this code style: tabs, 4-wide, 120 columns, AutoPreferDouble quotes, call_parentheses = "Always", Unix line endings. Add a stylua.toml to an addon only to deviate from them.
  • Libs/ (third-party and vendored libraries) must stay excluded from both tools.

Best practices

  1. Lint before commit.
  2. Keep read_globals honest: add only APIs you actually call, and prefer modern C_ APIs (api-patterns).
  3. Prefix intentionally unused variables with _.
  4. Treat lint as necessary, not sufficient: it proves nothing about in-game behaviour.

When not to use it

  • →When not developing WoW addons
  • →When the code is not Lua

Prerequisites

LuacheckStyLua

Limitations

  • →Requires WoW-specific configuration

How it compares

It provides WoW-specific linting rules and security analysis for combat lockdown violations.

Compared to similar skills

s-lint side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
s-lint (this skill)09moReviewBeginner
pr-review63moReviewIntermediate
django-verification56moReviewIntermediate
lint-and-validate68moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry