/fivem-skill:deslopfrom fivem-skill
Removes AI-generated slop from FiveM resource code (Lua, TypeScript, JavaScript) without changing behavior. Cleans up comments, debugging, nesting, unused imports, and style inconsistencies.
Ships in fivem-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Find the code changed on this branch and remove the AI-generated slop introduced in it. Behaviour stays the same: this is a cleanup, not a refactor.
git merge-base HEAD origin/HEAD, else main or master), plus uncommitted changes.Only touch lines the diff introduced. The code around them sets the style; it isn't the target.
Judge each candidate against the file and the rest of its resource: what is slop in one resource is house style in another.
Everywhere
-- loop through players), restate a function name, or don't match how the file comments.print or console.log, commented-out code.return flattens.Lua
pcall wrappers and nil checks around values that can't be nil on a trusted path: an export of a resource the manifest declares as a dependency, a value the same function just set.true or false (if isOpen == true then) when the file doesn't write them.local. Before making one local, search the whole resource for other uses: every Lua file of a resource shares one global scope per side, so another file may read it.Citizen.CreateThread / Citizen.Wait mixed with CreateThread / Wait in one file. They are the same functions: match the file.contains loop beside code that uses lib.table.contains, a RequestModel / HasModelLoaded wait loop where the resource uses lib.requestModel elsewhere. Swap only when the ox_lib function does the same thing; read its source for differences (timeouts, return values, errors) first.TypeScript / JavaScript
any, as unknown as, and @ts-ignore / @ts-expect-error used only to silence a type error.try / catch around trusted calls that only logs and carries on.Agents pack code: several statements on a line, guard after guard with no blank line between, a condition wrapped across lines to stay in one if. Judge layout against the file on the default branch or files the branch didn't touch, never against the branch's own code: when the branch wrote most of a file, its layout is the slop.
return or return false. A guard that returns a table or does more goes across lines.if wrapped across lines.Before:
if type(data) ~= 'table' or type(data.slot) ~= 'number' or type(data.count) ~= 'number'
or data.count < 1 then return false end
local player = GetPlayer(source)
if not player or not player.shop then return false end
local item = player.shop.items[data.slot]
if not item then return false end
if item.license and not HasLicense(player, item.license) then return false, { type = 'error', description = 'missing_license' } end
After:
if type(data) ~= 'table' then return false end
if type(data.slot) ~= 'number' or type(data.count) ~= 'number' or data.count < 1 then
return false
end
local player = GetPlayer(source)
if not player or not player.shop then return false end
local item = player.shop.items[data.slot]
if not item then return false end
if item.license and not HasLicense(player, item.license) then
return false, { type = 'error', description = 'missing_license' }
end
Server code that receives anything from a client is not a trusted path. Keep every check on:
RegisterNetEvent, AddEventHandler on a net event) and of server-side lib.callback.register callbacks;source: the player exists, owns the item, is near the target, has the job or group;IsPlayerAceAllowed, framework job or group checks).A generic cleanup reads these as defensive noise, and they are what stops exploits. If one really looks redundant, leave it and mention it in the summary. Splitting a check into its own guard or onto its own line is fine: every check stays.
Also keep checks on data from the database, from NUI callbacks (RegisterNUICallback), and guards around optional resources (GetResourceState(name) == 'started').
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub seba3567/fivem-skill --plugin fivem-skill7 skills in this plugin
/fivem-developmentBuilds, reviews, debugs, optimizes and secures FiveM (Cfx.re / GTA V) resources and whole servers — CfxLua 5.4, JS/TS and C#, fxmanifest.lua, natives, events and callbacks, OneSync and state bags, NUI, oxmysql and databases, ox_lib/ox_inventory/ox_target/ox_core, Qbox, QBCore, ESX, ND, vRP/Creative and custom frameworks, server.cfg, convars, txAdmin, console log analysis, GTA V Enhanced, vehicles, MLO/streaming, RP systems, anticheat and audits (backdoors, exploits, dupes, endpoint coverage). Use when the user mentions FiveM, FXServer, Cfx, CitizenFX, GTA RP/roleplay servers, a framework or ox resource above, a resource with fxmanifest.lua, server console errors, or asks to create, convert, optimize, scale, debug or audit a FiveM script or server, in any language./lua-best-practicesLua best practices for FiveM resources built on ox_lib, the way Overextended structures its own resources. Use when reading or editing any .lua file or fxmanifest.lua, or when the user asks when to use require, lib.load or lib.loadJson, how to split a resource into modules, where config goes, or how to use cache, lib.onCache, lib.points, lib.callback or locales./resource-best-practicesFiveM resource defaults beyond security: entity spawning and network control, cleanup, loops, network traffic, state bags and SQL. Use when writing or reviewing a resource's client or server scripts, or when a resource doubles up after a restart, hitches, or floods the network./setup-oxConfigure the Overextended skills. Picks which model and reasoning level each subagent role uses within a budget you choose, then detects your FiveM server, its ox resources and framework. Writes `~/.config/ox/models.md` and `.ox/config.md`, which the other ox skills read./tddMake a bug in a TypeScript resource executable before fixing it, with a regression test that fails before the fix and passes after. Use only when the user asks for TDD, a failing test, or a regression test, or when the resource already has a test runner and the bug has an obvious cheap test target. Skip it when the test path is unclear, expensive or integration-heavy./typescript-best-practicesTypeScript best practices for FiveM resources and their NUI. Use when reading or editing any .ts or .tsx file or a .svelte file with <script lang="ts">, or when the user asks how to type net events, callbacks, exports, NUI messages or state bags.2 plugins ship this exact skill · first indexed Oct 16, 2026
Other plugins' skills for the same job