oxlib
Skill19 starsChanged 2 months agoMITView on GitHub
Trigger: ox_lib, lib.notify, lib.alertDialog, lib.inputDialog, lib.callback, lib.addCommand, lib.zones, menus, progress bars, keybinds, client-server callbacks. Use ox_lib UI, callbacks, commands and zones.
In this repository12 other files it gives its agents.
- skill-creatorSkill
- esx-frameworkSkill
- fivemanageSkill
- fivem-basicsSkill
- fivem-deploymentSkill
- fivem-nuiSkill
- fivem-securitySkill
- lua-basicsSkill
- ox-inventorySkill
- oxmysqlSkill
- ox-targetSkill
- qbcore-frameworkSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Add shared_scripts { '@ox_lib/init.lua' } to fxmanifest.lua and ensure ox_lib starts before the resource.
- Very specific: line 21
Prefer lib.callback / lib.callback.await over paired events or framework-specific callbacks for data across the network.
- Very specific: line 44
Add the manifest line and start order (read rules/init.md).
- Distinctive: line 46
Put request handling on the server callback.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ox_lib
Shared FiveM library: UI (notify, dialogs, menus, progress), client/server callbacks, commands and zones via the global lib.
Activation Contract
Load this skill when the user needs notifications, alert or input dialogs, menus, progress bars, TextUI, a client-server request/response, a typed server command, zones ("player enters/leaves area"), keybinds, or any resource that depends on ox_lib.
Hard Rules
- Add
shared_scripts { '@ox_lib/init.lua' }tofxmanifest.luaand ensureox_libstarts before the resource; without itlibis nil. - Prefer
lib.callback/lib.callback.awaitover paired events or framework-specific callbacks for data across the network. lib.callback.register(name, function(source, ...))on the server receivessourcefirst; validate arguments there.- Callback names must be unique (
resourcename:action). - UI functions (
lib.notify,lib.alertDialog,lib.inputDialog,lib.progress,lib.context,lib.menu,lib.showTextUI) render on the CLIENT; from the server trigger the client to call them. - Icons are Font Awesome 6, default style
solid; brand icons use{'fab', 'name'}. lib.addCommandis SERVER-side; userestrictedfor permissions and typedparams(number,playerId,string,longString).- Zones:
onEnter,onExitandinsidedo not work on the server; create zones on the client. Keep the returned zone to callzone:remove(). - Modules load on first use or via
ox_libs { ... }/lib.require.
Decision Gates
| Need | Call |
| Toast message | lib.notify({ title, description, type }) |
| Confirm / OK dialog | lib.alertDialog({ header, content, centered, cancel }) |
| Form input | lib.inputDialog(title, rows) |
| Client asks server | lib.callback.await(name, false, ...) + server lib.callback.register |
| Server asks client | lib.callback.await(name, source, ...) + client lib.callback.register |
| Chat command with args | lib.addCommand(name, { help, params, restricted }, cb) |
| Area trigger | lib.zones.poly / lib.zones.box / lib.zones.sphere |
Execution Steps
- Add the manifest line and start order (read rules/init.md).
- Pick the call from Decision Gates; read the matching rules file for the option table.
- Put request handling on the server callback; put UI on the client.
- Name callbacks and commands with the resource prefix.
- Store zone handles for removal.
Output Contract
Return runnable Lua using the global lib, with the manifest line when the resource is new and the client/server side explicit.
References
- rules/init.md — fxmanifest, shared_script, ox_libs, lib.require.
- rules/callback.md — lib.callback, await, register on both sides.
- rules/interface.md — notify, alertDialog, inputDialog, other UI modules, icons.
- rules/addCommand.md — server commands with help, params, restricted.
- rules/zones.md — poly, box, sphere zones, methods and utilities.
Upstream docs: https://overextended.dev/ox_lib
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

