Skip to main content
skill CX Codex

oxlib — Claude Code skill: what it does, how to install

This Claude Code skill helps write Lua code with ox_lib in FiveM resources. It activates for UI, zones, commands, and client-server requests.

MIT 117 installs ★ 20 updated 2026-10-17

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add germanfndez/fiveai-skills --skill oxlib -a claude-code
Open on GitHub

What oxlib does

oxlib guides the use of the global lib for notifications, dialogs, menus, progress bars, TextUI, callbacks, commands, and zones. It produces runnable Lua and marks which code belongs on the client and which belongs on the server.

For a new resource, the skill adds shared_scripts { '@ox_lib/init.lua' } to fxmanifest.lua. Start ox_lib before the resource or lib will be nil. UI functions run on the client, while lib.addCommand runs on the server; zones must also be created client-side. For network requests, the skill favors lib.callback over paired events.

What it helps with

  • show a notification or dialog in a FiveM resource
  • send a client-server request through a callback
  • add a server command with typed parameters and access restrictions
  • create a zone that reacts when a player enters or leaves

Example prompts for the agent

  • Add a notification with lib.notify to my FiveM resource.
  • Make a client-to-server request using lib.callback.await.
  • Create a lib.zones.box zone with enter and exit handlers.

How to install oxlib

1Skills CLI (Vercel)

npx skills add germanfndez/fiveai-skills --skill oxlib -a claude-code

2Manually: put the files in place

~/.claude/skills/oxlib/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/oxlib/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about oxlib

How do I install oxlib in Claude Code?

Run npx skills add germanfndez/fiveai-skills --skill oxlib -a claude-code. The skill file is installed at ~/.claude/skills/oxlib/SKILL.md.

What does oxlib do?

It helps write Lua code for ox_lib UI, callbacks, server commands, and zones in FiveM. The skill also identifies whether code should run on the client or server.

What does oxlib need to work?

The resource needs ox_lib. Add shared_scripts { '@ox_lib/init.lua' } to fxmanifest.lua and start ox_lib before the resource.

Source text

SKILL.md · MIT
---
name: oxlib
description: "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."
license: MIT
metadata:
  author: germanfndez
  version: "1.0.0"
---

# 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' }` to `fxmanifest.lua` and ensure `ox_lib` starts before the resource; without it `lib` is nil.
- Prefer `lib.callback` / `lib.callback.await` over paired events or framework-specific callbacks for data across the network.
- `lib.callback.register(name, function(source, ...))` on the server receives `source` first; 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.addCommand` is SERVER-side; use `restricted` for permissions and typed `params` (`number`, `playerId`, `string`, `longString`).
- Zones: `onEnter`, `onExit` and `inside` do not work on the server; create zones on the client. Keep the returned zone to call `zone: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

1. Add the manifest line and start order (read rules/init.md).
2. Pick the call from Decision Gates; read the matching rules file for the option table.
3. Put request handling on the server callback; put UI on the client.
4. Name callbacks and commands with the resource prefix.
5. 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

© germanfndez · MIT · germanfndez/fiveai-skills

Similar skills

SKILL.md skills catalog →

From the same set12

The whole set →
lua-basics lua-basics — a skill that makes your coding agent follow Lua conventions for FiveM resources: naming, locals, tables and error handling. CX Codex +1 436installs fivemanage Teaches the agent to use the Fivemanage SDK: capture player screenshots, upload images and push logs to the dashboard via exports.fmsdk. CX Codex +1 367installs esx-framework esx-framework keeps an AI coding agent inside the ESX Legacy API when it writes FiveM resources: server and client sides, player objects, callbacks, jobs, money. CX Codex +1 319installs qbcore-framework qbcore-framework helps build FiveM resources on qb-core by generating server and client Lua code with argument validation, callback handling, and proper Player object methods. CX Codex +1 272installs oxmysql This Claude Code skill writes server-side SQL for FiveM through oxmysql. It activates for database queries and migrations from mysql-async. CX Codex +1 124installs fivem-deployment The fivem-deployment Claude Code skill selects and checks FXServer builds. It activates for server updates, server.cfg edits, or client connection problems after an update. CX Codex +1 114installs ox-inventory This Claude Code skill guides Lua work with ox_inventory, from item changes to stashes, shops, and inventory hooks. It activates for requests to register storage or move code from qb-inventory or esx inventory. CX Codex +1 104installs ox-target This Claude Code skill builds FiveM interactions with ox_target. It activates for target options, interaction zones, or migrations from qb-target. CX Codex +1 102installs

Project sponsors

Companies that keep this analytics open