MCPInstall

oxmysql

Trigger: oxmysql, MySQL.query, MySQL.insert, MySQL.update, MySQL.single, MySQL.scalar, MySQL.prepare, MySQL.transaction, rawExecute, SQL, database, mysql-async. Write server-side SQL with oxmysql.

Installs
76
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/germanfndez/fiveai-skills --skill oxmysql
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads oxmysql automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

oxmysql

Server-side MySQL/MariaDB access for FiveM through the MySQL table (replacement for mysql-async and ghmattimysql).

Activation Contract

Load this skill when the user writes or edits database code in a FiveM resource: SELECT/INSERT/UPDATE/DELETE, upserts, transactions, MySQL.*, exports.oxmysql, or migrating from mysql-async.

Hard Rules

  • Server only. Add server_script '@oxmysql/lib/MySQL.lua' to fxmanifest.lua above other server scripts.
  • MySQL.Sync.* and MySQL.Async.* (mysql-async compatibility layer) are NOT available. Replace them with MySQL.query, MySQL.scalar, MySQL.single, MySQL.insert, MySQL.update, MySQL.prepare, MySQL.transaction, each with a .await variant.
  • @named placeholders are deprecated: use positional ? with an array of values. prepare accepts only ? (and ?? for column names).
  • Never concatenate user input into SQL; every value goes through a placeholder.
  • Every function takes (query, params, callback); use .await to yield instead of nesting callbacks.
  • Use transaction when several writes must succeed or fail together; it rolls back on any failure.
  • Use rawExecute only when the normalized result shape of query/prepare is insufficient.
  • Prefer MariaDB over MySQL 8 for compatibility.

Decision Gates

NeedCallReturns
Many rowsMySQL.query.await(sql, params)array of rows
One rowMySQL.single.await(sql, params)row or nil
One value (COUNT, one column)MySQL.scalar.await(sql, params)value or nil
InsertMySQL.insert.await(sql, params)insert id
Update / delete countMySQL.update.await(sql, params)affected rows
Hot path, repeated statementMySQL.prepare.await(sql, params)rows / value
Several statements atomicallyMySQL.transaction.await({ { query, values }, ... })success boolean
Raw, unnormalized resultMySQL.rawExecute.await(sql, params)raw result

Execution Steps

  1. Confirm the manifest line and that oxmysql starts before the resource.
  2. Pick the function by result shape from Decision Gates.
  3. Write the SQL with backticked identifiers and ? for every value.
  4. Wrap multi-statement writes in transaction.
  5. Handle nil results (single, scalar) before use.

Output Contract

Return runnable server-side Lua (or JS) using MySQL.<fn>.await with positional placeholders and no mysql-async syntax.

References

  • rules/placeholders.md — ? placeholders, deprecated @named.
  • rules/query.md — MySQL.query: rows or insertId/affectedRows.
  • rules/single.md — MySQL.single: one row or nil.
  • rules/scalar.md — MySQL.scalar: single value.
  • rules/insert.md — MySQL.insert: returns insert id.
  • rules/update.md — MySQL.update: returns affected rows.
  • rules/prepare.md — MySQL.prepare: prepared statements.
  • rules/transaction.md — MySQL.transaction: atomic multi-query.
  • rules/rawExecute.md — MySQL.rawExecute: raw result.

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

FAQ

What does the oxmysql skill do?

Trigger: oxmysql, MySQL.query, MySQL.insert, MySQL.update, MySQL.single, MySQL.scalar, MySQL.prepare, MySQL.transaction, rawExecute, SQL, database, mysql-async. Write server-side SQL with oxmysql.

How do I install oxmysql?

Run npx skills add https://github.com/germanfndez/fiveai-skills --skill oxmysql in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/oxmysql/ (personal) or .claude/skills/oxmysql/ (project).

Which AI agents can use oxmysql?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is oxmysql safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains oxmysql?

It is published by germanfndez in germanfndez/fiveai-skills. It has 76 recorded installs.

More from germanfndez/fiveai-skills

View all →

fivem-nui

germanfndez/fiveai-skills

Trigger: NUI, uipage, SendNUIMessage, SetNUIFocus, RegisterNUICallback, HTML/CSS/JS for FiveM, FiveM menu UI. Build FiveM NUI pages, wire Lua-browser messaging, callbacks and focus.

Frontend & Design573 installs

fivem-security

germanfndez/fiveai-skills

Trigger: security, anti-cheat, exploit, secure events, validate client data, server authority, distance check, rate limit, review server code. Harden FiveM net events and server-side validation.

Security494 installs

fivem-basics

germanfndez/fiveai-skills

Open the skill to read its SKILL.md instructions.

441 installs

lua-basics

germanfndez/fiveai-skills

Open the skill to read its SKILL.md instructions.

383 installs

fivemanage

germanfndez/fiveai-skills

Trigger: Fivemanage, fmsdk, takeImage, takeServerImage, uploadImage, Log, Info/Warn/Error, player screenshots, logs dashboard. Install and use the Fivemanage SDK for images and centralized logs.

Data & Databases329 installs

esx-framework

germanfndez/fiveai-skills

Trigger: ESX, esextended, xPlayer, PlayerData, ESX.GetPlayerFromId, ESX.RegisterServerCallback, ESX jobs, economy, inventory. Build ESX Legacy resources with server/client functions, xPlayer methods, callbacks and events.

Backend & APIs280 installs

Popular data & databases skills

View category →

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

OfficialData & Databases462.2K installs

prisma-client-api

prisma/skills

Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".

OfficialData & Databases393.5K installs

Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.

OfficialData & Databases392.3K installs

prisma-cli

prisma/skills

Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.

OfficialData & Databases390.8K installs

prisma-postgres

prisma/skills

Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.

OfficialData & Databases384.4K installs

Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.

OfficialData & Databases378.9K installs