lua-basics
Lua Basics
Best practices for writing effective Lua code in FiveM. This skill covers fundamental Lua patterns, performance optimizations, and code quality guidelines specifically for FiveM development.
When to use
- Writing or reviewing Lua code for FiveM resources.
- Questions about Lua best practices, naming conventions, or code structure.
- Optimizing Lua code for performance.
- Need guidance on functions, tables, variables, conditionals, or error handling in Lua.
How to use
Read individual rule files for detailed explanations and examples:
- rules/functions.md — Function best practices: size, naming, parameters, exports, guard clauses.
- rules/tables.md — Table operations: array indices, dereferencing, avoiding table.insert, iterations, array size.
- rules/variables.md — Variable naming conventions: constants, locals, globals, enums vs booleans.
- rules/conditionals.md — Conditional patterns: default values, boolean expressions, readability.
- rules/errors.md — Error handling: assertions, pre-conditions, errors as values, fail loudly.
- rules/reference-links.md — Official Lua and FiveM documentation resources.
More from germanfndez/fiveai-skills
fivem-nui
FiveM NUI (New User Interface) development for creating graphical elements and user interfaces. Use when creating or editing NUI interfaces, HTML/CSS/JS for FiveM, or handling NUI callbacks.
105fivem-security
Best practices and rules for securing FiveM resources against cheaters and exploits. Use this skill when writing or reviewing server-side and client-side code to ensure malicious events, unauthorized entity creations, and client trust issues are prevented. Focuses on strict server authority and safe event handling.
85fivem-basics
FiveM resource structure, fxmanifest, client/server scripting, events. Use when creating or editing FiveM resources or Lua scripts, or when the user asks how FiveM works.
80fivemanage
Fivemanage SDK for FiveM — installation, screenshots (takeImage, takeServerImage, uploadImage), and centralized logs (Log, Info/Warn/Error). Use when integrating Fivemanage, capturing player screenshots, uploading images, or sending logs to the Fivemanage dashboard.
59esx-framework
ESX Legacy Framework for FiveM - Player management, jobs, economy, inventory, weapons. Use when creating ESX resources or working with xPlayer, PlayerData, ESX functions.
39qbcore-framework
QBCore Framework for FiveM - Player management, jobs, gangs, economy, inventory. Use when creating QBCore resources or working with Player object, PlayerData, QBCore functions.
35