kysely-converter

Convert raw SQL queries into type-safe Kysely TypeScript code.

18|3|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/buYoung/skills --skill kysely-converter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kysely-converter
Source: https://github.com/buYoung/skills/tree/main/skills/kysely-converter
Command: npx skills add https://github.com/buYoung/skills --skill kysely-converter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Converts raw SQL queries into type-safe Kysely TypeScript code, enabling safer, more maintainable query construction.

Core Features & Use Cases

  • SQL parsing and dialect-aware mapping to Kysely APIs
  • Supports SELECT, INSERT, UPDATE, DELETE with complex joins, subqueries, and window functions
  • Generates type-safe results and aligns with TS tooling for safer data access
  • Real-world use: convert a hand-written SQL query into reusable Kysely code to reduce runtime SQL errors and improve IDE-assisted development

Quick Start

Convert a given SQL query to idiomatic Kysely TypeScript code.

Frequently Asked Questions about kysely-converter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert raw SQL to type-safe Kysely TypeScript code?

To convert raw SQL to type-safe Kysely TypeScript code, you parse the SQL query and map it dialect-aware to Kysely APIs. This generates type-safe result shapes for safer data access and reduced runtime errors.

Does the Kysely query builder support complex joins and subqueries?

Yes, the Kysely query builder supports complex joins and subqueries. The conversion handles SELECT, INSERT, UPDATE, and DELETE patterns across PostgreSQL and MySQL, including mapping window functions to type-safe TypeScript code.

Can I convert PostgreSQL and MySQL dialects to Kysely APIs?

Yes, you can convert PostgreSQL and MySQL dialects to Kysely APIs. The process applies dialect-aware mapping to ensure the generated type-safe TypeScript code aligns correctly with your specific database syntax.

Why should I convert hand-written SQL to Kysely TypeScript code?

You should convert hand-written SQL to Kysely TypeScript code to reduce runtime SQL errors and improve maintainability. It generates type-safe results that align with TS tooling for safer, IDE-assisted data access development.

What are the limitations of converting SQL to Kysely for TypeScript?

Limitations of converting SQL to Kysely involve relying on accurate SQL parsing for complex queries. While it supports core patterns like joins and window functions, extremely dynamic or procedural SQL might not map cleanly to idiomatic Kysely code.