skills/surrealkit/SKILL.md
SurrealKit schema sync, rollout migrations, seeding, and declarative testing for SurrealDB apps. Part of the surreal-skills collection.
npx skillsauth add 24601/surreal-skills surrealkitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.0 pre-release (28f5a1c9d20c, 2026-05-03).
v0.6.0 introduces a procedural macro publish workflow on top of the v0.5.x
sync/rollout/seed/test pipeline; the public CLI surface below remains stable
between v0.5 and v0.6.
# Install
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:
DATABASE_HOST or PUBLIC_DATABASE_HOSTDATABASE_NAME or PUBLIC_DATABASE_NAMEDATABASE_NAMESPACE or PUBLIC_DATABASE_NAMESPACEDATABASE_USERDATABASE_PASSWORDDeclarative 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:
tools
SurrealMCP -- Model Context Protocol server for SurrealDB. Lets MCP-compatible LLM hosts (Claude Code/Desktop, Cursor, Codex, OpenCode, Amp, Continue, Windsurf) read and write a SurrealDB instance through a single config entry. Part of the surreal-skills collection.
tools
SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.
development
SurrealFS virtual filesystem for AI agents. Rust core + Python agent (Pydantic AI). Persistent file operations backed by SurrealDB. Part of the surreal-skills collection.
development
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.