fivem-nui

fivem-nui is a skill for Claude Code from germanfndez/fiveai-skills. It costs 59 tokens per session (798 once invoked), scanned A, original, MIT.

A development guide for FiveM NUI, the web-based interface system used to show menus and other graphics inside a game. It covers HTML, CSS, JavaScript, and messages between the interface and FiveM.

In plain words
What is it for?
Use it to create or edit FiveM menus and other interfaces, or to work with NUI callbacks.
Why use it?
It helps connect a graphical interface to game code and handle user actions correctly.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fiveai-skills plugin — 12 skills shipped together

Good fit Use it to create or edit FiveM menus and other interfaces, or to work with NUI callbacks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/germanfndez/fiveai-skills/fivem-nui
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add germanfndez/fiveai-skills --skill fivem-nui
Clone the repo
git clone --depth 1 https://github.com/germanfndez/fiveai-skills

Made for: Claude Code.

Or install fiveai-skills, the plugin that ships this one along with the rest of its 12 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fivem-nui

README.md
[![agentmods](https://agentmods.dev/badge/skills/germanfndez/fiveai-skills/fivem-nui/github.svg)](https://agentmods.dev/skills/germanfndez/fiveai-skills/fivem-nui)
Your own site
<a href="https://agentmods.dev/skills/germanfndez/fiveai-skills/fivem-nui"><img src="https://agentmods.dev/badge/skills/germanfndez/fiveai-skills/fivem-nui/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fivem-nui

Your own site · 80×15
<a href="https://agentmods.dev/skills/germanfndez/fiveai-skills/fivem-nui"><img src="https://agentmods.dev/badge/skills/germanfndez/fiveai-skills/fivem-nui.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 798 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk warn 21 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.00798
Opus 5 $0.00030 $0.00399
Sonnet 5 $0.00012 $0.00160
Haiku 4.5 $0.00006 $0.00080

Measured yesterday against content hash caa5466068b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

fivem-nui scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/fivem-nui/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FiveM NUI

HTML/CSS/JS interfaces for FiveM: manifest setup, Lua-to-browser messages, NUI callbacks and focus handling.

Activation Contract

Load this skill when the user asks to create or edit a FiveM UI, writes HTML/CSS/JS inside a resource, sets ui_page, or asks about SendNUIMessage, SetNUIFocus or RegisterNUICallback.

Hard Rules

  • Declare ui_page and include every UI file in files in fxmanifest.lua; a missing file silently fails to load.
  • Reference assets with https://cfx-nui-<resource>/path; the nui:// protocol is deprecated.
  • RegisterNUICallback handlers must ALWAYS call cb(...) (at least cb({})), or the browser request hangs.
  • Browser calls callbacks with fetch('https://' + GetParentResourceName() + '/<name>', { method: 'POST', body: JSON.stringify(...) }); the URL name must match the registered name exactly.
  • SetNUIFocus(keyboard, mouse): always call SetNUIFocus(false, false) when closing the UI.
  • NUI callbacks run on the CLIENT. Validate their data client-side, then re-validate on the server before any state change; never trust UI-sent prices, amounts or ids.
  • Minimize SendNUIMessage calls: batch updates rather than sending per frame.
  • Debug with F8 and Chrome DevTools; test the page in a browser with a mock mode.

Decision Gates

Direction Mechanism
Lua to browser SendNUIMessage({ type = ..., data = ... }) + window.addEventListener('message')
Browser to Lua fetch POST to https://<resource>/<callback> + RegisterNUICallback
Browser wants server data callback to Lua client, then a server callback
Show / hide cursor SetNUIFocus(true, true) / SetNUIFocus(false, false)
Keyboard only SetNUIFocus(true, false)

Execution Steps

  1. Add ui_page and files to the manifest (read rules/setup.md).
  2. Build index.html, CSS and JS; listen for message events keyed by type.
  3. Register Lua callbacks for every action the UI can request; call cb on every path.
  4. Manage focus on open/close; handle Escape to close.
  5. Forward any state-changing action to the server and validate there.

Read the full file on GitHub · 60 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +33 lines · +11 tokens per session caa5466068b1
  2. 12d ago First seen · 27 lines · 48 tokens per session scan A f89da00a1ea3

Subscribe to this mod's changes

fivem-nui is a skill published in the GitHub repository germanfndez/fiveai-skills (15 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 798 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

worker-visualizer

A real-time data/particle/simulation visualizer whose heavy compute runs in a Web Worker (off the main thread), optionally sharing memory with the UI via SharedArrayBuffer, and renders to a canvas at 60fps. Produced as a single self-contained index.html. Use when the brief asks for a "web worker", "simulation"…

nexu-io/open-design · 123 tokens

react-three-fiber

React Three Fiber 3D renderer for json-render. Use when working with @json-render/react-three-fiber, building 3D scenes from JSON specs, rendering meshes/lights/models/environments, or integrating Three.js with json-render catalogs.

vercel-labs/json-render · 54 tokens

vgpu

Build, debug, test, and optimize WebGPU projects using vgpu, its CLI, or @vgpu packages. Use for vgpu API questions, WGSL workflows, browser or Node rendering, integrations, testing, and performance work.

vercel-labs/vgpu · 51 tokens

matterjs

Use when implementing 2D physics interactions with Matter.js, including Engine/World setup, Render/Runner configuration, adding bodies and constraints, and scroll/interaction-friendly canvas scenes.

MengTo/Skills · 39 tokens

html-to-ugui

A pipeline for turning HTML interface prototypes into Unity UGUI Prefabs, which are reusable Unity interface objects. It uses browser-rendered layout data to preserve positions, images, text, controls, and device-adaptation intentions.

Alex-Rachel/TEngine · 150 tokens

threejs-game-director

Entrypoint for building, upgrading, and finishing Three.js browser games. Routes work across the sibling threejs- skills for gameplay, graphics, UI, 3D/image/audio asset generation, debugging, and release. Use for build-a-game, upgrade, polish, premium, AAA, high-fidelity, showcase, from-scratch, endless runner…

majidmanzarpour/threejs-game-skills · 86 tokens