What problem does it solve?
This Skill prevents unsafe, fragile, and insecure SurrealDB usage by giving production-oriented schema and query rules, including defenses against SurrealQL injection, unsafe LIVE subscriptions, and schema/data integrity failures.
Core Features & Use Cases
- SurrealQL safety guardrails: Enforces parameterized queries via
$vars/bind patterns and discourages query string interpolation to reduce injection risk.
- Secure schema design: Recommends
SCHEMAFULL tables with ASSERT constraints, explicit PERMISSIONS, and appropriate field types/READONLY defaults.
- Graph & real-time correctness: Guides correct use of
RELATE for edges and safe LIVE query lifecycle management to avoid permission leaks and resource issues.
- Transactional integrity: Promotes atomic multi-step updates using
BEGIN TRANSACTION / COMMIT TRANSACTION patterns with validation.
Use Case: You are building a multi-tenant SurrealDB-backed app with users and document-like records, and you need to generate a secure table schema, graph edges, and safe parameterized queries for both standard CRUD and real-time updates.
Quick Start
Use the surrealdb-expert skill to generate the SurrealQL schema for your tables (with SCHEMAFULL, ASSERT validation, and explicit PERMISSIONS) and then produce parameterized queries for the core operations of your app.