用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/johnalbertini14-glitch/openclaw-skills --skill prisma命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use this skill to create a Polymarket wallet for your agent and trade on prediction markets. Browse markets, place bets, manage positions — all without exposing private keys.
ClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup for additional security skills.
Automated daily security audits for OpenClaw agents with email reporting. Runs deep audits and sends formatted reports.
基于 SOC 职业分类
正在显示 SKILL.md
| name | Prisma |
| description | Write efficient Prisma queries, design schemas, and avoid common ORM pitfalls. |
| metadata | {"category":"database","skills":["prisma","orm","database","typescript","nodejs"]} |
@default(cuid()) over @default(uuid()) for IDs—shorter, URL-safe, still unique@updatedAt doesn't update on nested writes—must touch parent record explicitly@unique on nullable field allows multiple NULLs—intended behavior but often surprisingfindUniqueOrThrow / findFirstOrThrow—cleaner than null check after findUniquecreateMany skips hooks and returns count only—use create in loop if you need records backupsert requires unique field in where—can't upsert on non-unique compound conditionsconnectOrCreate in nested writes—avoids separate existence checkselect and include are mutually exclusive—can't mix; use nested select inside includeinclude everything you'll access—check logs for unexpected queriesfindMany + include better than loop of findUnique—single query vs N queries$transaction([]) array syntax rolls back all on any failure—use for atomic operations$transaction(async (tx) => {}) hold connection—keep short$transaction doesn't retry on conflict—implement retry logic for optimistic lockinginclude result type doesn't narrow—TypeScript thinks relations might be undefinedunknown[]—need manual type assertion or Prisma.$queryRawJsonValue—cast needed; consider using typed JSON librariesPrisma.validator for reusable query fragments with correct types$executeRaw is count—not the affected rowsprisma db push for prototyping—prisma migrate dev for version controldb push can drop data silently—never use in productionmigrate dev—needs create permission or separate DB@map to keep datafindMany without take can return millions—always paginatecount() scans table—expensive on large tables; consider approximate or cached countsinclude with large relations loads everything—use cursor pagination for big lists_count: { select: { posts: true } }—single query, not N+1orderBy on non-indexed field = slow—ensure indexes match sort patterns$queryRaw for reads, $executeRaw for writes—different return typesPrisma.sql template for safe interpolation—never string concatenation$queryRawUnsafe exists but name is a warning—use only for dynamic column names@map usedconnection_limit in URL?pool_timeout=0—prevents connection exhaustion$disconnect() in scripts and tests—lambda/serverless should manage differentlydelete, convert to update—but deleteMany needs handling$use captures all queries—but adds latency to every operationinclude in middleware—transform happens before middlewareawait—Prisma returns promises; queries don't execute without awaitupdate without where = error—unlike some ORMs, Prisma requires explicit where@relation names must match—cryptic error if they don'tprisma migrate deploy in CI