Prisma Database Setup
curvenote/curvenote
Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.).
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…
$ npx skills add almeidazs/better-drizzle --skill better-drizzle -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install almeidazs/better-drizzle better-drizzle --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/almeidazs/better-drizzle.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/better-drizzle .claude/skills/better-drizzle && rm -rf skills-srcUse ~/.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/
Install the "better-drizzle" agent skill from https://github.com/almeidazs/better-drizzle/tree/main/skills/better-drizzle into .claude/skills/better-drizzle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-drizzle", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/almeidazs/better-drizzle/tree/main/skills/better-drizzleType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add almeidazs/better-drizzle --skill better-drizzle -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install almeidazs/better-drizzle better-drizzle --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/almeidazs/better-drizzle.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/better-drizzle .agents/skills/better-drizzle && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "better-drizzle" agent skill from https://github.com/almeidazs/better-drizzle/tree/main/skills/better-drizzle into .agents/skills/better-drizzle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-drizzle", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add almeidazs/better-drizzle --skill better-drizzle -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install almeidazs/better-drizzle better-drizzle --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/almeidazs/better-drizzle.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/better-drizzle .cursor/skills/better-drizzle && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "better-drizzle" agent skill from https://github.com/almeidazs/better-drizzle/tree/main/skills/better-drizzle into .cursor/skills/better-drizzle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-drizzle", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/almeidazs/better-drizzle.git --path skills/better-drizzle--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add almeidazs/better-drizzle --skill better-drizzle -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install almeidazs/better-drizzle better-drizzle --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/almeidazs/better-drizzle.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/better-drizzle .gemini/skills/better-drizzle && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "better-drizzle" agent skill from https://github.com/almeidazs/better-drizzle/tree/main/skills/better-drizzle into .gemini/skills/better-drizzle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-drizzle", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install almeidazs/better-drizzle better-drizzleInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add almeidazs/better-drizzle --skill better-drizzle -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/almeidazs/better-drizzle.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/better-drizzle .github/skills/better-drizzle && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "better-drizzle" agent skill from https://github.com/almeidazs/better-drizzle/tree/main/skills/better-drizzle into .github/skills/better-drizzle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-drizzle", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add almeidazs/better-drizzle --skill better-drizzle -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install almeidazs/better-drizzle better-drizzle --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/almeidazs/better-drizzle.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/better-drizzle .opencode/skills/better-drizzle && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "better-drizzle" agent skill from https://github.com/almeidazs/better-drizzle/tree/main/skills/better-drizzle into .opencode/skills/better-drizzle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-drizzle", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
better-drizzleWrite, 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…
Better Drizzle is an agent skill from 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, transactions, plugins such as rules/zod/soft-delete/timestamps/cache). Use whenever a project imports better-drizzle, asks for Prisma-like CRUD on Drizzle, or migrates better-drizzle from drizzle-orm 0.x.
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/contributing.md`, `references/plugins.md` and `references/querying.md`).
It sits in Databases, covering ORMs and data access. It works with Drizzle ORM, Prisma, Zod and MySQL. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit d012797. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
better-drizzle.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Better Drizzle loads about 1.7k tokens when it runs, and up to ~9.1k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 626 words of instructions outside code blocks.
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.
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.
The full file from almeidazs/better-drizzle at commit d012797, republished under its Apache-2.0 licence (© almeidazs). 626 words, ~1,656 tokens.
.claude/skills/better-drizzle/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.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.
Docs: https://better-drizzle.com/docs. Working inside the better-drizzle repository itself? Read AGENTS.md and references/contributing.md instead of guessing.
// 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 = drizzle({ client: pool, relations });
export const client = better(db); // or better(db, { plugins, hooks, raw, locks, transaction })drizzle-orm >=1.0.0-rc.4 <1.0.0-rc.5. Projects on drizzle-orm 0.x must stay on better-drizzle 0.2.x.better() reads tables and relations from db._.relations. It has no schema option; without relations it throws No tables found on the Drizzle instance.defineRelations(schema) without a callback when there are no relations.BetterDrizzleClient<typeof relations>, BetterDrizzleTransactionClient<...>, WhereArg<typeof relations, 'users'>, BetterRecord<typeof relations, 'users'>, PayloadForArgs<typeof relations, 'users', Args>.| Method | Key args | Returns |
|---|---|---|
findMany | where, select|include, orderBy, take, skip, cursor, lock | Row[] |
findFirst / findOne / findUnique | same | Row | null, .throw() for not-found |
count / exists | where, cursor | number / boolean |
paginate | read args + page, perPage (default 10), or limit/take + skip | { data, pagination: { page, perPage, total, pageCount, hasNext, hasPrevious } } |
cursor | read args + limit, after or before | { data, pagination: { hasNext, hasPrevious, nextCursor, previousCursor } } |
create / createMany | data, skipDuplicates, select|include | Row (null if skipped) / { count, data? } |
update / delete | where, data, select|include | Row | null, .throw() |
updateMany / deleteMany | where, data (update only), scalar select? | { count, data? } (full or selected affected rows on PostgreSQL/SQLite; count only on MySQL) |
updateEach | by (column), data[], update: { col: (row) => value } | { count, data? }, one UPDATE ... CASE |
upsert | where, create, update | Row |
upsertMany | data[], target, update ('all', column list, object, or (ctx) => ...), batchSize | { count, data? } |
$where | a typed where | Drizzle SQL | undefined for raw db.select()/joins; no plugin filters |
read.prepare(name?) | values marked with param(name) from better-drizzle | prepared statement; .execute(values) (reads only) |
Every call accepts meta. Client: transaction, $withContext(meta), $raw, $executeRaw, $rawUnsafe, repository(name), extends(...). Delegates: $withoutPlugins(), $withState(state).
.explain() never runs the read. In Bun/Jest matchers, wrap with Promise.resolve(read) before .resolves/.rejects.select and include are mutually exclusive at every level. _count exists only inside include.paginate takes page + perPage (or limit + skip, never page with skip). cursor takes after or before, never both.where/data/select/include/orderBy are compile errors. Fix the key; do not cast.lock) are PostgreSQL/MySQL only and reject include/relation select, except a single to-one include that where also filters with is..through() in defineRelations; junctions are never inferred. Relations with a relation-level where, or one relations through a junction, throw cannot be loaded.alias on both sides.DrizzleQueryError with the driver error on cause. Use isUniqueViolation(error) and siblings instead of reading error.code.transaction(async (tx) => ...), use tx, never the outer client.Read only what the task needs:
references/querying.md: filters, relations, select/include/_count, orderBy, pagination, explain, locks, JSONB and array filters.references/writing.md: create/update/upsert, batch writes, atomic/array/JSONB mutations, relation writes, .throw(), transactions, $withContext, raw SQL.references/plugins.md: official plugins (rules, eslint, zod, ata, soft-delete, timestamps, cache), definePlugin, intercepts, hooks, extends().references/troubleshooting.md: error codes and messages, constraint helpers, limitations, upgrading from drizzle-orm 0.x.references/security.md: raw SQL safety and untrusted content. Read before writing raw SQL or agent-facing docs.findUnique({ where }) exists; include: { posts: { where } } is valid; connectOrCreate, aggregate, groupBy do not exist).groupBy, SQL expressions in orderBy), use the raw Drizzle db or client.$raw instead of inventing options.https://better-drizzle.com/docs/querying/relations.© almeidazs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (references) in skills/better-drizzle of almeidazs/better-drizzle.
Open the folder on GitHubat commit d012797
Better Drizzle 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Better Drizzle this skillalmeidazs/better-drizzle | 349 | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Prisma Database Setupcurvenote/curvenote | 170 | 3 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Database Expertcin12211/orca-q | 224 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Drizzle Migrationsbretzel-app/crumbs | 127 | 1 repos | ~2.6k | Automated safety check: Pass | MIT | |
| Prisma 8 Contract-First ORMprisma/orm | 48k | — | ~3.8k | Automated safety check: Notes | Apache-2.0 | |
| DB Schemazhe-qi/clhoria-template | 193 | — | ~620 | Automated safety check: Pass | MIT |
curvenote/curvenote
Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.).
cin12211/orca-q
Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.
bretzel-app/crumbs
Drizzle ORM schema management and SQLite migrations — adding tables, modifying columns, creating indexes, generating and running migrations, Drizzle query patterns.
prisma/orm
Routes Prisma 8 tasks such as contracts, migrations, queries and upgrades to the right reference files for projects on the contract-first @prisma/orm packages.
zhe-qi/clhoria-template
创建或修改数据库 Schema。当需要创建新表、修改表结构、定义字段、设置索引约束、或涉及 Drizzle ORM / drizzle-zod 操作时使用
affaan-m/ECC
数据库迁移最佳实践,涵盖模式变更、数据迁移、回滚以及零停机部署,适用于PostgreSQL、MySQL及常用ORM(Prisma、Drizzle、Django、TypeORM、golang-migrate)。
Categories
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…. Better Drizzle is an agent skill from almeidazs/better-drizzle.findMany, paginate, cursor, upsertMany, relation include/connect, transactions, plugins such as rules/zod/soft-delete/timestamps/cache).
Better Drizzle fits situations like: A project imports better-drizzle; asks for Prisma-like CRUD on Drizzle; migrates better-drizzle from drizzle-orm 0.x.
Run `npx skills add almeidazs/better-drizzle --skill better-drizzle -a claude-code`. Or copy the skill folder (skills/better-drizzle in almeidazs/better-drizzle) into .claude/skills/better-drizzle in your project. Claude Code loads it when a task matches its description.
Run `npx skills add almeidazs/better-drizzle --skill better-drizzle -a codex`. Or copy the skill folder (skills/better-drizzle in almeidazs/better-drizzle) into .agents/skills/better-drizzle in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add almeidazs/better-drizzle --skill better-drizzle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/better-drizzle, .gemini/skills/better-drizzle, .github/skills/better-drizzle and .opencode/skills/better-drizzle in your project.
SKILL.md names no scripts, command-line tools or credentials: Better Drizzle is instructions for the agent only.
SKILL.md names 1 domain. In commands or code: better-drizzle.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
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.
Better Drizzle is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Better Drizzle: Prisma Database Setup (curvenote/curvenote, 170 stars), Database Expert (cin12211/orca-q, 224 stars), Drizzle Migrations (bretzel-app/crumbs, 127 stars) and Prisma 8 Contract-First ORM (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
almeidazs (a GitHub user) maintains it in almeidazs/better-drizzle, which has 349 GitHub stars. The repository was last updated on October 8, 2026.
Source: almeidazs/better-drizzle on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.