Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
surrealdb avatar

Surrealkit

  • 119 installs
  • 21 repo stars
  • Updated June 16, 2026
  • surrealdb/agent-skills

Helps with ai & agent building tasks.

About

surrealkit is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • surrealkit
  • AI & Agent Building
  • AI-coding skill

Surrealkit by the numbers

  • 119 all-time installs (skills.sh)
  • +16 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #3,837 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/surrealdb/agent-skills --skill surrealkit

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs119
repo stars21
Last updatedJune 16, 2026
Repositorysurrealdb/agent-skills

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

SurrealKit

A skill for driving SurrealKit, SurrealDB's schema-management and migration CLI.

SurrealKit keeps a SurrealDB database in sync with .surql schema files. It provides two complementary workflows — a fast declarative sync for development and controlled, phased rollouts for shared and production databases — plus seeding, type generation, and a declarative testing framework.

When to use this skill

Reference these guidelines when:

  • Scaffolding a new SurrealDB project (surrealkit init) or authoring templates
  • Applying schema changes in development (surrealkit sync)
  • Planning, executing, or rolling back production migrations (surrealkit rollout)
  • Generating JSON or TypeScript types from a live schema (surrealkit typegen)
  • Writing or running declarative tests for schemas, permissions, or API endpoints (surrealkit test)

This skill covers the SurrealKit tool itself. To write the actual schema, seed, and query statements that go in .surql files, use the surrealql skill.

Installation

MethodCommand
cargo binstall (recommended)cargo binstall surrealkit
Cargo (from source)cargo install surrealkit
Dockerdocker pull ghcr.io/surrealdb/surrealkit:latest
Prebuilt tarballGitHub Releases

Command map

CommandPurposeReference
surrealkit initScaffold a project from a template, selecting optional featuresinit-templates.md
surrealkit syncDeclaratively reconcile the database to your schema files (dev)sync-rollouts.md
surrealkit rollout <sub>Plan, stage, complete, and roll back migrations (shared/prod)sync-rollouts.md
surrealkit typegenIntrospect a live DB and emit JSON / TypeScript typestypegen.md
surrealkit testRun declarative TOML test suitestesting.md
surrealkit seedRun seeding files in database/seed/sync-rollouts.md
surrealkit apply <path>Apply a single .surql file directly
surrealkit statusShow sync/rollout state

Run surrealkit <command> --help to confirm available flags for an installed version.

Connection & config

Global flags work on every command and resolve in this order (highest wins): CLI flags > system env vars > `.env` file > defaults.

surrealkit --host http://localhost:8000 --ns my_ns --db my_db \
  --user root --pass root --auth-level root sync
FlagEnv var (with fallback)Default
--hostSURREALDB_HOST (DATABASE_HOST)http://localhost:8000
--nsSURREALDB_NAMESPACE (DATABASE_NAMESPACE)db
--dbSURREALDB_NAME (DATABASE_NAME)test
--userSURREALDB_USER (DATABASE_USER)root
--passSURREALDB_PASSWORD (DATABASE_PASSWORD)root
--auth-levelSURREALDB_AUTH_LEVEL (DATABASE_AUTH_LEVEL)root (root / namespace / database)
--folderSURREALDB_FOLDER./database

The project root holds surrealkit.toml with [variables] and [typegen] sections.

Template variables

Use ${VAR_NAME} tokens in any .surql file (schema, seed, or rollout SQL). Names are case-insensitive. Values resolve in order (highest wins):

1. --var KEY=VALUE CLI flag (repeatable) 2. SURREALKIT_VAR_<KEY> environment variable 3. [variables] section in surrealkit.toml

# surrealkit.toml
[variables]
schema_prefix = "myapp"
talent_username = "talent_rw"
surrealkit sync --var schema_prefix=acme --var talent_username=talent_rw
  • An undefined variable is a hard error — SurrealKit never silently skips it or leaves the token in the SQL.
  • Escape a literal ${...} by doubling the dollar sign: $${literal}.
  • Substitution runs on sync, seed, apply, and rollout start/complete/rollback. It does not run on rollout plan/baseline/status/lint (no user SQL executes there).

Project layout

surrealkit init creates a database/ directory (override the root with --folder / SURREALDB_FOLDER):

database/
├── schema/                     # Schema definitions (.surql) — the source of truth
├── rollouts/                   # Generated rollout manifests (.toml)
├── snapshots/                  # Internal drift tracking
│   ├── schema_snapshot.json
│   └── catalog_snapshot.json
├── seed/                       # Seeding files (.surql)
├── tests/
│   ├── suites/                 # Test suites (.toml)
│   ├── fixtures/               # Test fixture data (.surql)
│   └── config.toml             # Global test config
└── setup.surql                 # One-time setup script
surrealkit.toml                 # Project config ([variables], [typegen])

Rules & conventions

  • Sync vs rollout: use sync for local, preview, and other disposable databases where it is safe to match files immediately; use rollout for shared/production databases that need review, staged execution, rollback, or operator-controlled cutover.
  • Schema files are the source of truth. sync creates, updates, and prunes SurrealKit-managed objects to match database/schema/.
  • Schema files should contain DEFINE/REMOVE statements. Allow other statements (INSERT, UPDATE, CREATE) only with --allow-all-statements, which disables catalog entity tracking.
  • Store SurrealQL in files with the .surql extension. Validate and format generated SurrealQL with the tools described in the surrealql skill (surreal validate, npx @surrealdb/surql-fmt).
  • SurrealKit is young and evolving; confirm command surfaces against surrealkit --help and the README.

References

  • Project scaffolding and templates — references/init-templates.md
  • Development sync and production rollouts — references/sync-rollouts.md
  • Type generation (JSON and TypeScript) — references/typegen.md
  • Declarative testing framework — references/testing.md

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.