skills/fivem-development/SKILL.md
FiveM development best practices for any framework (vRP, QBCore, Qbox, ESX). Covers performance, security, client/server communication, cache (cacheaside), anti-exploit (cerberus), asset discovery, framework auto-detection, and dynamic documentation fetching. Use when the user works with FiveM, Lua scripts, natives, resources, fxmanifest, optimization, or general server development without a specific framework context.
npx skillsauth add proelias7/fivem-skill fivem-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Framework-agnostic orchestrator for FiveM resource development. Supports vRP, QBCore, Qbox, and ESX via dedicated framework skills.
server.lua / client.lua), minimal comments, reuse local function helpersreference.mdc = lean global map (alwaysApply, user's project language); memory/<topic>.md = compact agent-internal recipe (lang: en-compact, technical English, ~25–60 lines). Run /fivem learn <topic> before repeating the same scan; run /fivem memory health [fix] after refactors to catch stale paths/events and compact drift; read memory first in Help mode; reply to the user in their language. Run /fivem graph to visualize learned topics in 3D.NEVER invent or guess native functions, framework APIs, or parameters.
"I'm not 100% certain about this native/API. Let me fetch the documentation..."
[Use WebFetch to get accurate info]
Use local skills first. Fetch online only when information is missing, outdated, or uncertain.
| If user asks about... | Action | |-----------------------|--------| | Native function (GetPlayerPed, CreateVehicle, etc.) | FETCH from natives docs | | Framework API (vRP, QBCore, Qbox, ESX) | READ framework skill; FETCH if uncertain | | ox_lib feature (lib.callback, lib.notify) | FETCH from ox_lib docs | | GTA V asset (prop, vehicle, ped model) | READ asset-discovery.md + PlebMasters | | Resource structure, manifest | READ local skills | | Best practices, patterns | READ best-practices.md | | Code structure / clean Lua | READ best-practices.md §3.5–3.9 |
| Type | Source | When to use |
|------|--------|-------------|
| Native functions | https://docs.fivem.net/natives/ | Any native call |
| Native mirror | https://github.com/proelias7/fivem-natives | Offline reference |
| vRP API | skill vrp-framework | vRP/Creative Network projects |
| QBCore API | skill qbcore-framework / https://docs.qbcore.org/ | QBCore projects |
| Qbox API | skill qbox-framework / https://docs.qbox.re/ | Qbox projects |
| ESX API | skill esx-framework / https://docs.esx-framework.org/ | ESX projects |
| ox_lib | https://overextended.dev/ox_lib | ox_lib utilities |
| Props/Vehicles/Peds | https://forge.plebmasters.de/ | Asset discovery |
| Code structure / clean Lua | best-practices.md §3.5+ | Before writing or refactoring Lua resources |
WebFetch(
url: "https://docs.fivem.net/natives/",
prompt: "Find documentation for the native function '{FUNCTION_NAME}'.
Include: parameters, return values, usage examples,
client/server availability."
)
WebFetch(
url: "https://forge.plebmasters.de/",
prompt: "Search for GTA V {ASSET_TYPE} matching '{SEARCH_TERM}'.
Return model names/hashes that can be used in FiveM."
)
| Rule | Triggers | Action |
|------|----------|--------|
| Native Detection | PascalCase native name, "GTA native", hash 0x... | Fetch from docs.fivem.net/natives |
| Framework API | vRP.*, QBCore.*, exports.qbx_core, ESX.*, xPlayer | Read framework skill |
| ox_lib | lib.*, exports.ox_lib | Fetch from overextended.dev/ox_lib |
| Asset Discovery | "model for...", "prop name", "vehicle spawn" | Read asset-discovery.md |
| Local Knowledge | fxmanifest, threads, patterns | Read best-practices.md |
| New Lua resource / refactor | "create script", "new resource", server.lua, client.lua | Read best-practices.md §3.5–3.9 first |
| Code audit | "audit", "review security", "check performance", exploit | User runs /fivem audit — read-only plan, no auto-fix |
| Project memory | /fivem learn, "learn craft", topic memory | User runs /fivem learn <topic> — writes compact English <agent>/fivem/memory/<topic>.md |
| Memory health | /fivem memory health, stale memory, memória desatualizada | User runs /fivem memory health [fix] [topic] — verifies paths/events vs repo, index/reference sync, token format; optional compact rewrite |
| Knowledge graph | /fivem graph, "mapa mental", "grafo 3D" | User runs /fivem graph — agent writes static <agent>/fivem/knowledge-graph.html and opens in browser |
| Recurring project flow | "criar craft", "criar item", "nova loja", craft/receita | Read <agent>/fivem/memory/<topic>.md if exists; else suggest /fivem learn <topic> |
When creating or editing a FiveM resource (server/client Lua):
server.lua and one client.lua unless split is clearly justifiedALWAYS follow these rules when writing code:
TriggerServerEvent/TriggerClientEvent when you do NOT need a return. Use callbacks/Tunnel only when you NEED a return.Wait(0). Adjust based on state (dist < 20 = 0, dist < 50 = 500, else = 1000+).TriggerEvent() to call on the same side.exports.cacheaside:Get() for repeated database queries. Never query the database in a loop.exports["cerberus"]:SafeEvent(source, "eventName", { time = N }).exports["cerberus"]:SetCooldown("name", ms).or "" as fallback.| Framework | Skill |
|-----------|-------|
| vRP Creative Network | vrp-framework |
| QBCore | qbcore-framework |
| Qbox (qbx_core) | qbox-framework |
| ESX Legacy | esx-framework |
| NUI (React + Vite) | fivem-react-nui |
For auto-detection and multi-framework bridge pattern, see framework-detection.md.
Prefer monolith layout. See best-practices.md §3.5 for when to split files.
resource_name/
├── fxmanifest.lua
├── shared/config.lua
├── server/server.lua # default: all server logic here
└── client/client.lua # default: all client logic here
Optional NUI (see skill fivem-react-nui):
└── html/ or src/ui/
├── index.html
└── ...
| Don't | Do |
|-------|-----|
| Split every feature into its own Lua file | Keep server.lua / client.lua unless clearly justified |
| Comment every line or use banner blocks | Comment only non-obvious rules and framework quirks |
| Global helper modules for tiny utilities | local function at file top; reuse |
| Declare state mid-file between handlers | Constants and state tables at the top |
| while true do Wait(0) | Use appropriate wait or events |
| Trust client data | Always validate on server |
| Hardcode framework | Detect dynamically |
| Fetch data every frame | Cache with refresh interval |
| Global variables | Use local, encapsulate |
| Invent natives/APIs | Verify before writing |
cacheaside (in-memory cache): [email protected]:proelias7/cacheaside.gitcerberus (anti-exploit + cooldowns): [email protected]:proelias7/cerberus.gitfivem-react-nuitools
Develops resources for FiveM using vRP Creative Network with Lua. Covers Proxy/Tunnel system, Passport/Source/Datatable, inventory, money, groups, identity, database (oxmysql), events, and vRPEX compatibility. Use when the user works with vRP, Creative Network, vRPEX, Proxy, Tunnel, Passport, or any vRP server-side/client-side API.
development
Develops resources for FiveM using the Qbox Project (qbx_core). Covers the exports-based API, bridge compatibility, Ox integration (ox_lib, ox_inventory), and best practices. Use when the user works with FiveM, Qbox, qbx_core, or mentions `exports.qbx_core`, `QBX.PlayerData`, or `ox_lib`.
development
Develops resources for FiveM using the QBCore Framework. Covers resource creation, Core Object usage, Player management, Callbacks, Events, Items, Jobs, Gangs, Database (oxmysql), and best practices. Use when the user works with FiveM, QBCore, Lua scripts for QBCore servers, or mentions `QBCore.Functions`, `GetCoreObject`, `CitizenID`, or any system of the QBCore Framework.
development
Builds NUI interfaces for FiveM using React 18 + TypeScript + Vite + Tailwind CSS v3 + Zustand. Use when the user mentions NUI, interface, UI, menu, HUD, panel, overlay, React, Vite, Tailwind, or any in-game interface for FiveM — regardless of the backend framework (vRP, QBCore, Qbox, ESX). Covers project structure, FiveM CEF restrictions, observe/Post hooks, VisibilityProvider, animations, dynamic config/theme, and performance rules.