Using MySQL from a TypeScript Agent
SkillDatabases & dataLets your agent connect to a MySQL database and run SQL queries from TypeScript code.
Use Using MySQL from a TypeScript Agent in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Using MySQL from a TypeScript Agent and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Using MySQL from a TypeScript Agent skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Using golem:rdbms/mysql from a TypeScript Golem agent. Use when the user asks to connect to MySQL, run SQL, or use MySQL from TypeScript agent code.
What this skill tells your AI
The instructions your AI receives, as published by golemcloud/golem in golem-skills/skills/ts/golem-add-mysql-ts/SKILL.md and read by ahel’s review.
The TypeScript SDK ships a typed MySQL helper built on the
golem:rdbms/mysql@1.5.0 host interface. Every operation returns a Promise and
throws a typed MySqlError on failure.
Imports
import { MySql } from "@golemcloud/golem-ts-sdk";
MySql.open(url, options?)— open a connection.MySql.*— explicit rich-type parameter wrappers (MySql.varchar,MySql.int,MySql.decimal, …).
Open a Connection
const conn = await MySql.open("mysql://user:password@localhost:3306/app");
Query Data
MySQL placeholders use ?. Plain JS values are encoded automatically
(string → varchar, integer → int/bigint, etc.); wrap a value in a MySql.*
helper to pin an exact type. Rows come back as decoded { columnName: value }
records.
const result = await conn.query("SELECT ? AS message", ["hello"]);
const message = result.rows[0]?.message as string;
Execute Statements
execute returns the number of affected rows.
const affected = await conn.execute("INSERT INTO notes (id, body) VALUES (?, ?)", [
1,
"hello",
]);
Transactions
Run a block inside a transaction — it commits on success and rolls back if the callback throws:
await conn.transaction(async (tx) => {
tx.execute("UPDATE notes SET body = ? WHERE id = ?", ["updated", 1]);
});
Or drive it manually with begin() / commit() / rollback():
const tx = await conn.begin();
tx.execute("UPDATE notes SET body = ? WHERE id = ?", ["updated", 1]);
await tx.commit();
Signals
- GitHub stars
- 2k
- Forks
- 209
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
golem-add-mysql-ts- Source
- github.com/golemcloud/golem
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptmysql-patterns
Skill · affaan-m
The pick for MySQLmysql
Skill · ericrisco
The pick for MySQLsupabase
Skill · supabase
More in Databases & dataconnect
Skill · composiohq
More in Databases & data