Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/stonegiantstudio/skillsnpx agentmods add skills/stonegiantstudio/skills/kysely-ormWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/stonegiantstudio/skills/kysely-orm)<a href="https://agentmods.dev/skills/stonegiantstudio/skills/kysely-orm"><img src="https://agentmods.dev/badge/skills/stonegiantstudio/skills/kysely-orm.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.05077 |
| Opus 5 | $0.00021 | $0.02538 |
| Sonnet 5 | $0.00008 | $0.01015 |
| Haiku 4.5 | $0.00004 | $0.00508 |
Grade A, and why
kysely-orm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 837 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kysely ORM
Type-safe TypeScript SQL query builder. This skill covers Kysely-specific patterns—for database-specific syntax (PostgreSQL, SQL Server, MySQL), see the corresponding database skills.
When to Use Kysely vs Drizzle
| Aspect | Kysely | Drizzle |
|---|---|---|
| Philosophy | Pure query builder with typing | Full ORM with schema-first approach |
| Migration tooling | Manual up/down functions | Auto-generated with drizzle-kit |
| Best for | Knex.js migrations, complex queries | New projects, integrated tooling |
| Nested queries | Built-in helpers (jsonArrayFrom) |
Manual grouping required |
| Learning curve | Familiar if you know SQL/Knex | ORM concepts required |
Choose Kysely when:
- Migrating from Knex.js
- You want SQL-like syntax with full type safety
- You need complex nested queries with JSON aggregation
- You prefer writing migrations manually
Project Setup
Installation
Use the project's package manager (detect from lock file: bun.lockb, pnpm-lock.yaml, yarn.lock, or package-lock.json).
# Core
<pkg> add kysely
# Database driver (choose one)
<pkg> add pg # PostgreSQL
<pkg> add mysql2 # MySQL
<pkg> add better-sqlite3 # SQLite
<pkg> add tedious # SQL Server
Database Instance
// db/index.ts
import { Kysely, PostgresDialect } from 'kysely';
import { Pool } from 'pg';
import { Database } from './types';
export const db = new Kysely<Database>({
dialect: new PostgresDialect({
pool: new Pool({
connectionString: process.env.DATABASE_URL,
}),
}),
});
// IMPORTANT: Call db.destroy() on app shutdown
process.on('SIGTERM', async () => {
await db.destroy();
});
SQL Server Setup
import { Kysely, MssqlDialect } from 'kysely';
import * as Tedious from 'tedious';
import * as Tarn from 'tarn';
export const db = new Kysely<Database>({
dialect: new MssqlDialect({
tarn: {
...Tarn,
options: {
min: 0,
max: 10,
},
},
tedious: {
...Tedious,
connectionFactory: () =>
new Tedious.Connection({
server: process.env.DB_HOST,
authentication: {
type: 'default',
options: {
userName: process.env.DB_USER,
password: process.env.DB_PASSWORD,
},
},
options: {
database: process.env.DB_NAME,
encrypt: true,
trustServerCertificate: true,
},
}),
},
}),
});
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 837 lines · 42 tokens per session scan A 17c910df2a35
kysely-orm is a skill published in the GitHub repository stonegiantstudio/skills (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 42 tokens to every session and 5,077 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
azure-cosmos-ts
Data plane SDK for Azure Cosmos DB NoSQL API operations — CRUD on documents, queries, bulk operations.
drizzle-orm
Guidelines for developing with Drizzle ORM, a lightweight type-safe TypeScript ORM with SQL-like syntax.
kysely
Guidelines for developing with Kysely, a type-safe TypeScript SQL query builder with autocompletion support.
drizzle-migrations
Drizzle ORM schema management and SQLite migrations — adding tables, modifying columns, creating indexes, generating and running migrations, Drizzle query patterns. NOT for Prisma, TypeORM, Sequelize, or raw SQL migration tools.
neo4j-driver-javascript-skill
Neo4j JavaScript/TypeScript Driver v6 — driver lifecycle, executeQuery, managed transactions (executeRead/executeWrite), session.run, Integer handling, JSON serialization, record access, async/await patterns, TypeScript types, error handling, and connection setup for Node.js and browser. Use when writing JS/TS code…
drizzle-orm-v0
Drizzle ORM for TypeScript — type-safe SQL queries, schema definitions, migrations, and relations. Use when building database layers in TypeScript applications.