Agent skill · Databases

drizzle

LobeHub Drizzle ORM schema and query style. Use for pgTable schemas, indexes, joins, inferred types, db.select/db.query, schema fields, foreign keys, junction tables, or postgres query patterns.

LobeHub80,937★ · +310/wk · 1 repos on radarProfile →
claude-codeNOASSERTION
Install
npx skills add lobehub/lobehub --skill drizzle --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 15 KB
Bundled scripts: none
Path: .agents/skills/drizzle/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 81,252 · +315 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Drizzle ORM Schema Style Guide > **Adding a Model or Repository?** Ship a sibling test in the same PR — every new > file under `packages/database/src/models/**` or `src/repositories/**` needs a > matching `__tests__/<name>.test.ts`. See the **testing** skill > (`.agents/skills/testing/references/db-model-test.md`) for the `getTestDB()` > integration pattern, user-isolation tests, the BM25 `describe.skipIf(!isServerDB)` > guard, and schema gotchas. CI's coverage patch gate won't reliably catch a brand-new > untested file, so this is on you. ## Configuration - Config: `drizzle.config.ts` - Schemas: `packages/database/src/schemas/` - Migrations: `packages/database/migrations/` - Dialect: `postgresql` with `strict: true` ## Helper Functions Location: `packages/database/src/schemas/_helpers.ts` - `timestamptz(name)`: Timestamp with timezone - `createdAt()`, `updatedAt()`, `accessedAt()`: Standard timestamp columns - `timestamps`: Object with all three for easy spread ## Naming Conventions - **Tables**: Plural snake\_case (`users`, `session_groups`) - **Columns**: snake\_case (`user_id`, `created_at`) - **New tables**: Check nearby existing tables before naming a new one. Preserve the

What's inside
Steps it walks through
  1. Configuration
  2. Helper Functions
  3. Naming Conventions
  4. Column Definitions
  5. Primary Keys
  6. Foreign Keys
  7. Timestamps
  8. Optional and Undefined Values
  9. Database Enums
  10. Field Descriptions
  11. JSONB Types
  12. Indexes
  13. Type Inference
  14. Example Pattern
More from lobehub
All skills →
About this skill
What does the drizzle skill do?

LobeHub Drizzle ORM schema and query style. Use for pgTable schemas, indexes, joins, inferred types, db.select/db.query, schema fields, foreign keys, junction tables, or postgres query patterns.

How do I install it?

Run `npx skills add lobehub/lobehub --skill drizzle --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From lobehub/lobehub, a repository with 81,252 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going