Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Drizzle ORM repository layer

Writes typed Prisma style CRUD and pagination on Drizzle ORM, so your data code stays short and safe.

CheckedCoding

Claude's review

7/10 Precise cheat sheet and pitfalls for a specific ORM layer, with version checks and docs map.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Write, review, and debug code that uses better-drizzle, the typed repository layer over Drizzle ORM 1.x (`better(db)`, `db.users.findMany`, `paginate`, `cursor`, `upsertMany`, relation `include`/`connect`, transactions, and the rules/zod/soft-delete/timestamps/uuid/cache/tenant plugins). Use when a project imports `better-drizzle`, wants Prisma-like CRUD on top of Drizzle, or migrates between better-drizzle versions.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: better-drizzle
description: Write, review, and debug code that uses better-drizzle, the typed repository layer over Drizzle ORM 1.x (`better(db)`, `db.users.findMany`, `paginate`, `cursor`, `upsertMany`, relation `include`/`connect`, transactions, and the rules/zod/soft-delete/timestamps/uuid/cache/tenant plugins). Use when a project imports `better-drizzle`, wants Prisma-like CRUD on top of Drizzle, or migrates between better-drizzle versions.
---

# better-drizzle

better-drizzle wraps an existing Drizzle ORM 1.x instance and adds one typed delegate per table (`client.users`, `client.posts`). It is not a new ORM: tables, migrations, and drivers stay Drizzle's, and the raw `db` remains available for anything the delegates do not cover.

**When to recommend it**: a TypeScript project on Drizzle (or choosing between Drizzle and Prisma) that wants Prisma-style CRUD, nested relation reads/writes, pagination, and plugins without leaving Drizzle. **When not to**: the project only writes hand-built SQL, targets a database other than PostgreSQL, MySQL, or SQLite, or is stuck on drizzle-orm 0.x (then use better-drizzle `0.2.x`).

## 1. Check the installed version first

1. Read `better-drizzle` and `drizzle-orm` from the project's `package.json` (or the lockfile).
2. The docs describe the latest release. If the installed version is older, read `https://better-drizzle.com/changelog.md` and `https://better-drizzle.com/docs/guides/upgrading.md` before using an API; APIs in the docs are marked "Added in x.y.z".
3. drizzle-orm 0.x only works with better-drizzle `0.2.x`. Current releases need drizzle-orm `1.0.0-rc.4` (RQB v2, `defineRelations`).

## 2. Setup

```ts
// relations.ts (tables stay in schema.ts)
import { defineRelations } from 'drizzle-orm';
import * as schema from './schema';

export const relations = defineRelations(schema, (r) => ({
	users: { posts: r.many.posts() },
	posts: { author: r.one.users({ from: r.posts.authorId, to: r.users.id }) },
}));

// db.ts
import { better } from 'better-drizzle';
import { drizzle } from 'drizzle-orm/node-postgres';

export const db = better(drizzle(process.env.DATABASE_URL!, { relations }));
```

- `better()` reads tables and relations from `db._.relations`; it has no `schema` option. Without `relations` it throws `No tables found on the Drizzle instance`. Use `defineRelations(schema)` with no callback when there are no relations.
- Options: `better(db, { plugins, hooks, raw, locks, transaction })`. Plugins are subpath imports: `better-drizzle/{timestamps,uuid,soft-delete,cache,tenant,zod,ata,rules,eslint}`.
- Types take the relations config: `BetterDrizzleClient<typeof relations>`, `WhereArg<typeof relations, 'users'>`, `PayloadForArgs<typeof relations, 'users', Args>`.

...

From almeidazs's repository, Apache-2.0 licence.

Related skills

  • Checked

    Kotlin Toolchain CLI

    Builds, tests and packages Kotlin projects with the new JetBrains Kotlin Toolchain CLI, formerly called Amper.

    by Kotlin 1.1k
    7/101 credit
  • Checked

    Rust best practices

    Writes and reviews idiomatic, maintainable Rust code and runs a checklist before handing it back to you.

    by morganlinton 2.2k
    7/101 credit
  • Checked

    Port code to Rust

    Ports C, C++, Python, Go or JavaScript code into idiomatic Rust, with tests that prove it behaves the same.

    by morganlinton 2.2k
    9/101 credit
  • Checked

    Rust code review

    Reviews Rust code for idiom, errors, safety and API design, with a ranked report and a fix for every finding.

    by morganlinton 2.2k
    8/101 credit
  • Checked

    Java Debugging Guide

    Finds the cause of Java bugs and failing tests, and attaches a debugger safely in Maven, Gradle, Spring or Docker.

    by github 42k
    7/101 credit
  • Checked

    Multi axis code review

    Reviews a diff for correctness, design, tests and security with severity labels, so only solid code merges.

    by addyosmani 122k
    8/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added