{
  "schemaVersion": "1.0",
  "item": {
    "slug": "instantdb",
    "name": "Instant DB",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/ubyjerome/instantdb",
    "canonicalUrl": "https://clawhub.ai/ubyjerome/instantdb",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/instantdb",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=instantdb",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "package.json",
      "scripts/instantdb.js",
      "references/query_syntax.md",
      "references/transactions.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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/instantdb"
    },
    "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/instantdb",
    "agentPageUrl": "https://openagent3.xyz/skills/instantdb/agent",
    "manifestUrl": "https://openagent3.xyz/skills/instantdb/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/instantdb/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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "Node.js integration for InstantDB enabling OpenClaw to perform admin operations and monitor real-time data changes via WebSocket subscriptions."
      },
      {
        "title": "Setup",
        "body": "Install dependencies:\n\nnpm install\n\nSet environment variables:\n\nexport INSTANTDB_APP_ID=\"your-app-id\"\nexport INSTANTDB_ADMIN_TOKEN=\"your-admin-token\""
      },
      {
        "title": "1. Query Data",
        "body": "Fetch data using InstantDB's query syntax:\n\nconst { InstantDBClient } = require('./scripts/instantdb.js');\n\nconst client = new InstantDBClient(appId, adminToken);\nconst result = await client.query({\n  tasks: {\n    $: {\n      where: { status: 'active' }\n    }\n  }\n});\n\nCLI:\n\n./scripts/instantdb.js query '{\"tasks\": {}}'"
      },
      {
        "title": "2. Create Entities",
        "body": "Add new entities to a namespace:\n\nconst { entityId, result } = await client.createEntity('tasks', {\n  title: 'Process data',\n  status: 'pending',\n  priority: 'high'\n});\n\nCLI:\n\n./scripts/instantdb.js create tasks '{\"title\": \"Process data\", \"status\": \"pending\"}'\n\nOptional entity ID:\n\n./scripts/instantdb.js create tasks '{\"title\": \"Task\"}' custom-entity-id"
      },
      {
        "title": "3. Update Entities",
        "body": "Modify existing entity attributes:\n\nawait client.updateEntity(entityId, 'tasks', {\n  status: 'completed'\n});\n\nCLI:\n\n./scripts/instantdb.js update <entity-id> tasks '{\"status\": \"completed\"}'"
      },
      {
        "title": "4. Delete Entities",
        "body": "Remove entities:\n\nawait client.deleteEntity(entityId, 'tasks');\n\nCLI:\n\n./scripts/instantdb.js delete <entity-id> tasks"
      },
      {
        "title": "5. Link Entities",
        "body": "Create relationships between entities:\n\nawait client.linkEntities(taskId, assigneeId, 'assignees');\n\nCLI:\n\n./scripts/instantdb.js link <parent-id> <child-id> assignees"
      },
      {
        "title": "6. Unlink Entities",
        "body": "Remove relationships:\n\nawait client.unlinkEntities(taskId, assigneeId, 'assignees');\n\nCLI:\n\n./scripts/instantdb.js unlink <parent-id> <child-id> assignees"
      },
      {
        "title": "7. Real-time Subscriptions",
        "body": "Monitor data changes via WebSocket:\n\nconst subscriptionId = client.subscribe(\n  { tasks: { $: { where: { status: 'active' } } } },\n  (data) => {\n    console.log('Data updated:', data);\n  },\n  (error) => {\n    console.error('Subscription error:', error);\n  }\n);\n\n// Later: client.unsubscribe(subscriptionId);\n\nCLI (listens for specified duration):\n\n./scripts/instantdb.js subscribe '{\"tasks\": {}}' 60  # Listen for 60 seconds"
      },
      {
        "title": "8. Transactions",
        "body": "Execute multiple operations atomically using the tx builder:\n\nconst { tx, id } = require('@instantdb/admin');\n\nawait client.transact([\n  tx.tasks[id()].update({ title: 'Task 1' }),\n  tx.tasks[id()].update({ title: 'Task 2' })\n]);\n\nCLI:\n\n./scripts/instantdb.js transact '[{\"op\": \"update\", \"id\": \"...\", \"data\": {...}}]'"
      },
      {
        "title": "Action Status Updates",
        "body": "Send real-time progress to human observers:\n\nconst { id } = require('@instantdb/admin');\n\n// Create status entity\nconst actionId = id();\nawait client.createEntity('actions', {\n  type: 'file_processing',\n  status: 'started',\n  progress: 0,\n  timestamp: Date.now()\n}, actionId);\n\n// Update progress\nawait client.updateEntity(actionId, 'actions', {\n  progress: 50,\n  status: 'processing'\n});\n\n// Mark complete\nawait client.updateEntity(actionId, 'actions', {\n  progress: 100,\n  status: 'completed'\n});"
      },
      {
        "title": "Multi-step Workflow Tracking",
        "body": "Track complex operations:\n\nconst { tx, id } = require('@instantdb/admin');\n\nconst workflowId = id();\nconst steps = ['Extract', 'Transform', 'Validate', 'Load', 'Verify'];\n\n// Initialize workflow with linked steps\nconst txs = [\n  tx.workflows[workflowId].update({\n    name: 'Data Pipeline',\n    status: 'running',\n    currentStep: 1,\n    totalSteps: steps.length\n  })\n];\n\nconst stepIds = steps.map((name, i) => {\n  const stepId = id();\n  txs.push(\n    tx.steps[stepId].update({\n      name,\n      order: i + 1,\n      status: 'pending'\n    }),\n    tx.workflows[workflowId].link({ steps: stepId })\n  );\n  return stepId;\n});\n\nawait client.transact(txs);\n\n// Update as steps complete\nfor (let i = 0; i < stepIds.length; i++) {\n  await client.updateEntity(stepIds[i], 'steps', { \n    status: 'completed' \n  });\n  await client.updateEntity(workflowId, 'workflows', { \n    currentStep: i + 2 \n  });\n}"
      },
      {
        "title": "Human Monitoring Pattern",
        "body": "Humans subscribe to watch OpenClaw's actions:\n\n// Human's frontend code\nimport { init } from '@instantdb/react';\n\nconst db = init({ appId });\n\nfunction ActionMonitor() {\n  const { data } = db.useQuery({\n    actions: {\n      $: {\n        where: { status: { in: ['started', 'processing'] } }\n      }\n    }\n  });\n  \n  return data?.actions?.map(action => (\n    <div key={action.id}>\n      {action.type}: {action.progress}%\n    </div>\n  ));\n}"
      },
      {
        "title": "Streaming Progress Updates",
        "body": "For long-running operations, stream updates:\n\nconst { id } = require('@instantdb/admin');\n\nasync function processLargeDataset(items) {\n  const progressId = id();\n  \n  await client.createEntity('progress', {\n    total: items.length,\n    completed: 0,\n    status: 'running'\n  }, progressId);\n\n  for (let i = 0; i < items.length; i++) {\n    // Process item...\n    await processItem(items[i]);\n    \n    // Update every 10 items\n    if (i % 10 === 0) {\n      await client.updateEntity(progressId, 'progress', {\n        completed: i + 1,\n        percentage: Math.round(((i + 1) / items.length) * 100)\n      });\n    }\n  }\n\n  await client.updateEntity(progressId, 'progress', {\n    completed: items.length,\n    percentage: 100,\n    status: 'completed'\n  });\n}"
      },
      {
        "title": "Transaction Patterns",
        "body": "See references/transactions.md for detailed transaction patterns including:\n\nBatch operations\nRelationship management\nConditional updates\nState machines\nCascade operations"
      },
      {
        "title": "Error Handling",
        "body": "All operations return promises that reject on failure:\n\ntry {\n  const result = await client.createEntity('tasks', data);\n} catch (error) {\n  console.error('Operation failed:', error.message);\n}"
      },
      {
        "title": "Query Syntax",
        "body": "See references/query_syntax.md for comprehensive query examples including:\n\nWhere clauses and operators\nRelationship traversal\nSorting and pagination\nMulti-level nesting"
      },
      {
        "title": "References",
        "body": "InstantDB documentation: https://www.instantdb.com/docs\nAdmin SDK: https://www.instantdb.com/docs/admin\nQuery reference: See references/query_syntax.md\nTransaction patterns: See references/transactions.md"
      }
    ],
    "body": "InstantDB Integration\nOverview\n\nNode.js integration for InstantDB enabling OpenClaw to perform admin operations and monitor real-time data changes via WebSocket subscriptions.\n\nSetup\n\nInstall dependencies:\n\nnpm install\n\n\nSet environment variables:\n\nexport INSTANTDB_APP_ID=\"your-app-id\"\nexport INSTANTDB_ADMIN_TOKEN=\"your-admin-token\"\n\nCore Capabilities\n1. Query Data\n\nFetch data using InstantDB's query syntax:\n\nconst { InstantDBClient } = require('./scripts/instantdb.js');\n\nconst client = new InstantDBClient(appId, adminToken);\nconst result = await client.query({\n  tasks: {\n    $: {\n      where: { status: 'active' }\n    }\n  }\n});\n\n\nCLI:\n\n./scripts/instantdb.js query '{\"tasks\": {}}'\n\n2. Create Entities\n\nAdd new entities to a namespace:\n\nconst { entityId, result } = await client.createEntity('tasks', {\n  title: 'Process data',\n  status: 'pending',\n  priority: 'high'\n});\n\n\nCLI:\n\n./scripts/instantdb.js create tasks '{\"title\": \"Process data\", \"status\": \"pending\"}'\n\n\nOptional entity ID:\n\n./scripts/instantdb.js create tasks '{\"title\": \"Task\"}' custom-entity-id\n\n3. Update Entities\n\nModify existing entity attributes:\n\nawait client.updateEntity(entityId, 'tasks', {\n  status: 'completed'\n});\n\n\nCLI:\n\n./scripts/instantdb.js update <entity-id> tasks '{\"status\": \"completed\"}'\n\n4. Delete Entities\n\nRemove entities:\n\nawait client.deleteEntity(entityId, 'tasks');\n\n\nCLI:\n\n./scripts/instantdb.js delete <entity-id> tasks\n\n5. Link Entities\n\nCreate relationships between entities:\n\nawait client.linkEntities(taskId, assigneeId, 'assignees');\n\n\nCLI:\n\n./scripts/instantdb.js link <parent-id> <child-id> assignees\n\n6. Unlink Entities\n\nRemove relationships:\n\nawait client.unlinkEntities(taskId, assigneeId, 'assignees');\n\n\nCLI:\n\n./scripts/instantdb.js unlink <parent-id> <child-id> assignees\n\n7. Real-time Subscriptions\n\nMonitor data changes via WebSocket:\n\nconst subscriptionId = client.subscribe(\n  { tasks: { $: { where: { status: 'active' } } } },\n  (data) => {\n    console.log('Data updated:', data);\n  },\n  (error) => {\n    console.error('Subscription error:', error);\n  }\n);\n\n// Later: client.unsubscribe(subscriptionId);\n\n\nCLI (listens for specified duration):\n\n./scripts/instantdb.js subscribe '{\"tasks\": {}}' 60  # Listen for 60 seconds\n\n8. Transactions\n\nExecute multiple operations atomically using the tx builder:\n\nconst { tx, id } = require('@instantdb/admin');\n\nawait client.transact([\n  tx.tasks[id()].update({ title: 'Task 1' }),\n  tx.tasks[id()].update({ title: 'Task 2' })\n]);\n\n\nCLI:\n\n./scripts/instantdb.js transact '[{\"op\": \"update\", \"id\": \"...\", \"data\": {...}}]'\n\nOpenClaw Usage Patterns\nAction Status Updates\n\nSend real-time progress to human observers:\n\nconst { id } = require('@instantdb/admin');\n\n// Create status entity\nconst actionId = id();\nawait client.createEntity('actions', {\n  type: 'file_processing',\n  status: 'started',\n  progress: 0,\n  timestamp: Date.now()\n}, actionId);\n\n// Update progress\nawait client.updateEntity(actionId, 'actions', {\n  progress: 50,\n  status: 'processing'\n});\n\n// Mark complete\nawait client.updateEntity(actionId, 'actions', {\n  progress: 100,\n  status: 'completed'\n});\n\nMulti-step Workflow Tracking\n\nTrack complex operations:\n\nconst { tx, id } = require('@instantdb/admin');\n\nconst workflowId = id();\nconst steps = ['Extract', 'Transform', 'Validate', 'Load', 'Verify'];\n\n// Initialize workflow with linked steps\nconst txs = [\n  tx.workflows[workflowId].update({\n    name: 'Data Pipeline',\n    status: 'running',\n    currentStep: 1,\n    totalSteps: steps.length\n  })\n];\n\nconst stepIds = steps.map((name, i) => {\n  const stepId = id();\n  txs.push(\n    tx.steps[stepId].update({\n      name,\n      order: i + 1,\n      status: 'pending'\n    }),\n    tx.workflows[workflowId].link({ steps: stepId })\n  );\n  return stepId;\n});\n\nawait client.transact(txs);\n\n// Update as steps complete\nfor (let i = 0; i < stepIds.length; i++) {\n  await client.updateEntity(stepIds[i], 'steps', { \n    status: 'completed' \n  });\n  await client.updateEntity(workflowId, 'workflows', { \n    currentStep: i + 2 \n  });\n}\n\nHuman Monitoring Pattern\n\nHumans subscribe to watch OpenClaw's actions:\n\n// Human's frontend code\nimport { init } from '@instantdb/react';\n\nconst db = init({ appId });\n\nfunction ActionMonitor() {\n  const { data } = db.useQuery({\n    actions: {\n      $: {\n        where: { status: { in: ['started', 'processing'] } }\n      }\n    }\n  });\n  \n  return data?.actions?.map(action => (\n    <div key={action.id}>\n      {action.type}: {action.progress}%\n    </div>\n  ));\n}\n\nStreaming Progress Updates\n\nFor long-running operations, stream updates:\n\nconst { id } = require('@instantdb/admin');\n\nasync function processLargeDataset(items) {\n  const progressId = id();\n  \n  await client.createEntity('progress', {\n    total: items.length,\n    completed: 0,\n    status: 'running'\n  }, progressId);\n\n  for (let i = 0; i < items.length; i++) {\n    // Process item...\n    await processItem(items[i]);\n    \n    // Update every 10 items\n    if (i % 10 === 0) {\n      await client.updateEntity(progressId, 'progress', {\n        completed: i + 1,\n        percentage: Math.round(((i + 1) / items.length) * 100)\n      });\n    }\n  }\n\n  await client.updateEntity(progressId, 'progress', {\n    completed: items.length,\n    percentage: 100,\n    status: 'completed'\n  });\n}\n\nTransaction Patterns\n\nSee references/transactions.md for detailed transaction patterns including:\n\nBatch operations\nRelationship management\nConditional updates\nState machines\nCascade operations\nError Handling\n\nAll operations return promises that reject on failure:\n\ntry {\n  const result = await client.createEntity('tasks', data);\n} catch (error) {\n  console.error('Operation failed:', error.message);\n}\n\nQuery Syntax\n\nSee references/query_syntax.md for comprehensive query examples including:\n\nWhere clauses and operators\nRelationship traversal\nSorting and pagination\nMulti-level nesting\nReferences\nInstantDB documentation: https://www.instantdb.com/docs\nAdmin SDK: https://www.instantdb.com/docs/admin\nQuery reference: See references/query_syntax.md\nTransaction patterns: See references/transactions.md"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ubyjerome/instantdb",
    "publisherUrl": "https://clawhub.ai/ubyjerome/instantdb",
    "owner": "ubyjerome",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/instantdb",
    "downloadUrl": "https://openagent3.xyz/downloads/instantdb",
    "agentUrl": "https://openagent3.xyz/skills/instantdb/agent",
    "manifestUrl": "https://openagent3.xyz/skills/instantdb/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/instantdb/agent.md"
  }
}