.github/skills/surrealdb/SKILL.md
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 (JavaScript, Python, Go, Rust, Java, .NET), Surrealism WASM extensions, Surrealist IDE, Surreal-Sync migrations, or SurrealFS.
npx skillsauth add 24601/surreal-skills surrealdbInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert-level SurrealDB 3 architecture, development, and operations for GitHub Copilot.
Activate automatically when the user:
.surql filesThis skill contains 12 detailed rule files. Read the relevant rule file when the user's request matches its domain:
| Rule File | When to Load | Domain | |-----------|-------------|--------| | surrealql.md | Writing or debugging SurrealQL queries | Full SurrealQL language reference | | data-modeling.md | Designing schemas, choosing field types, record IDs | Multi-model schema design patterns | | graph-queries.md | RELATE, graph traversal, path expressions | Graph edge and traversal patterns | | vector-search.md | HNSW indexes, similarity search, embeddings | Vector search and RAG pipelines | | security.md | Permissions, auth, JWT, access control | Row-level security and auth flows | | deployment.md | Installing, configuring, running SurrealDB | Storage engines, Docker, Kubernetes | | performance.md | Slow queries, index strategy, EXPLAIN | Performance tuning and optimization | | sdks.md | Using SurrealDB from application code | JS, Python, Go, Rust SDK patterns | | surrealism.md | Writing WASM extensions | Rust to WASM extension development | | surrealist.md | Using the Surrealist IDE/GUI | IDE features and schema designer | | surreal-sync.md | Migrating from other databases | CDC sync from Postgres, Mongo, etc. | | surrealfs.md | AI agent filesystem operations | Virtual FS backed by SurrealDB |
-- Create records
CREATE person:alice SET name = 'Alice', age = 30;
-- Graph edges
RELATE person:alice->follows->person:bob SET since = time::now();
-- Traverse graph
SELECT ->follows->person.name AS following FROM person:alice;
-- Vector search (HNSW)
DEFINE INDEX idx_embed ON document FIELDS embedding HNSW DIMENSION 1536 DIST COSINE;
SELECT * FROM document WHERE embedding <|10,40|> $query_vector;
-- Row-level permissions
DEFINE TABLE post SCHEMALESS PERMISSIONS
FOR select WHERE published = true OR user = $auth.id
FOR create, update WHERE user = $auth.id;
-- Live queries
LIVE SELECT * FROM person WHERE age > 25;
table:id (e.g., person:alice) -- first-class citizens, no JOINs needed-> (outgoing), <- (incoming), <-> (bidirectional)<|K,EF|> where K=neighbors, EF=search parameter (NOT distance metric)# Health check
uv run scripts/doctor.py
# Schema introspection
uv run scripts/schema.py introspect
# Check upstream for updates
uv run scripts/check_upstream.py
root/root for local development only. Use scoped credentials in production.[a-zA-Z_][a-zA-Z0-9_]* before query interpolation.brew install over curl | sh for installing prerequisites.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.
testing
SurrealKit schema sync, rollout migrations, seeding, and declarative testing for SurrealDB apps. 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.