Skip to main content
skill CX Codex

qbcore-framework — Claude Code skill: what it does, how to install

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.

MIT 272 installs ★ 20 updated 2026-10-17

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

What qbcore-framework does

This skill guides the AI assistant when creating FiveM resources for the qb-core framework. It establishes a boundary between client and server code: changes to money, items, gangs, and jobs execute exclusively through the server-side Player object, while client scripts read cached data from QBCore.PlayerData.

The skill enforces structural safety guards: verifying that Player is not nil, supplying an explicit reason string for AddMoney and RemoveMoney, and validating every client payload on the server. Data requests to the server rely on QBCore.Functions.CreateCallback instead of paired events, and user interfaces favor ox_lib menus and progress bars.

If your server runs on qbx_core, do not apply this skill because framework exports and core method signatures diverge.

What it helps with

  • Write server handlers to debit player balances using Player.Functions.RemoveMoney with explicit reason parameters
  • Pass server data to client scripts using QBCore.Functions.CreateCallback instead of paired net events
  • Add safety nil-checks for Player references and sanitize client arguments before touching inventory
  • Update character jobs, duty status, gangs, and metadata safely through server-side methods

Example prompts for the agent

  • Write a server-side store script for qb-core that validates prices, checks for nil Player, and uses RemoveMoney with a reason.
  • Register a QBCore.Functions.CreateCallback on the server to return character balance to the client before opening an ATM UI.
  • Build a client-side interaction script using ox_lib that reads job information from QBCore.PlayerData.

How to install qbcore-framework

1Skills CLI (Vercel)

npx skills add germanfndez/fiveai-skills --skill qbcore-framework -a claude-code

2Manually: put the files in place

~/.claude/skills/qbcore-framework/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/qbcore-framework/

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

Questions about qbcore-framework

How do I install qbcore-framework in Claude Code?

Run npx skills add germanfndez/fiveai-skills --skill qbcore-framework -a claude-code. The file will be written to ~/.claude/skills/qbcore-framework/SKILL.md.

Does this skill support Qbox projects?

No, it targets qb-core directly. If your project uses qbx_core, exports and function signatures diverge, so these instructions should not be used blindly.

Why are money and inventory calls restricted to the server?

The Player object only exists on the server via QBCore.Functions.GetPlayer(source). Running mutations on the server prevents clients from tampering with amounts and items.

Source text

SKILL.md · MIT
---
name: qbcore-framework
description: "Trigger: QBCore, qb-core, Player object, PlayerData, QBCore.Functions.GetPlayer, Player.Functions, QBCore callbacks, jobs, gangs, economy. Build qb-core resources with player methods, callbacks and events."
license: MIT
metadata:
  author: germanfndez
  version: "1.0.0"
---

# QBCore Framework

Server/client API for qb-core: Player object, PlayerData, callbacks, jobs, gangs, money and metadata.

## Activation Contract

Load this skill when the user creates or edits a qb-core resource, touches `Player` / `QBCore.PlayerData`, needs jobs, gangs, money, items or metadata through QBCore, or asks about QBCore callbacks, events or best practices.

This skill targets qb-core (qbcore-framework). If the user is on Qbox (`qbx_core`, `exports.qbx_core`), the APIs diverge: state it and do not apply this skill blindly.

## Hard Rules

- Acquire the core once with `local QBCore = exports['qb-core']:GetCoreObject()`; never call it inside every function.
- `Player` exists on the SERVER only (`QBCore.Functions.GetPlayer(source)`). `QBCore.PlayerData` exists on the CLIENT only, populated after `QBCore:Client:OnPlayerLoaded`.
- Always nil-check: `if not Player then return end` before calling any method.
- Money, jobs, gangs, items and metadata are mutated on the server through `Player.Functions.*`, never from the client.
- Pass a `reason` to `AddMoney`, `RemoveMoney`, `SetMoney`.
- Use state bags OR events for a given piece of state, never both.
- Validate every client-supplied argument on the server; never trust amounts, prices or item names sent by the client.
- Prefer ox_lib for notifications, menus, dialogs and progress bars.
- Use dynamic `Wait()` values in loops; avoid `Wait(0)` unless per-frame work is required.

## Decision Gates

| Need | Use |
|---|---|
| Client asks server for data | `QBCore.Functions.CreateCallback` + `QBCore.Functions.TriggerCallback` |
| Money | `Player.Functions.AddMoney/RemoveMoney/SetMoney/GetMoney(moneyType, ...)` |
| Job / duty / gang | `Player.Functions.SetJob`, `SetJobDuty`, `SetGang` |
| Persistent per-player flags | `Player.Functions.SetMetaData` / `GetMetaData` |
| Items (qb-inventory) | `Player.Functions.AddItem/RemoveItem/GetItemByName/GetItemBySlot` |
| Shared runtime state | state bags (see rules/core-concepts.md) |

## Execution Steps

1. Confirm `qb-core` starts before the resource; cache `QBCore` per side.
2. Decide the side: mutation and validation on server, display on client.
3. Fetch `Player`, nil-check, then validate every client-supplied argument.
4. Pick the call from Decision Gates; read the matching rules file for signatures.
5. Return data via callbacks, not paired events.

## Output Contract

Return runnable Lua with the client/server split explicit, `Player` nil-checked, and reasons on money operations. Use ox_lib for UI unless the user asks otherwise.

## References

- rules/core-concepts.md — architecture, PlayerData, Player object, events, state bags.
- rules/player-methods.md — Player.Functions money, job, gang, metadata, items.
- rules/best-practices.md — naming, caching, waits, state management, security.
- rules/reference-links.md — official QBCore documentation links.

Upstream docs: https://docs.qbcore.org

© germanfndez · MIT · germanfndez/fiveai-skills

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set12

The whole set →
fivem-basics fivem-basics — a FiveM Lua skill that lays out a resource across client, server and shared, writes the manifest and wires the sides with events and exports. CX Codex +1 509installs 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 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 oxlib This Claude Code skill helps write Lua code with ox_lib in FiveM resources. It activates for UI, zones, commands, and client-server requests. CX Codex +1 117installs 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

Project sponsors

Companies that keep this analytics open