renatoroessler/painel-clima/drizzle-orm
Claude Code and agent skill by renatoroessler/painel-clima
- community
Checking that the SKILL.md file is still in the repository.
Expert guide for Drizzle ORM best practices, including schema definitions, queries, mutations, transactions, migrations, and performance optimization. Use when working with Drizzle ORM, database schemas, queries, or migrations.
Install
npx vskill@latest install renatoroessler/painel-clima/drizzle-ormSKILL.md
The same SKILL.md was published earlier as renan-rmsantos-tech/financial-agent/drizzle-orm.
Drizzle ORM Developer Guide
This skill provides guidelines, patterns, and best practices for working with Drizzle ORM in this project.
Quick Start
For detailed development guidelines, patterns, and code examples, refer to references/patterns.md.
Core Philosophy
- Type-Safe by Default: Leverage TypeScript and Drizzle's type inference to catch database errors at compile time
- Performance First: Use prepared statements and query optimization techniques
- SQL Transparency: Keep SQL queries readable and avoid over-abstraction
- Minimal Overhead: Drizzle is a thin layer - use it accordingly without unnecessary complexity
Common Tasks
Schema Definition
Organize schemas by domain in separate files. Use fluent constraint chaining and add indexes for frequently queried columns.
Type Exports
Always export table types for use in your application:
Prepared Statements
Use prepared statements for frequently executed queries for extreme performance benefits:
Transactions
Use transactions for multi-step operations to maintain data consistency:
Migration Commands
CRITICAL: Always use package scripts for migrations. Never call drizzle-kit directly.
- Backend:
pnpm run db:generate(generates migration) - Backend:
pnpm run db:migrate(applies migrations) - Landing:
pnpm run db:generate(generates migration) - Landing:
pnpm run db:migrate(applies migrations)
Code Organization
Common Pitfalls to Avoid
- Missing Indexes: Always index columns used in WHERE, JOIN, and ORDER BY clauses
- Unbounded Queries: Always use
limit()andoffset()for user-facing queries - Unsafe Raw SQL: Never concatenate user input into raw SQL - use
sql.placeholder() - N+1 Queries: Use eager loading with
with()or batch queries - Missing Transactions: Wrap multi-step operations in transactions
Validation Checklist
Before finishing a task involving Drizzle ORM:
- [ ] Check schema definitions have proper indexes for queried columns
- [ ] Verify prepared statements are used for repeated queries
- [ ] Ensure transactions wrap multi-step operations
- [ ] Use package scripts for migrations (never call drizzle-kit directly)
- [ ] Run type checks (
pnpm run typecheck) and tests (pnpm run test)
For detailed rules and code examples, consult references/patterns.md.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbackend/.agents/skills/drizzle-orm/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/renatoroessler/painel-clima/drizzle-orm)