AgentSkillsCN

fivem-nui

FiveM NUI(新用户界面)开发,用于创建图形元素与用户界面。在创建或编辑 NUI 界面、为 FiveM 编写 HTML/CSS/JS,或处理 NUI 回调时使用。

SKILL.md
--- frontmatter
name: fivem-nui
description: FiveM NUI (New User Interface) development for creating graphical elements and user interfaces. Use when creating or editing NUI interfaces, HTML/CSS/JS for FiveM, or handling NUI callbacks.

FiveM NUI Development

Best practices for FiveM NUI development — fullscreen UIs, NUI callbacks, messaging, and UI integration. Use this skill whenever you are dealing with FiveM user interfaces to obtain domain-specific knowledge.

When to use

  • User asks how to create a UI for FiveM.
  • Creating or editing HTML/CSS/JS files for FiveM resources.
  • Setting up ui_page in fxmanifest.lua.
  • Questions about NUI callbacks, SendNUIMessage, or SetNUIFocus.
  • Need to look up natives → point to https://docs.fivem.net/natives/.

How to use

Read individual rule files for detailed explanations and examples:

  • rules/setup.md — Setting up NUI in a resource: ui_page, files entry, folder structure.
  • rules/fullscreen-nui.md — Creating fullscreen NUI pages: SEND_NUI_MESSAGE, SET_NUI_FOCUS, developer tools, referencing assets.
  • rules/nui-callbacks.md — NUI callbacks: RegisterNUICallback, fetch requests, data handling, security.
  • rules/best-practices.md — Best practices: performance, security, communication patterns, error handling.
  • rules/reference-links.md — Official docs and natives reference.