{
  "schemaVersion": "1.0",
  "item": {
    "slug": "surrealdb",
    "name": "SurrealDB 3",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/24601/surrealdb",
    "canonicalUrl": "https://clawhub.ai/24601/surrealdb",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/surrealdb",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=surrealdb",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "AGENTS.md",
      "CHANGELOG.md",
      "CONTRIBUTING.md",
      "README.md",
      "SECURITY.md",
      "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. 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",
      "slug": "surrealdb",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-09T15:27:13.506Z",
      "expiresAt": "2026-05-16T15:27:13.506Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=surrealdb",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=surrealdb",
        "contentDisposition": "attachment; filename=\"surrealdb-1.6.4.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "surrealdb"
      },
      "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/surrealdb"
    },
    "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/surrealdb",
    "agentPageUrl": "https://openagent3.xyz/skills/surrealdb/agent",
    "manifestUrl": "https://openagent3.xyz/skills/surrealdb/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/surrealdb/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": "SurrealDB 3 Skill",
        "body": "Expert-level SurrealDB 3 architecture, development, and operations. Covers SurrealQL, multi-model data modeling, graph traversal, vector search, security, deployment, performance tuning, SDK integration, and the full SurrealDB ecosystem."
      },
      {
        "title": "For AI Agents",
        "body": "Get a full capabilities manifest, decision trees, and output contracts:\n\nuv run {baseDir}/scripts/onboard.py --agent\n\nSee AGENTS.md for the complete structured briefing.\n\nCommandWhat It Doesuv run {baseDir}/scripts/doctor.pyHealth check: verify surreal CLI, connectivity, versionsuv run {baseDir}/scripts/doctor.py --checkQuick pass/fail check (exit code only)uv run {baseDir}/scripts/schema.py introspectDump full schema of a running SurrealDB instanceuv run {baseDir}/scripts/schema.py tablesList all tables with field counts and indexesuv run {baseDir}/scripts/onboard.py --agentJSON capabilities manifest for agent integration"
      },
      {
        "title": "Prerequisites",
        "body": "surreal CLI -- brew install surrealdb/tap/surreal (macOS) or see install docs\nPython 3.10+ -- Required for skill scripts\nuv -- brew install uv (macOS) or pip install uv or see uv docs\n\nOptional:\n\nDocker -- For containerized SurrealDB instances (docker run surrealdb/surrealdb:v3)\nSDK of choice -- JavaScript, Python, Go, Rust, Java, .NET, C, PHP, or Dart\n\nSecurity note: This skill's documentation references package manager installs\n(brew, pip, cargo, npm, Docker) as the recommended install method. If you\nencounter curl | sh examples in the rules files, prefer your OS package\nmanager or download-and-review workflow instead."
      },
      {
        "title": "Quick Start",
        "body": "Credential warning: Examples below use root/root for local development\nonly. Never use default credentials against production or shared instances.\nCreate scoped, least-privilege users for non-local environments.\n\n# Start SurrealDB in-memory for LOCAL DEVELOPMENT ONLY\nsurreal start memory --user root --pass root --bind 127.0.0.1:8000\n\n# Start with persistent RocksDB storage (local dev)\nsurreal start rocksdb://data/mydb.db --user root --pass root\n\n# Start with SurrealKV (time-travel queries supported, local dev)\nsurreal start surrealkv://data/mydb --user root --pass root\n\n# Connect via CLI REPL (local dev)\nsurreal sql --endpoint http://localhost:8000 --user root --pass root --ns test --db test\n\n# Import a SurrealQL file\nsurreal import --endpoint http://localhost:8000 --user root --pass root --ns test --db test schema.surql\n\n# Export the database\nsurreal export --endpoint http://localhost:8000 --user root --pass root --ns test --db test backup.surql\n\n# Check version\nsurreal version\n\n# Run the skill health check\nuv run {baseDir}/scripts/doctor.py"
      },
      {
        "title": "Environment Variables",
        "body": "VariableDescriptionDefaultSURREAL_ENDPOINTSurrealDB server URLhttp://localhost:8000SURREAL_USERRoot or namespace usernamerootSURREAL_PASSRoot or namespace passwordrootSURREAL_NSDefault namespacetestSURREAL_DBDefault databasetest\n\nThese map directly to the surreal sql CLI flags (--endpoint, --user, --pass, --ns, --db) and are recognized by official SurrealDB SDKs."
      },
      {
        "title": "SurrealQL Mastery",
        "body": "Full coverage of the SurrealQL query language: CREATE, SELECT, UPDATE, UPSERT, DELETE, RELATE, INSERT, LIVE SELECT, DEFINE, REMOVE, INFO, subqueries, transactions, futures, and all built-in functions (array, crypto, duration, geo, math, meta, object, parse, rand, string, time, type, vector).\n\nSee: rules/surrealql.md"
      },
      {
        "title": "Multi-Model Data Modeling",
        "body": "Design schemas that leverage SurrealDB's multi-model capabilities -- document collections, graph edges, relational references, vector embeddings, time-series data, and geospatial coordinates -- all in a single database with a single query language.\n\nSee: rules/data-modeling.md"
      },
      {
        "title": "Graph Queries",
        "body": "First-class graph traversal without JOINs. RELATE creates typed edges between records. Traverse with -> (outgoing), <- (incoming), and <-> (bidirectional) operators. Filter, aggregate, and recurse at any depth.\n\nSee: rules/graph-queries.md"
      },
      {
        "title": "Vector Search",
        "body": "Built-in vector similarity search using HNSW and brute-force indexes. Define vector fields, create indexes with configurable distance metrics (cosine, euclidean, manhattan, minkowski), and query with vector::similarity::* functions. Build RAG pipelines and semantic search directly in SurrealQL.\n\nSee: rules/vector-search.md"
      },
      {
        "title": "Security and Permissions",
        "body": "Row-level security via DEFINE TABLE ... PERMISSIONS, namespace/database/record-level access control, DEFINE ACCESS for JWT/token-based auth, DEFINE USER for system users, and $auth/$session runtime variables for permission predicates.\n\nSee: rules/security.md"
      },
      {
        "title": "Deployment and Operations",
        "body": "Single-binary deployment, Docker, Kubernetes (Helm charts), storage engine selection (memory, RocksDB, SurrealKV, TiKV for distributed), backup/restore, monitoring, and production hardening.\n\nSee: rules/deployment.md"
      },
      {
        "title": "Performance Tuning",
        "body": "Index strategies (unique, search, vector HNSW, MTree), query optimization with EXPLAIN, connection pooling, storage engine trade-offs, batch operations, and resource limits.\n\nSee: rules/performance.md"
      },
      {
        "title": "SDK Integration",
        "body": "Official SDKs for JavaScript/TypeScript (Node.js, Deno, Bun, browser), Python, Go, Rust, Java, .NET, C, PHP, and Dart. Connection protocols (HTTP, WebSocket), authentication flows, live query subscriptions, and typed record handling.\n\nSee: rules/sdks.md"
      },
      {
        "title": "Surrealism WASM Extensions",
        "body": "New in SurrealDB 3: extend the database with custom functions, analyzers, and logic written in Rust and compiled to WASM. Define, deploy, and manage Surrealism modules.\n\nSee: rules/surrealism.md"
      },
      {
        "title": "Ecosystem Tools",
        "body": "Surrealist -- Official IDE and GUI for SurrealDB (schema designer, query editor, graph visualizer)\nSurreal-Sync -- Change Data Capture (CDC) for migrations from other databases\nSurrealFS -- AI agent filesystem built on SurrealDB\nSurrealML -- Machine learning model management and inference within SurrealDB\n\nSee: rules/surrealist.md, rules/surreal-sync.md, rules/surrealfs.md"
      },
      {
        "title": "Doctor / Health Check",
        "body": "# Full diagnostic (Rich output on stderr, JSON on stdout)\nuv run {baseDir}/scripts/doctor.py\n\n# Quick check (exit code 0 = healthy, 1 = issues found)\nuv run {baseDir}/scripts/doctor.py --check\n\n# Check a specific endpoint\nuv run {baseDir}/scripts/doctor.py --endpoint http://my-server:8000\n\nThe doctor script verifies: surreal CLI installed and on PATH, server reachable, authentication succeeds, namespace and database exist, version compatibility, and storage engine status."
      },
      {
        "title": "Schema Introspection",
        "body": "# Full schema dump (all tables, fields, indexes, events, accesses)\nuv run {baseDir}/scripts/schema.py introspect\n\n# List tables with summary\nuv run {baseDir}/scripts/schema.py tables\n\n# Inspect a specific table\nuv run {baseDir}/scripts/schema.py table <table_name>\n\n# Export schema as SurrealQL (reproducible DEFINE statements)\nuv run {baseDir}/scripts/schema.py export --format surql\n\n# Export schema as JSON\nuv run {baseDir}/scripts/schema.py export --format json\n\nIntrospection uses INFO FOR DB, INFO FOR TABLE, and INFO FOR NS to reconstruct the full schema."
      },
      {
        "title": "Rules Reference",
        "body": "Rule FileCoveragerules/surrealql.mdSurrealQL syntax, statements, functions, operators, idiomsrules/data-modeling.mdSchema design, record IDs, field types, relations, normalizationrules/graph-queries.mdRELATE, graph traversal operators, path expressions, recursive queriesrules/vector-search.mdVector fields, HNSW/brute-force indexes, similarity functions, RAG patternsrules/security.mdPermissions, access control, authentication, JWT, row-level securityrules/deployment.mdInstallation, storage engines, Docker, Kubernetes, production configrules/performance.mdIndexes, EXPLAIN, query optimization, batch ops, resource tuningrules/sdks.mdJavaScript, Python, Go, Rust SDK usage, connection patterns, live queriesrules/surrealism.mdWASM extensions, custom functions, Surrealism module authoringrules/surrealist.mdSurrealist IDE/GUI usage, schema designer, query editorrules/surreal-sync.mdCDC migration tool, source/target connectors, migration workflowsrules/surrealfs.mdAI agent filesystem, file storage, metadata, retrieval patterns"
      },
      {
        "title": "Workflow Examples",
        "body": "All workflow examples use root/root for local development only.\nFor production, use DEFINE USER with scoped, least-privilege credentials."
      },
      {
        "title": "New Project Setup",
        "body": "# 1. Verify environment\nuv run {baseDir}/scripts/doctor.py\n\n# 2. Start SurrealDB\nsurreal start rocksdb://data/myproject.db --user root --pass root\n\n# 3. Design schema (use rules/data-modeling.md for guidance)\n# 4. Import initial schema\nsurreal import --endpoint http://localhost:8000 --user root --pass root \\\n  --ns myapp --db production schema.surql\n\n# 5. Introspect to verify\nuv run {baseDir}/scripts/schema.py introspect"
      },
      {
        "title": "Migration from SurrealDB v2",
        "body": "# 1. Export v2 data\nsurreal export --endpoint http://old-server:8000 --user root --pass root \\\n  --ns myapp --db production v2-backup.surql\n\n# 2. Review breaking changes (see rules/surrealql.md v2->v3 migration section)\n# Key changes: range syntax 1..4 is now exclusive of end, new WASM extension system\n\n# 3. Import into v3\nsurreal import --endpoint http://localhost:8000 --user root --pass root \\\n  --ns myapp --db production v2-backup.surql\n\n# 4. Verify schema\nuv run {baseDir}/scripts/schema.py introspect"
      },
      {
        "title": "Data Modeling for a New Domain",
        "body": "# 1. Read rules/data-modeling.md for schema design patterns\n# 2. Read rules/graph-queries.md if your domain has relationships\n# 3. Read rules/vector-search.md if you need semantic search\n# 4. Draft schema.surql with DEFINE TABLE, DEFINE FIELD, DEFINE INDEX\n# 5. Import and test\nsurreal import --endpoint http://localhost:8000 --user root --pass root \\\n  --ns dev --db test schema.surql\nuv run {baseDir}/scripts/schema.py introspect"
      },
      {
        "title": "Deploying to Production",
        "body": "# 1. Read rules/deployment.md for storage engine selection and hardening\n# 2. Read rules/security.md for access control setup\n# 3. Read rules/performance.md for index strategy\n# 4. Run doctor against production endpoint\nuv run {baseDir}/scripts/doctor.py --endpoint https://prod-surreal:8000\n# 5. Verify schema matches expectations\nuv run {baseDir}/scripts/schema.py introspect --endpoint https://prod-surreal:8000"
      },
      {
        "title": "Upstream Source Check",
        "body": "# Check if upstream SurrealDB repos have changed since this skill was built\nuv run {baseDir}/scripts/check_upstream.py\n\n# JSON-only output for agents\nuv run {baseDir}/scripts/check_upstream.py --json\n\n# Only show repos that have new commits\nuv run {baseDir}/scripts/check_upstream.py --stale\n\nCompares current HEAD SHAs and release tags of all tracked repos against the\nbaselines in SOURCES.json. Use this to plan incremental skill updates."
      },
      {
        "title": "Source Provenance",
        "body": "This skill was built on 2026-02-19 from these upstream sources:\n\nRepositoryReleaseSnapshot Datesurrealdb/surrealdbv3.0.02026-02-19surrealdb/surrealistv3.7.22026-02-21surrealdb/surrealdb.jsv1.3.22026-02-20surrealdb/surrealdb.js (v2 beta)v2.0.0-beta.12026-02-20surrealdb/surrealdb.pyv1.0.82026-02-03surrealdb/surrealdb.gov1.3.02026-02-12surrealdb/surreal-syncv0.3.42026-02-12surrealdb/surrealfs--2026-01-29\n\nDocumentation: surrealdb.com/docs snapshot 2026-02-22.\n\nMachine-readable provenance: SOURCES.json."
      },
      {
        "title": "Output Convention",
        "body": "All Python scripts in this skill follow a dual-output pattern:\n\nstderr: Rich-formatted human-readable output (tables, panels, status indicators)\nstdout: Machine-readable JSON for programmatic consumption by AI agents\n\nThis means 2>/dev/null hides the human output, and piping stdout gives clean JSON for downstream processing."
      }
    ],
    "body": "SurrealDB 3 Skill\n\nExpert-level SurrealDB 3 architecture, development, and operations. Covers SurrealQL, multi-model data modeling, graph traversal, vector search, security, deployment, performance tuning, SDK integration, and the full SurrealDB ecosystem.\n\nFor AI Agents\n\nGet a full capabilities manifest, decision trees, and output contracts:\n\nuv run {baseDir}/scripts/onboard.py --agent\n\n\nSee AGENTS.md for the complete structured briefing.\n\nCommand\tWhat It Does\nuv run {baseDir}/scripts/doctor.py\tHealth check: verify surreal CLI, connectivity, versions\nuv run {baseDir}/scripts/doctor.py --check\tQuick pass/fail check (exit code only)\nuv run {baseDir}/scripts/schema.py introspect\tDump full schema of a running SurrealDB instance\nuv run {baseDir}/scripts/schema.py tables\tList all tables with field counts and indexes\nuv run {baseDir}/scripts/onboard.py --agent\tJSON capabilities manifest for agent integration\nPrerequisites\nsurreal CLI -- brew install surrealdb/tap/surreal (macOS) or see install docs\nPython 3.10+ -- Required for skill scripts\nuv -- brew install uv (macOS) or pip install uv or see uv docs\n\nOptional:\n\nDocker -- For containerized SurrealDB instances (docker run surrealdb/surrealdb:v3)\nSDK of choice -- JavaScript, Python, Go, Rust, Java, .NET, C, PHP, or Dart\n\nSecurity note: This skill's documentation references package manager installs (brew, pip, cargo, npm, Docker) as the recommended install method. If you encounter curl | sh examples in the rules files, prefer your OS package manager or download-and-review workflow instead.\n\nQuick Start\n\nCredential warning: Examples below use root/root for local development only. Never use default credentials against production or shared instances. Create scoped, least-privilege users for non-local environments.\n\n# Start SurrealDB in-memory for LOCAL DEVELOPMENT ONLY\nsurreal start memory --user root --pass root --bind 127.0.0.1:8000\n\n# Start with persistent RocksDB storage (local dev)\nsurreal start rocksdb://data/mydb.db --user root --pass root\n\n# Start with SurrealKV (time-travel queries supported, local dev)\nsurreal start surrealkv://data/mydb --user root --pass root\n\n# Connect via CLI REPL (local dev)\nsurreal sql --endpoint http://localhost:8000 --user root --pass root --ns test --db test\n\n# Import a SurrealQL file\nsurreal import --endpoint http://localhost:8000 --user root --pass root --ns test --db test schema.surql\n\n# Export the database\nsurreal export --endpoint http://localhost:8000 --user root --pass root --ns test --db test backup.surql\n\n# Check version\nsurreal version\n\n# Run the skill health check\nuv run {baseDir}/scripts/doctor.py\n\nEnvironment Variables\nVariable\tDescription\tDefault\nSURREAL_ENDPOINT\tSurrealDB server URL\thttp://localhost:8000\nSURREAL_USER\tRoot or namespace username\troot\nSURREAL_PASS\tRoot or namespace password\troot\nSURREAL_NS\tDefault namespace\ttest\nSURREAL_DB\tDefault database\ttest\n\nThese map directly to the surreal sql CLI flags (--endpoint, --user, --pass, --ns, --db) and are recognized by official SurrealDB SDKs.\n\nCore Capabilities\nSurrealQL Mastery\n\nFull coverage of the SurrealQL query language: CREATE, SELECT, UPDATE, UPSERT, DELETE, RELATE, INSERT, LIVE SELECT, DEFINE, REMOVE, INFO, subqueries, transactions, futures, and all built-in functions (array, crypto, duration, geo, math, meta, object, parse, rand, string, time, type, vector).\n\nSee: rules/surrealql.md\n\nMulti-Model Data Modeling\n\nDesign schemas that leverage SurrealDB's multi-model capabilities -- document collections, graph edges, relational references, vector embeddings, time-series data, and geospatial coordinates -- all in a single database with a single query language.\n\nSee: rules/data-modeling.md\n\nGraph Queries\n\nFirst-class graph traversal without JOINs. RELATE creates typed edges between records. Traverse with -> (outgoing), <- (incoming), and <-> (bidirectional) operators. Filter, aggregate, and recurse at any depth.\n\nSee: rules/graph-queries.md\n\nVector Search\n\nBuilt-in vector similarity search using HNSW and brute-force indexes. Define vector fields, create indexes with configurable distance metrics (cosine, euclidean, manhattan, minkowski), and query with vector::similarity::* functions. Build RAG pipelines and semantic search directly in SurrealQL.\n\nSee: rules/vector-search.md\n\nSecurity and Permissions\n\nRow-level security via DEFINE TABLE ... PERMISSIONS, namespace/database/record-level access control, DEFINE ACCESS for JWT/token-based auth, DEFINE USER for system users, and $auth/$session runtime variables for permission predicates.\n\nSee: rules/security.md\n\nDeployment and Operations\n\nSingle-binary deployment, Docker, Kubernetes (Helm charts), storage engine selection (memory, RocksDB, SurrealKV, TiKV for distributed), backup/restore, monitoring, and production hardening.\n\nSee: rules/deployment.md\n\nPerformance Tuning\n\nIndex strategies (unique, search, vector HNSW, MTree), query optimization with EXPLAIN, connection pooling, storage engine trade-offs, batch operations, and resource limits.\n\nSee: rules/performance.md\n\nSDK Integration\n\nOfficial SDKs for JavaScript/TypeScript (Node.js, Deno, Bun, browser), Python, Go, Rust, Java, .NET, C, PHP, and Dart. Connection protocols (HTTP, WebSocket), authentication flows, live query subscriptions, and typed record handling.\n\nSee: rules/sdks.md\n\nSurrealism WASM Extensions\n\nNew in SurrealDB 3: extend the database with custom functions, analyzers, and logic written in Rust and compiled to WASM. Define, deploy, and manage Surrealism modules.\n\nSee: rules/surrealism.md\n\nEcosystem Tools\nSurrealist -- Official IDE and GUI for SurrealDB (schema designer, query editor, graph visualizer)\nSurreal-Sync -- Change Data Capture (CDC) for migrations from other databases\nSurrealFS -- AI agent filesystem built on SurrealDB\nSurrealML -- Machine learning model management and inference within SurrealDB\n\nSee: rules/surrealist.md, rules/surreal-sync.md, rules/surrealfs.md\n\nDoctor / Health Check\n# Full diagnostic (Rich output on stderr, JSON on stdout)\nuv run {baseDir}/scripts/doctor.py\n\n# Quick check (exit code 0 = healthy, 1 = issues found)\nuv run {baseDir}/scripts/doctor.py --check\n\n# Check a specific endpoint\nuv run {baseDir}/scripts/doctor.py --endpoint http://my-server:8000\n\n\nThe doctor script verifies: surreal CLI installed and on PATH, server reachable, authentication succeeds, namespace and database exist, version compatibility, and storage engine status.\n\nSchema Introspection\n# Full schema dump (all tables, fields, indexes, events, accesses)\nuv run {baseDir}/scripts/schema.py introspect\n\n# List tables with summary\nuv run {baseDir}/scripts/schema.py tables\n\n# Inspect a specific table\nuv run {baseDir}/scripts/schema.py table <table_name>\n\n# Export schema as SurrealQL (reproducible DEFINE statements)\nuv run {baseDir}/scripts/schema.py export --format surql\n\n# Export schema as JSON\nuv run {baseDir}/scripts/schema.py export --format json\n\n\nIntrospection uses INFO FOR DB, INFO FOR TABLE, and INFO FOR NS to reconstruct the full schema.\n\nRules Reference\nRule File\tCoverage\nrules/surrealql.md\tSurrealQL syntax, statements, functions, operators, idioms\nrules/data-modeling.md\tSchema design, record IDs, field types, relations, normalization\nrules/graph-queries.md\tRELATE, graph traversal operators, path expressions, recursive queries\nrules/vector-search.md\tVector fields, HNSW/brute-force indexes, similarity functions, RAG patterns\nrules/security.md\tPermissions, access control, authentication, JWT, row-level security\nrules/deployment.md\tInstallation, storage engines, Docker, Kubernetes, production config\nrules/performance.md\tIndexes, EXPLAIN, query optimization, batch ops, resource tuning\nrules/sdks.md\tJavaScript, Python, Go, Rust SDK usage, connection patterns, live queries\nrules/surrealism.md\tWASM extensions, custom functions, Surrealism module authoring\nrules/surrealist.md\tSurrealist IDE/GUI usage, schema designer, query editor\nrules/surreal-sync.md\tCDC migration tool, source/target connectors, migration workflows\nrules/surrealfs.md\tAI agent filesystem, file storage, metadata, retrieval patterns\nWorkflow Examples\n\nAll workflow examples use root/root for local development only. For production, use DEFINE USER with scoped, least-privilege credentials.\n\nNew Project Setup\n# 1. Verify environment\nuv run {baseDir}/scripts/doctor.py\n\n# 2. Start SurrealDB\nsurreal start rocksdb://data/myproject.db --user root --pass root\n\n# 3. Design schema (use rules/data-modeling.md for guidance)\n# 4. Import initial schema\nsurreal import --endpoint http://localhost:8000 --user root --pass root \\\n  --ns myapp --db production schema.surql\n\n# 5. Introspect to verify\nuv run {baseDir}/scripts/schema.py introspect\n\nMigration from SurrealDB v2\n# 1. Export v2 data\nsurreal export --endpoint http://old-server:8000 --user root --pass root \\\n  --ns myapp --db production v2-backup.surql\n\n# 2. Review breaking changes (see rules/surrealql.md v2->v3 migration section)\n# Key changes: range syntax 1..4 is now exclusive of end, new WASM extension system\n\n# 3. Import into v3\nsurreal import --endpoint http://localhost:8000 --user root --pass root \\\n  --ns myapp --db production v2-backup.surql\n\n# 4. Verify schema\nuv run {baseDir}/scripts/schema.py introspect\n\nData Modeling for a New Domain\n# 1. Read rules/data-modeling.md for schema design patterns\n# 2. Read rules/graph-queries.md if your domain has relationships\n# 3. Read rules/vector-search.md if you need semantic search\n# 4. Draft schema.surql with DEFINE TABLE, DEFINE FIELD, DEFINE INDEX\n# 5. Import and test\nsurreal import --endpoint http://localhost:8000 --user root --pass root \\\n  --ns dev --db test schema.surql\nuv run {baseDir}/scripts/schema.py introspect\n\nDeploying to Production\n# 1. Read rules/deployment.md for storage engine selection and hardening\n# 2. Read rules/security.md for access control setup\n# 3. Read rules/performance.md for index strategy\n# 4. Run doctor against production endpoint\nuv run {baseDir}/scripts/doctor.py --endpoint https://prod-surreal:8000\n# 5. Verify schema matches expectations\nuv run {baseDir}/scripts/schema.py introspect --endpoint https://prod-surreal:8000\n\nUpstream Source Check\n# Check if upstream SurrealDB repos have changed since this skill was built\nuv run {baseDir}/scripts/check_upstream.py\n\n# JSON-only output for agents\nuv run {baseDir}/scripts/check_upstream.py --json\n\n# Only show repos that have new commits\nuv run {baseDir}/scripts/check_upstream.py --stale\n\n\nCompares current HEAD SHAs and release tags of all tracked repos against the baselines in SOURCES.json. Use this to plan incremental skill updates.\n\nSource Provenance\n\nThis skill was built on 2026-02-19 from these upstream sources:\n\nRepository\tRelease\tSnapshot Date\nsurrealdb/surrealdb\tv3.0.0\t2026-02-19\nsurrealdb/surrealist\tv3.7.2\t2026-02-21\nsurrealdb/surrealdb.js\tv1.3.2\t2026-02-20\nsurrealdb/surrealdb.js (v2 beta)\tv2.0.0-beta.1\t2026-02-20\nsurrealdb/surrealdb.py\tv1.0.8\t2026-02-03\nsurrealdb/surrealdb.go\tv1.3.0\t2026-02-12\nsurrealdb/surreal-sync\tv0.3.4\t2026-02-12\nsurrealdb/surrealfs\t--\t2026-01-29\n\nDocumentation: surrealdb.com/docs snapshot 2026-02-22.\n\nMachine-readable provenance: SOURCES.json.\n\nOutput Convention\n\nAll Python scripts in this skill follow a dual-output pattern:\n\nstderr: Rich-formatted human-readable output (tables, panels, status indicators)\nstdout: Machine-readable JSON for programmatic consumption by AI agents\n\nThis means 2>/dev/null hides the human output, and piping stdout gives clean JSON for downstream processing."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/24601/surrealdb",
    "publisherUrl": "https://clawhub.ai/24601/surrealdb",
    "owner": "24601",
    "version": "1.2.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/surrealdb",
    "downloadUrl": "https://openagent3.xyz/downloads/surrealdb",
    "agentUrl": "https://openagent3.xyz/skills/surrealdb/agent",
    "manifestUrl": "https://openagent3.xyz/skills/surrealdb/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/surrealdb/agent.md"
  }
}