Agent skill

Bun Drizzle Integration

by secondsky in secondsky/claude-skills

A skill your agent uses when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.

MITAuto-check passedDatabases

Install Bun Drizzle Integration

skills CLI
$ npx skills add secondsky/claude-skills --skill bun-drizzle-integration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills bun-drizzle-integration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/bun/skills/bun-drizzle-integration .claude/skills/bun-drizzle-integration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bun-drizzle-integration
GitHub stars
227
Token cost
~1.8k tokens
SKILL.md length
91 words
Files
1
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.

  • Integrating Drizzle ORM with Buns SQLite driver for type-safe schema definitions and migrations
  • SKILL.md covers Quick Start, Schema Definition, Database Setup and Configuration, plus 9 more sections
  • Calls bun
  • Tasks that involve ORMs and data access

What it does

Bun Drizzle Integration is an agent skill from secondsky/claude-skills. Use when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering ORMs and data access and Type safety. It works with SQLite and Drizzle ORM. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Integrating Drizzle ORM with Buns SQLite driver for type-safe schema definitions and migrations
  • Tasks that involve ORMs and data access
  • Tasks that involve Type safety

Example prompts

  • “/bun-drizzle-integration”

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bun Drizzle Integration loads about 1.8k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 91 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 91 words, ~1,766 tokens.

Download SKILL.mdSave it as .claude/skills/bun-drizzle-integration/SKILL.md (or your agent's skills folder).
name
bun-drizzle-integration
description
Use when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.
metadata.version
1.0.0
license
MIT

Bun Drizzle Integration

Drizzle ORM provides type-safe database access with Bun's SQLite driver.

Quick Start

bash
bun add drizzle-orm
bun add -D drizzle-kit

Schema Definition

typescript
// src/db/schema.ts
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";

export const users = sqliteTable("users", {
  id: integer("id").primaryKey({ autoIncrement: true }),
  name: text("name").notNull(),
  email: text("email").notNull().unique(),
  createdAt: integer("created_at", { mode: "timestamp" })
    .notNull()
    .default(sql`(unixepoch())`),
});

export const posts = sqliteTable("posts", {
  id: integer("id").primaryKey({ autoIncrement: true }),
  title: text("title").notNull(),
  content: text("content"),
  authorId: integer("author_id")
    .notNull()
    .references(() => users.id),
});

Database Setup

typescript
// src/db/index.ts
import { drizzle } from "drizzle-orm/bun-sqlite";
import { Database } from "bun:sqlite";
import * as schema from "./schema";

const sqlite = new Database("app.db");
export const db = drizzle(sqlite, { schema });

Configuration

typescript
// drizzle.config.ts
import type { Config } from "drizzle-kit";

export default {
  schema: "./src/db/schema.ts",
  out: "./drizzle",
  dialect: "sqlite",
  dbCredentials: {
    url: "./app.db",
  },
} satisfies Config;

Migrations

bash
# Generate migration
bun drizzle-kit generate

# Apply migrations
bun drizzle-kit migrate

# Push schema directly (dev only)
bun drizzle-kit push

# Open Drizzle Studio
bun drizzle-kit studio

CRUD Operations

Insert
typescript
import { db } from "./db";
import { users, posts } from "./db/schema";

// Single insert
const user = await db.insert(users).values({
  name: "Alice",
  email: "alice@example.com",
}).returning();

// Multiple insert
await db.insert(users).values([
  { name: "Bob", email: "bob@example.com" },
  { name: "Charlie", email: "charlie@example.com" },
]);

// Insert or ignore
await db.insert(users)
  .values({ name: "Alice", email: "alice@example.com" })
  .onConflictDoNothing();

// Upsert
await db.insert(users)
  .values({ name: "Alice", email: "alice@example.com" })
  .onConflictDoUpdate({
    target: users.email,
    set: { name: "Alice Updated" },
  });
Select
typescript
import { eq, gt, like, and, or, desc, asc } from "drizzle-orm";

// All rows
const allUsers = await db.select().from(users);

// With conditions
const activeUsers = await db
  .select()
  .from(users)
  .where(eq(users.status, "active"));

// Multiple conditions
const filtered = await db
  .select()
  .from(users)
  .where(and(
    gt(users.age, 18),
    like(users.name, "%Alice%")
  ));

// Specific columns
const names = await db
  .select({ name: users.name, email: users.email })
  .from(users);

// Order and limit
const topUsers = await db
  .select()
  .from(users)
  .orderBy(desc(users.createdAt))
  .limit(10);

// First result
const first = await db.query.users.findFirst({
  where: eq(users.id, 1),
});
Update
typescript
// Update with condition
await db
  .update(users)
  .set({ name: "Alice Updated" })
  .where(eq(users.id, 1));

// Update multiple fields
await db
  .update(users)
  .set({
    name: "New Name",
    updatedAt: new Date(),
  })
  .where(eq(users.email, "alice@example.com"));
Delete
typescript
// Delete with condition
await db.delete(users).where(eq(users.id, 1));

// Delete multiple
await db.delete(users).where(gt(users.createdAt, cutoffDate));

Relations

typescript
// schema.ts
import { relations } from "drizzle-orm";

export const usersRelations = relations(users, ({ many }) => ({
  posts: many(posts),
}));

export const postsRelations = relations(posts, ({ one }) => ({
  author: one(users, {
    fields: [posts.authorId],
    references: [users.id],
  }),
}));

// Query with relations
const usersWithPosts = await db.query.users.findMany({
  with: {
    posts: true,
  },
});

// Nested relations
const detailed = await db.query.users.findFirst({
  where: eq(users.id, 1),
  with: {
    posts: {
      with: {
        comments: true,
      },
    },
  },
});

Transactions

typescript
// Transaction
await db.transaction(async (tx) => {
  const [user] = await tx.insert(users)
    .values({ name: "Alice", email: "alice@example.com" })
    .returning();

  await tx.insert(posts).values({
    title: "First Post",
    authorId: user.id,
  });
});

// Rollback on error
await db.transaction(async (tx) => {
  await tx.insert(users).values({ name: "Bob" });

  if (someCondition) {
    tx.rollback(); // Throws to rollback
  }

  await tx.insert(posts).values({ ... });
});

Prepared Statements

typescript
// Create prepared statement
const getUserById = db
  .select()
  .from(users)
  .where(eq(users.id, sql.placeholder("id")))
  .prepare();

// Execute with parameter
const user = await getUserById.execute({ id: 1 });

// Reuse for performance
for (const id of userIds) {
  const user = await getUserById.execute({ id });
  processUser(user);
}

Raw SQL

typescript
import { sql } from "drizzle-orm";

// Raw query
const result = await db.run(sql`
  UPDATE users SET last_login = ${new Date()} WHERE id = ${userId}
`);

// In select
const users = await db.select({
  name: users.name,
  upperName: sql<string>`UPPER(${users.name})`,
}).from(users);

// Raw expressions in where
await db.select().from(users).where(
  sql`${users.age} > 18 AND ${users.status} = 'active'`
);

Column Types Reference

typescript
import {
  sqliteTable,
  text,
  integer,
  real,
  blob,
  numeric,
} from "drizzle-orm/sqlite-core";

const example = sqliteTable("example", {
  // Integer
  id: integer("id").primaryKey(),
  age: integer("age"),

  // Text
  name: text("name"),
  status: text("status", { enum: ["active", "inactive"] }),

  // Real (float)
  price: real("price"),

  // Blob
  data: blob("data", { mode: "buffer" }),

  // Boolean (stored as integer)
  active: integer("active", { mode: "boolean" }),

  // Timestamp (stored as integer)
  createdAt: integer("created_at", { mode: "timestamp" }),
  updatedMs: integer("updated_ms", { mode: "timestamp_ms" }),

  // JSON (stored as text)
  metadata: text("metadata", { mode: "json" }),
});

Common Errors

ErrorCauseFix
SQLITE_CONSTRAINTFK/unique violationCheck constraints
no such columnSchema mismatchRun migrations
Cannot find moduleMissing driverUse drizzle-orm/bun-sqlite
Type mismatchWrong column typeCheck schema definition

When to Load References

Load references/migrations.md when:

  • Complex migration scenarios
  • Migration squashing
  • Database seeding

Load references/performance.md when:

  • Query optimization
  • Indexing strategies
  • Connection pooling

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/bun/skills/bun-drizzle-integration of secondsky/claude-skills.

Open the folder on GitHubat commit 8837836

Compare with similar skills

Bun Drizzle Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bun Drizzle Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bun Drizzle Integration this skillsecondsky/claude-skills227—~1.8kAutomated safety check: PassMIT
Cloudflare D1alinaqi/maggy707—~4.1kAutomated safety check: PassMIT
Better Drizzlealmeidazs/better-drizzle347—~1.7kAutomated safety check: PassApache-2.0
Drizzle Migrationsbretzel-app/crumbs1271 repos~2.6kAutomated safety check: PassMIT
Drizzle Ormgrowupanand/ConvoForm1011 repos~2.7kAutomated safety check: PassApache-2.0
Drizzle Orm Expertdavila7/claude-code-templates32k3 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Cloudflare D1

    alinaqi/maggy

    Cloudflare D1 SQLite database with Workers, Drizzle ORM, migrations

    707 GitHub stars~4.1k tokensUpdated 14 days ago
    DatabasesAuto-check passed
  • Better Drizzle

    almeidazs/better-drizzle

    Write, review, and debug code that uses better-drizzle, the typed repository layer over Drizzle ORM 1.x (better(db), client.users.findMany, paginate, cursor, upsertMany, relation include/connect…

    347 GitHub stars~1.7k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Drizzle Migrations

    bretzel-app/crumbs

    Drizzle ORM schema management and SQLite migrations — adding tables, modifying columns, creating indexes, generating and running migrations, Drizzle query patterns.

    127 GitHub starsUsed in 1 repo~2.6k tokens
    DatabasesAuto-check passed
  • Drizzle Orm

    growupanand/ConvoForm

    Type-safe SQL ORM for TypeScript with zero runtime overhead. An agent skill from growupanand/ConvoForm.

    101 GitHub starsUsed in 1 repo~2.7k tokens
    DatabasesAuto-check passed
  • Drizzle Orm Expert

    davila7/claude-code-templates

    Expert in Drizzle ORM for TypeScript — schema design, relational queries, migrations, and serverless database integration.

    32k GitHub starsUsed in 3 repos~2.6k tokens
    DatabasesAuto-check passed
  • Drizzle Orm

    EpicenterHQ/epicenter

    Apply Drizzle ORM patterns for schemas, migrations, queries, branded types, and Postgres or D1 boundaries.

    4.8k GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 10 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 10 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 10 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 10 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 10 days ago
    Auto-check passed

Categories

Questions about Bun Drizzle Integration

What does Bun Drizzle Integration do?

A skill your agent uses when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations. Bun Drizzle Integration is an agent skill from secondsky/claude-skills. Use when integrating Drizzle ORM with Bun's SQLite driver for type-safe schema definitions and migrations.

When should I use Bun Drizzle Integration?

Bun Drizzle Integration fits situations like: integrating Drizzle ORM with Buns SQLite driver for type-safe schema definitions and migrations; tasks that involve ORMs and data access; tasks that involve Type safety.

How do I install Bun Drizzle Integration in Claude Code?

Run `npx skills add secondsky/claude-skills --skill bun-drizzle-integration -a claude-code`. Or copy the skill folder (plugins/bun/skills/bun-drizzle-integration in secondsky/claude-skills) into .claude/skills/bun-drizzle-integration in your project. Claude Code loads it when a task matches its description.

How do I install Bun Drizzle Integration in Codex?

Run `npx skills add secondsky/claude-skills --skill bun-drizzle-integration -a codex`. Or copy the skill folder (plugins/bun/skills/bun-drizzle-integration in secondsky/claude-skills) into .agents/skills/bun-drizzle-integration in your project. Codex loads it when a task matches its description.

Can I use Bun Drizzle Integration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill bun-drizzle-integration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bun-drizzle-integration, .gemini/skills/bun-drizzle-integration, .github/skills/bun-drizzle-integration and .opencode/skills/bun-drizzle-integration in your project.

What does Bun Drizzle Integration need to run?

Going by SKILL.md and its folder, Bun Drizzle Integration needs the command-line tools its instructions call (bun).

Does Bun Drizzle Integration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bun Drizzle Integration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bun Drizzle Integration use?

Bun Drizzle Integration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bun Drizzle Integration use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bun Drizzle Integration?

Skills that share tags, products or a category with Bun Drizzle Integration: Cloudflare D1 (alinaqi/maggy, 707 stars), Better Drizzle (almeidazs/better-drizzle, 347 stars), Drizzle Migrations (bretzel-app/crumbs, 127 stars) and Drizzle Orm (growupanand/ConvoForm, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bun Drizzle Integration?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.