一键导入
surrealkit
SurrealKit schema sync, rollout migrations, seeding, and declarative testing for SurrealDB apps. Part of the surreal-skills collection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
SurrealKit schema sync, rollout migrations, seeding, and declarative testing for SurrealDB apps. Part of the surreal-skills collection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert SurrealDB 3 architect and developer skill (tracks v3.1.4+). SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, security, deployment, performance tuning, SDK integration (JS, Python, Go, Rust, Java, .NET, C, PHP, Swift, Kotlin, Ruby), Surrealism WASM extensions, SurrealML scope coverage (preview), built-in MCP (v3.1+) and standalone SurrealMCP, LangChain Python integration, editor tooling (LSP v0.1.6, tree-sitter, CodeMirror v1.0.6, VS Code/JetBrains/Neovim/Zed), and ecosystem integrations (Surrealist v3.9, Surreal-Sync, SurrealFS, SurrealKit v0.7, n8n, Agent Skills, setup-surreal). Universal skill for 30+ AI agents.
Data migration and synchronization to SurrealDB from MongoDB, PostgreSQL, MySQL, Neo4j, Kafka, and JSONL. Full and incremental CDC sync. Part of the surreal-skills collection.
SurrealFS virtual filesystem for AI agents. Rust core + Python agent (Pydantic AI). Persistent file operations backed by SurrealDB. Part of the surreal-skills collection.
SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.
SurrealDB MCP for AI agents: built-in server (SurrealDB 3.1+ `surreal mcp`) and standalone surrealmcp (surrealdb/surrealmcp v0.4.0). Part of the surreal-skills collection.
Expert SurrealDB 3 skill. Use when working with SurrealDB, SurrealQL queries, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, graph traversal, vector search, security and permissions, deployment and operations, performance tuning, SDK integration, Surrealism WASM extensions, SurrealMCP, Surrealist IDE, Surreal-Sync migrations, SurrealFS, SurrealKit, or ecosystem integrations such as n8n and CodeMirror.
| name | surrealkit |
| description | SurrealKit schema sync, rollout migrations, seeding, and declarative testing for SurrealDB apps. Part of the surreal-skills collection. |
| license | MIT |
| metadata | {"version":"1.7.1","author":"24601","parent_skill":"surrealdb","snapshot_date":"2026-06-17","upstream":{"repo":"surrealdb/surrealkit","release":"v0.6.3","sha":"7771b93ea563"}} |
SurrealKit manages SurrealDB application schemas as desired-state .surql
files, with separate paths for disposable development databases and shared or
production rollouts.
Tracked upstream snapshot: v0.6.3 pre-release (7771b93ea563, 2026-05-13).
The v0.6.1 -> v0.6.3 patch line added library-lock fixes, template variables,
comment-stripping cleanup, DROP ... IF EXISTS handling, and DEFINE coverage
for BUCKET, SEQUENCE, and CONFIG.
# Install
cargo binstall surrealkit
# or: cargo install surrealkit
# Scaffold project structure
surrealkit init
# Reconcile local/disposable database to local schema files
surrealkit sync
# Generate and apply a reviewed rollout for shared/prod
surrealkit rollout plan --name add_customer_indexes
surrealkit rollout start 20260410120000__add_customer_indexes
surrealkit rollout complete 20260410120000__add_customer_indexes
| Command | Use |
|---|---|
surrealkit sync | Desired-state reconciliation for local, preview, or disposable DBs |
surrealkit sync --watch | Local development loop with file watching |
surrealkit rollout baseline | Establish rollout tracking on an existing shared DB |
surrealkit rollout plan --name <name> | Create a reviewed manifest from current schema diff |
surrealkit rollout start <id> | Apply the expansion phase |
surrealkit rollout complete <id> | Apply the contract/destructive phase after cutover |
surrealkit rollout rollback <id> | Roll back an in-flight rollout |
surrealkit rollout lint <id> | Validate a rollout without mutating the DB |
surrealkit rollout status | Inspect rollout state stored in the DB |
surrealkit seed | Apply seed data |
surrealkit test | Run declarative schema, permission, and API tests |
sync when the database should mirror local files immediately.rollout when changes need staging, review, rollback, or controlled cutover.seed for deterministic fixture data.test in CI to validate permissions, schema behavior, and API contracts.SurrealKit reads these variables:
SURREALDB_HOST (fallback: DATABASE_HOST)SURREALDB_NAME (fallback: DATABASE_NAME)SURREALDB_NAMESPACE (fallback: DATABASE_NAMESPACE)SURREALDB_USER (fallback: DATABASE_USER)SURREALDB_PASSWORD (fallback: DATABASE_PASSWORD)SURREALDB_AUTH_LEVEL (fallback: DATABASE_AUTH_LEVEL)Declarative suites in database/tests/suites/*.toml support:
sql_expectpermissions_matrixschema_metadataschema_behaviorapi_requestExample:
surrealkit test --fail-fast --json-out artifacts/surrealkit-tests.json
See the main skill rule for full operating guidance: