← 返回 Skills 市场
1258
总下载
2
收藏
9
当前安装
1
版本数
在 OpenClaw 中安装
/install drizzle
功能描述
Build type-safe database queries with Drizzle ORM patterns.
使用说明 (SKILL.md)
Schema Definition
- Export every table from schema file — queries fail silently if table isn't exported
- Use
$inferSelectfor query return types,$inferInsertfor insert input — they differ (select has defaults filled, insert has optionals) - Define
relations()in a separate call, not inline with table — Drizzle separates schema from relations
Query Syntax Traps
- Conditions use functions, not objects:
where: eq(users.id, 5)notwhere: { id: 5 }— Prisma syntax doesn't work - Combine conditions with
and()/or():where: and(eq(users.active, true), gt(users.age, 18)) db.query.users.findMany()for relational queries withwith:,db.select().from(users)for SQL-like — mixing them causes type errors
Migrations
drizzle-kit pushis dev-only (destructive) — production needsdrizzle-kit generatethendrizzle-kit migrate- Schema changes require regenerating migrations — editing generated SQL breaks the migration hash
- Set
strict: truein drizzle.config.ts to catch schema drift before it hits production
Driver-Specific
- PostgreSQL: use
pgTable, imports fromdrizzle-orm/pg-core - MySQL: use
mysqlTable, imports fromdrizzle-orm/mysql-core - SQLite: use
sqliteTable, imports fromdrizzle-orm/sqlite-core - Mixing imports across drivers compiles but fails at runtime with cryptic errors
Performance
- Wrap multi-query operations in
db.transaction(async (tx) => {})— Drizzle doesn't auto-batch - Use
.prepare()for queries executed repeatedly — skips query building overhead - Add
.limit()to everyfindMany()/select()— no default limit means full table scans
Common Mistakes
- Forgetting
awaiton queries returns a Promise, not results — TypeScript doesn't catch this if you ignore the return returning()is required to get inserted/updated rows back — without it you get{ rowCount }only- JSON columns: PostgreSQL uses
jsonb(), MySQL usesjson()— wrong function = wrong serialization
安全使用建议
This is a documentation-only skill about Drizzle ORM and appears coherent. Before installing: ensure npx is available; do not let the agent run migration commands against production databases — migration commands (especially drizzle-kit push) can be destructive; be prepared to provide DB credentials when you actually run CLI commands (the skill itself doesn't request them); review any commands the agent proposes to execute and run them manually in a safe/dev environment first.
功能分析
Type: OpenClaw Skill
Name: drizzle
Version: 1.0.0
The provided files, `_meta.json` and `SKILL.md`, contain metadata and documentation for using Drizzle ORM. The `SKILL.md` file provides best practices and common pitfalls, and while it declares `npx` as a required binary in its metadata, it does not contain any instructions for malicious execution, prompt injection attempts, data exfiltration, or other harmful behaviors. The content is purely informative and aligns with the stated purpose of assisting with Drizzle ORM patterns.
能力评估
Purpose & Capability
Name/description align with content: SKILL.md contains Drizzle ORM patterns, migration notes, driver specifics and performance tips. Declaring npx as a required binary is appropriate for an npm-based CLI workflow.
Instruction Scope
The instructions are scoped to schema, queries, migrations and driver-specific behavior (expected for an ORM helper). They mention CLI commands (drizzle-kit push/generate/migrate) and config files (drizzle.config.ts, schema file). These are relevant, but the mention of destructive commands (drizzle-kit push) means an agent that actually executes these could alter or destroy databases — the doc itself warns about dev vs production, but exercising the skill in an environment with live DB credentials would be risky.
Install Mechanism
Instruction-only skill with no install spec and no code files. This is the lowest-risk install posture. Required binary npx is declared and appropriate.
Credentials
Skill declares no environment variables or credentials, which matches the guidance-only nature. Note: actual use of Drizzle CLI against a database will require DB connection credentials — the skill doesn't request them, but an agent using the skill may need them to run migrations or queries.
Persistence & Privilege
always is false and the skill doesn't request persistent system changes or modify other skills. Autonomous invocation is allowed (platform default) but not combined with other concerning privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install drizzle - 安装完成后,直接呼叫该 Skill 的名称或使用
/drizzle触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
常见问题
Drizzle 是什么?
Build type-safe database queries with Drizzle ORM patterns. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1258 次。
如何安装 Drizzle?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install drizzle」即可一键安装,无需额外配置。
Drizzle 是免费的吗?
是的,Drizzle 完全免费(开源免费),可自由下载、安装和使用。
Drizzle 支持哪些平台?
Drizzle 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 Drizzle?
由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.0。
推荐 Skills