ox-target: skill de FiveM para Cursor, VS Code e Claude Code

Ver no skills.sh

Trigger: ox_target, third-eye, targeting, interaction zone, qb-target migration. Add targetable entities, models, players and zones with exports.ox_target.

Não quer gerenciar as skills por conta própria? Obtenha o app completo.

Como instalar esta skill

Baixe o zip, descompacte e coloque a pasta onde a sua ferramenta carrega skills ou regras. O caminho exato depende da ferramenta:

Claude Code

Descompacte em .claude/skills/ox-target/ dentro do projeto (a pasta precisa conter SKILL.md). Para todos os projetos, use ~/.claude/skills/ox-target/.

Documentação de skills do Claude Code

Cursor

O Cursor carrega as regras do projeto de .cursor/rules/. Adicione ali um arquivo de regra apontando para a skill descompactada, ou cole o conteúdo do SKILL.md e dos arquivos de regras em uma regra. O formato é .mdc com frontmatter e muda entre versões, então confira a documentação da sua versão.

Documentação de regras do Cursor

VS Code / Copilot

O Copilot lê arquivos de instruções em .github/instructions/*.instructions.md. Copie o SKILL.md para lá com um glob applyTo para os seus arquivos Lua e mantenha os arquivos de regras ao lado.

Documentação de instruções do VS Code

O arquivo SKILL.md

Este é o arquivo que o seu assistente de IA lê. Ele aponta para os arquivos de regras incluídos no download.

Conteúdo da skill (inclui SKILL.md e quaisquer outros arquivos)

O conteúdo da skill está em inglês: é documentação técnica feita para agentes de IA.

ox_target

Third-eye targeting for FiveM. Replaces qb-target and bt-target. Supports ox_core, esx and qbx_core.

Activation Contract

Load this skill when the user asks to make something interactable: "press E on this ped", "third eye", "target option", "add an interaction to this vehicle/door/prop", or when migrating from qb-target.

Hard Rules

  • Call every function through exports.ox_target:<fn>(...). There is no global ox_target table.
  • onSelect runs on the CLIENT. Never trust its arguments server-side: re-validate in the serverEvent handler.
  • Always pass name on an option you intend to remove later. Removal is by name, not by index.
  • distance defaults to the resource default; set it explicitly for anything above ~2.5m.
  • Zone and entity functions are CLIENT-side only.
  • Prefer addLocalEntity for entities you spawned yourself; use addEntity only for networked entities and expect the id to change on respawn.

Decision Gates

Target Function
One entity you spawned locally addLocalEntity(entities, options)
A networked entity (net id) addEntity(entities, options)
Every instance of a model addModel(models, options)
Every ped / vehicle / object / player addGlobalPed / addGlobalVehicle / addGlobalObject / addGlobalPlayer
Everything, no filter addGlobalOption(options)
A location, not an entity addBoxZone / addSphereZone / addPolyZone

Execution Steps

  1. Confirm ox_target is started AFTER ox_lib in server.cfg.
  2. Pick the function from the Decision Gates table.
  3. Build the options array. Read rules/options.md for every allowed field.
  4. Gate visibility with groups, items or canInteract rather than checking inside onSelect.
  5. Route the action: onSelect for client logic, serverEvent for anything that grants money, items or state.
  6. Store the returned zone id if the zone must be removed later.

Output Contract

Return runnable Lua using exports.ox_target. Include the fxmanifest.lua dependency lines when the resource is new. Never emit qb-target syntax.

References

  • rules/setup.md — install, fxmanifest, convars, framework support.
  • rules/options.md — every field of the option table.
  • rules/entities.md — entity, model and global targets.
  • rules/zones.md — box, sphere and poly zones.
  • rules/migration.md — qb-target to ox_target.

Upstream docs: https://overextended.dev/ox_target

Mais skills