If you're tired of ORMs abstracting away SQL or plain query strings losing type safety at runtime, this is the middle ground. You get full TypeScript inference from schema to results without the overhead of an ORM. Define your database types once, then chain selectFrom, where, and joins with complete autocomplete and compile-time checks. It includes migrations, works across Postgres, MySQL, and SQLite, and lets you drop into raw SQL when you need it. The kysely-codegen tool generates types directly from your existing database, so you're not manually syncing schemas. It's legitimately just a query builder that compiles to SQL, nothing more, which is exactly the point.
- skills.sh installs
- 398
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill kysely --agent claude-codeInstalls into .claude/skills of the current project.
Files
Kysely - Type-Safe SQL Query Builder
Overview
Kysely is a type-safe TypeScript SQL query builder that provides end-to-end type safety from database schema to query results. Unlike ORMs, it generates plain SQL and gives you full control while maintaining perfect TypeScript inference.
Key Features:
- Complete type inference (schema → queries → results)
- Zero runtime overhead (compiles to SQL)
- Database-agnostic (PostgreSQL, MySQL, SQLite, MSSQL)
- Migration system included
- Plugin ecosystem (CTEs, JSON, geospatial)
- Raw SQL integration when needed
Installation:
npm install kysely
# Database driver (choose one)
npm install pg # PostgreSQL
npm install mysql2 # MySQL
npm install better-sqlite3 # SQLite
Quick Start
1. Define Database Schema Types
import { Generated, Selectable, Insertable, Updateable } from 'kysely';
// Table interface (all columns)
interface UserTable {
id: Generated<number>;
email: string;
name: string | null;
created_at: Generated<Date>;
updated_at: Date;
}
Sponsors
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Category
- Databases
- First seen
- Jun 3, 2026
More from bobmatnyc/claude-mpm-skills
All 158- Kubernetes397
- Json Data Handling394
- Systematic Debugging391
- Vue390
- Api Documentation389
- Screenshot389
- Software Patterns382
- Nextjs V16380
- Vercel Deployments Builds378
- Security Scanning377
- Test Quality Inspector376
- Svelte5 Runes Static373
- Stacked Prs371
- Better Auth Core368
- Homebrew Formula Maintenance366
- Better Auth Integrations363
- Reporting Pipelines363
- Better Auth Plugins362
- Git Worktrees360
- Nextjs Core357
- Fastapi Local Dev356
- Vb Winforms356
- Headlessui355
- Jest Typescript354
