drizzle-orm-patterns
Build Type-Safe Drizzle ORM Apps
Database code often loses type safety when projects add migrations, relations, and raw SQL. This skill gives Claude and Codex practical Drizzle ORM patterns for PostgreSQL and edge deployments.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "drizzle-orm-patterns" from https://skillstore.io/skills/barnhardt-enterprises-inc-drizzle-orm-patterns.md and its manifest at https://skillstore.io/api/skills/barnhardt-enterprises-inc-drizzle-orm-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "drizzle-orm-patterns". Design a Drizzle schema for posts, authors, and comments.
Expected outcome:
- A normalized table plan with primary keys and foreign keys.
- Relation guidance for author to posts and post to comments.
- Type inference notes for inserts and query results.
Using "drizzle-orm-patterns". Review this migration that adds a required profile field.
Expected outcome:
- A staged migration sequence.
- Backfill and verification steps.
- Warnings about locks, defaults, and rollback limits.
Using "drizzle-orm-patterns". Find performance problems in these Drizzle queries.
Expected outcome:
- A list of likely N+1 and over-select patterns.
- Suggested joins, projections, and index changes.
- Notes on when caching or batching is appropriate.
Security Audit
SafeThe static analyzer produced many high-severity hits, but the reviewed evidence is documentation, ORM examples, or validator pattern strings rather than executable malicious behavior. No prompt injection, credential exfiltration, destructive automation, or covert network behavior was found in the provided static evidence.
Risk Factors
โ๏ธ External commands (50)
๐ Filesystem access (7)
๐ Env variables (50)
โก Contains scripts (7)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/barnhardt-enterprises-inc-drizzle-orm-patterns/audits/10?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/barnhardt-enterprises-inc-drizzle-orm-patterns?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/barnhardt-enterprises-inc-drizzle-orm-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/barnhardt-enterprises-inc-drizzle-orm-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/barnhardt-enterprises-inc-drizzle-orm-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
Barnhardt-Enterprises-Inc. (2026). drizzle-orm-patterns security audit report (audit version 10) [Author version unspecified]. Skillstore. https://skillstore.io/skills/barnhardt-enterprises-inc-drizzle-orm-patterns/audits/10BibTeX citation
@techreport{barnhardt-enterprises-inc-barnhardt-enterprises-inc-drizzle-orm-patterns-2026,
author = {Barnhardt-Enterprises-Inc},
title = {drizzle-orm-patterns security audit report (audit version 10)},
institution = {Skillstore},
year = {2026},
number = {10},
url = {https://skillstore.io/skills/barnhardt-enterprises-inc-drizzle-orm-patterns/audits/10},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "drizzle-orm-patterns security audit report (audit version 10)"
version: "unspecified"
type: report
authors:
- name: "Barnhardt-Enterprises-Inc"
date-released: "2026-07-09"
url: "https://skillstore.io/skills/barnhardt-enterprises-inc-drizzle-orm-patterns/audits/10"
identifiers:
- type: other
value: "skillstore:barnhardt-enterprises-inc-drizzle-orm-patterns:audit:10"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Create a Drizzle schema
Design tables, relations, indexes, and inferred TypeScript types for a PostgreSQL feature.
Review a migration plan
Check schema changes, backfills, and rollback steps before applying them to production.
Improve query performance
Refactor slow Drizzle queries with selected fields, joins, batching, indexes, and caching guidance.
Try These Prompts
Use the drizzle-orm-patterns skill to design a PostgreSQL Drizzle schema for users, organizations, and memberships. Include relations and inferred insert and select types.
Use the drizzle-orm-patterns skill to rewrite this Drizzle query so it avoids unsafe raw SQL, selects only needed fields, and keeps TypeScript inference clear.
Use the drizzle-orm-patterns skill to plan a zero-downtime migration that adds a non-null column, backfills existing rows, and includes verification steps.
Use the drizzle-orm-patterns skill to audit my Drizzle data layer for N+1 queries, unsafe SQL templates, transaction issues, and edge runtime compatibility.
Best Practices
- Prefer Drizzle query builders and placeholders before raw SQL fragments.
- Run migration plans in stages when changing existing production data.
- Select only required columns and verify indexes for frequent filters.
Avoid
- Do not paste real database URLs or Redis tokens into prompts or examples.
- Do not use raw SQL interpolation for untrusted values.
- Do not run generated migrations against production without review and backup planning.
Frequently Asked Questions
What does this skill help with?
Does it support databases other than PostgreSQL?
Can it run migrations for me?
Is it safe to include production secrets?
What tools can use this skill?
Can the validator catch every unsafe query?
Developer Details
Author
Barnhardt-Enterprises-IncLicense
MIT
Skillstore revision
r1
Version notice
The author did not declare a version.
Ref
7db9b9f06e0ab79c575b58bc48c4d8dc9849f424
Maintenance freshness
7/18/2026
Usage
6 downloads ยท 222 views
File structure
๐ common-mistakes.md
๐ edge-runtime.md
๐ migrations.md
๐ performance.md
๐ queries-complete.md
๐ README.md
๐ relations.md
๐ SKILL.md
๐ transactions.md
๐ type-inference.md
๐ validate-queries.py