# drizzle-queries

The drizzle-queries Claude Code skill guides type-safe Postgres queries with Drizzle ORM. It activates for database reads, mutations, and new table work.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 103 installs · ★ 23 repo stars
- Author: andrelandgraf
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/andrelandgraf/fullstackrecipes/tree/HEAD/skills/drizzle-queries/SKILL.md
- Updated: 2026-06-08
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/drizzle-queries

## What it does

The skill shows how to read and change Postgres records with Drizzle ORM, including filtering results, sorting them, and inserting or removing rows. For related records, it uses Drizzle’s relational query API rather than hand-written joins.

For a new table, it covers defining the schema, adding it to the shared client, and running `bun run db:generate` followed by `bun run db:migrate`. Complete the Neon + Drizzle Setup recipe first.

## Requirements
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill drizzle-queries -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/drizzle-queries/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/drizzle-queries/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill drizzle-queries -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/drizzle-queries/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill drizzle-queries -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/drizzle-queries/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install andrelandgraf/fullstackrecipes skills/drizzle-queries
```

2. **Manually: put the files in place**
- File: `.github/skills/drizzle-queries/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill drizzle-queries -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/andrelandgraf/fullstackrecipes --path skills/drizzle-queries
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/drizzle-queries/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill drizzle-queries -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/andrelandgraf/fullstackrecipes/tree/HEAD/skills/drizzle-queries/SKILL.md

## When to use it
- filter and sort rows from a Postgres table
- insert, update, or delete database records
- fetch related records in a relational query
- add a table schema and run its migration

## Example prompts
- Write a query that finds a user's records and sorts them by creation date.
- Insert a row and return the created record.
- Add a products table, register its schema with the client, and prepare the migration.

## Similar
- [drizzle-orm](https://affpapa.org/en/nevibecode/skills/drizzle-orm.md) — skill · 1100 installs
- [drizzle-orm-patterns](https://affpapa.org/en/nevibecode/skills/drizzle-orm-patterns.md) — skill · 5900 installs
- [drizzle-orm-expert](https://affpapa.org/en/nevibecode/skills/drizzle-orm-expert.md) — skill · 83 installs
- [sql-queries](https://affpapa.org/en/nevibecode/skills/sql-queries.md) — skill · 4700 installs
- [drizzle](https://affpapa.org/en/nevibecode/skills/drizzle.md) — skill · 1900 installs
- [netlify-database](https://affpapa.org/en/nevibecode/skills/netlify-database.md) — skill · 3300 installs

From the same set: [andrelandgraf/fullstackrecipes](https://affpapa.org/en/nevibecode/by/andrelandgraf/fullstackrecipes.md) — 9 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
