{
  "schemaVersion": "1.0",
  "item": {
    "slug": "prisma",
    "name": "Prisma",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ivangdavila/prisma",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/prisma",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/prisma",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=prisma",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "prisma",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T05:14:31.722Z",
      "expiresAt": "2026-05-10T05:14:31.722Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=prisma",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=prisma",
        "contentDisposition": "attachment; filename=\"prisma-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "prisma"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/prisma"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/prisma",
    "agentPageUrl": "https://openagent3.xyz/skills/prisma/agent",
    "manifestUrl": "https://openagent3.xyz/skills/prisma/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/prisma/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Schema Design Traps",
        "body": "@default(cuid()) over @default(uuid()) for IDs—shorter, URL-safe, still unique\n@updatedAt doesn't update on nested writes—must touch parent record explicitly\nImplicit many-to-many creates join table you can't customize—use explicit for extra fields\n@unique on nullable field allows multiple NULLs—intended behavior but often surprising\nEnum changes require migration—can't add values without downtime unless using String"
      },
      {
        "title": "Query Patterns I Forget",
        "body": "findUniqueOrThrow / findFirstOrThrow—cleaner than null check after findUnique\ncreateMany skips hooks and returns count only—use create in loop if you need records back\nupsert requires unique field in where—can't upsert on non-unique compound conditions\nconnectOrCreate in nested writes—avoids separate existence check\nselect and include are mutually exclusive—can't mix; use nested select inside include"
      },
      {
        "title": "N+1 Query Prevention",
        "body": "Default queries don't include relations—every access triggers new query\ninclude everything you'll access—check logs for unexpected queries\nMiddleware can't see includes—adding includes in middleware doesn't help\nfindMany + include better than loop of findUnique—single query vs N queries\nDataloader pattern for GraphQL resolvers—Prisma doesn't batch automatically"
      },
      {
        "title": "Transaction Gotchas",
        "body": "$transaction([]) array syntax rolls back all on any failure—use for atomic operations\nInteractive transactions $transaction(async (tx) => {}) hold connection—keep short\nDefault 5s timeout on interactive transactions—increase for long operations\nNested writes are already transactional—don't wrap single create with relations in transaction\n$transaction doesn't retry on conflict—implement retry logic for optimistic locking"
      },
      {
        "title": "Type Safety Gaps",
        "body": "include result type doesn't narrow—TypeScript thinks relations might be undefined\nRaw queries return unknown[]—need manual type assertion or Prisma.$queryRaw<Type>\nJSON fields are JsonValue—cast needed; consider using typed JSON libraries\nPrisma.validator for reusable query fragments with correct types\nReturn types of $executeRaw is count—not the affected rows"
      },
      {
        "title": "Migration Issues",
        "body": "prisma db push for prototyping—prisma migrate dev for version control\ndb push can drop data silently—never use in production\nShadow database required for migrate dev—needs create permission or separate DB\nRenaming field = drop + create by default—use @map to keep data\nLarge table migrations lock table—consider running raw SQL with concurrent indexes"
      },
      {
        "title": "Performance Traps",
        "body": "findMany without take can return millions—always paginate\ncount() scans table—expensive on large tables; consider approximate or cached counts\ninclude with large relations loads everything—use cursor pagination for big lists\nRelation counts: _count: { select: { posts: true } }—single query, not N+1\norderBy on non-indexed field = slow—ensure indexes match sort patterns"
      },
      {
        "title": "Raw Query Patterns",
        "body": "$queryRaw for reads, $executeRaw for writes—different return types\nUse Prisma.sql template for safe interpolation—never string concatenation\nRaw queries bypass Prisma hooks and middleware—intentional but easy to forget\n$queryRawUnsafe exists but name is a warning—use only for dynamic column names\nRaw results use database column names—not Prisma field names if @map used"
      },
      {
        "title": "Connection Management",
        "body": "Default pool size 5—too low for production; set connection_limit in URL\nPlanetScale/serverless needs ?pool_timeout=0—prevents connection exhaustion\n$disconnect() in scripts and tests—lambda/serverless should manage differently\nPrisma Accelerate or Data Proxy for edge/serverless—direct DB connections don't scale"
      },
      {
        "title": "Middleware Patterns",
        "body": "Soft delete via middleware: intercept delete, convert to update—but deleteMany needs handling\nAudit logging: $use captures all queries—but adds latency to every operation\nMiddleware runs in order added—earlier middleware sees raw params\nCan't modify include in middleware—transform happens before middleware"
      },
      {
        "title": "Common Mistakes",
        "body": "Forgetting await—Prisma returns promises; queries don't execute without await\nupdate without where = error—unlike some ORMs, Prisma requires explicit where\nDecimal fields return strings—Prisma Decimal type, not JavaScript number\n@relation names must match—cryptic error if they don't\nSchema drift: production differs from migrations—run prisma migrate deploy in CI"
      }
    ],
    "body": "Schema Design Traps\n@default(cuid()) over @default(uuid()) for IDs—shorter, URL-safe, still unique\n@updatedAt doesn't update on nested writes—must touch parent record explicitly\nImplicit many-to-many creates join table you can't customize—use explicit for extra fields\n@unique on nullable field allows multiple NULLs—intended behavior but often surprising\nEnum changes require migration—can't add values without downtime unless using String\nQuery Patterns I Forget\nfindUniqueOrThrow / findFirstOrThrow—cleaner than null check after findUnique\ncreateMany skips hooks and returns count only—use create in loop if you need records back\nupsert requires unique field in where—can't upsert on non-unique compound conditions\nconnectOrCreate in nested writes—avoids separate existence check\nselect and include are mutually exclusive—can't mix; use nested select inside include\nN+1 Query Prevention\nDefault queries don't include relations—every access triggers new query\ninclude everything you'll access—check logs for unexpected queries\nMiddleware can't see includes—adding includes in middleware doesn't help\nfindMany + include better than loop of findUnique—single query vs N queries\nDataloader pattern for GraphQL resolvers—Prisma doesn't batch automatically\nTransaction Gotchas\n$transaction([]) array syntax rolls back all on any failure—use for atomic operations\nInteractive transactions $transaction(async (tx) => {}) hold connection—keep short\nDefault 5s timeout on interactive transactions—increase for long operations\nNested writes are already transactional—don't wrap single create with relations in transaction\n$transaction doesn't retry on conflict—implement retry logic for optimistic locking\nType Safety Gaps\ninclude result type doesn't narrow—TypeScript thinks relations might be undefined\nRaw queries return unknown[]—need manual type assertion or Prisma.$queryRaw<Type>\nJSON fields are JsonValue—cast needed; consider using typed JSON libraries\nPrisma.validator for reusable query fragments with correct types\nReturn types of $executeRaw is count—not the affected rows\nMigration Issues\nprisma db push for prototyping—prisma migrate dev for version control\ndb push can drop data silently—never use in production\nShadow database required for migrate dev—needs create permission or separate DB\nRenaming field = drop + create by default—use @map to keep data\nLarge table migrations lock table—consider running raw SQL with concurrent indexes\nPerformance Traps\nfindMany without take can return millions—always paginate\ncount() scans table—expensive on large tables; consider approximate or cached counts\ninclude with large relations loads everything—use cursor pagination for big lists\nRelation counts: _count: { select: { posts: true } }—single query, not N+1\norderBy on non-indexed field = slow—ensure indexes match sort patterns\nRaw Query Patterns\n$queryRaw for reads, $executeRaw for writes—different return types\nUse Prisma.sql template for safe interpolation—never string concatenation\nRaw queries bypass Prisma hooks and middleware—intentional but easy to forget\n$queryRawUnsafe exists but name is a warning—use only for dynamic column names\nRaw results use database column names—not Prisma field names if @map used\nConnection Management\nDefault pool size 5—too low for production; set connection_limit in URL\nPlanetScale/serverless needs ?pool_timeout=0—prevents connection exhaustion\n$disconnect() in scripts and tests—lambda/serverless should manage differently\nPrisma Accelerate or Data Proxy for edge/serverless—direct DB connections don't scale\nMiddleware Patterns\nSoft delete via middleware: intercept delete, convert to update—but deleteMany needs handling\nAudit logging: $use captures all queries—but adds latency to every operation\nMiddleware runs in order added—earlier middleware sees raw params\nCan't modify include in middleware—transform happens before middleware\nCommon Mistakes\nForgetting await—Prisma returns promises; queries don't execute without await\nupdate without where = error—unlike some ORMs, Prisma requires explicit where\nDecimal fields return strings—Prisma Decimal type, not JavaScript number\n@relation names must match—cryptic error if they don't\nSchema drift: production differs from migrations—run prisma migrate deploy in CI"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/prisma",
    "publisherUrl": "https://clawhub.ai/ivangdavila/prisma",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/prisma",
    "downloadUrl": "https://openagent3.xyz/downloads/prisma",
    "agentUrl": "https://openagent3.xyz/skills/prisma/agent",
    "manifestUrl": "https://openagent3.xyz/skills/prisma/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/prisma/agent.md"
  }
}