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
npx skills add germanfndez/fiveai-skills --skill qbcore-framework -a claude-codeWhat 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.RemoveMoneywith explicit reason parameters - Pass server data to client scripts using
QBCore.Functions.CreateCallbackinstead of paired net events - Add safety nil-checks for
Playerreferences 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-code2Manually: put the files in place
~/.claude/skills/qbcore-framework/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/qbcore-framework/
1Skills CLI (Vercel)
npx skills add germanfndez/fiveai-skills --skill qbcore-framework -a codex2Manually: put the files in place
.agents/skills/qbcore-framework/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add germanfndez/fiveai-skills --skill qbcore-framework -a cursor2Manually: put the files in place
.cursor/skills/qbcore-framework/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install germanfndez/fiveai-skills skills/qbcore-framework2Manually: put the files in place
.github/skills/qbcore-framework/SKILL.md1Skills CLI (Vercel)
npx skills add germanfndez/fiveai-skills --skill qbcore-framework -a gemini-cli2Platform CLI
gemini skills install https://github.com/germanfndez/fiveai-skills --path skills/qbcore-frameworkManually: put the files in place
.devin/skills/qbcore-framework/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add germanfndez/fiveai-skills --skill qbcore-framework -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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