kysely-writes-transactions

Installation
SKILL.md

Kysely Writes & Transactions

Decision Tree

Need Pattern
Single insert insertInto().values().execute()
Insert + return row .returningAll().executeTakeFirstOrThrow() (PG/SQLite)
Bulk insert .values([...])
Insert from select .columns([...]).expression(selectQuery)
Upsert (PG/SQLite) .onConflict(oc => oc.column().doUpdateSet())
Upsert (MySQL) .onDuplicateKeyUpdate({...})
Ignore conflict .onConflict(oc => oc.column().doNothing())
MERGE .mergeInto().using().whenMatched().thenUpdateSet()
Update updateTable().set().where().execute()
Delete deleteFrom().where().execute()
Transaction (auto) db.transaction().execute(async trx => {})
Transaction (manual) db.startTransaction().execute()
Pin connection db.connection().execute(async db => {})
Installs
5
GitHub Stars
1
First Seen
Mar 18, 2026
kysely-writes-transactions — saliagadotcom/skills