Kysely Query Architect

Community

Type-safe Kysely queries with best practices.

AuthorAdamAugustinsky
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill guides writing type-safe Kysely queries following project patterns, ensuring explicit column selection, type inference, and centralized query reuse across classes.

Core Features & Use Cases

  • Explicit columns: prefer .select([...]) over selectAll().
  • Type inference: let Kysely infer return types; avoid manual typings.
  • Query reuse across classes: inject and compose query classes for shared dashboards and modules.
  • Performance patterns: use CTEs, joins, and parallelization with Promise.all.

Quick Start

Create a new query class in @packages/db/src/queries/*.ts, e.g., SalesQueries, with a constructor taking a Kysely<Database> and implementing methods like getSales(organizationId) that return .execute() results.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Kysely Query Architect
Download link: https://github.com/AdamAugustinsky/a3-stack-kysely/archive/main.zip#kysely-query-architect

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.