One-click install
npx skills add https://github.com/tyrchen/claude-skills --skill surrealdb-tyrchen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: surrealdb
Source: https://github.com/tyrchen/claude-skills/tree/main/surrealdb
Command: npx skills add https://github.com/tyrchen/claude-skills --skill surrealdb-tyrchen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SurrealDB requires precise SurrealQL queries and schema patterns to build robust, scalable data applications. This skill guides you to generate production-ready queries, define schemas (SCHEMAFULL/SCHEMALESS), and implement graph relationships, authentication, transactions, and live queries across document, graph, and relational models.

Core Features & Use Cases

  • Generate core SurrealQL statements (SELECT, CREATE, UPDATE, DELETE, RELATE, DEFINE) for multi-model data architectures.
  • Model schemas and relationships with SCHEMAFULL/SCHEMALESS definitions, edge tables, and recursive traversals.
  • Implement authentication, permissions, and auditing patterns, plus transaction support and real-time LIVE queries.

Quick Start

Create a simple user table, insert a user, and query the user data to validate your SurrealQL setup.

Frequently Asked Questions about surrealdb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write production-ready SurrealQL queries for SurrealDB?

To write production-ready SurrealQL queries, use core statements like SELECT, CREATE, UPDATE, DELETE, RELATE, and DEFINE. This ensures robust operations across document, graph, and relational data models in SurrealDB.

What is the best way to model graph relationships and recursive traversals in SurrealDB?

Modeling graph relationships in SurrealDB involves using edge tables and recursive traversals. You can define schemas using SCHEMAFULL or SCHEMALESS definitions to structure multi-model data architectures effectively.

How do I implement authentication and permissions in SurrealQL?

Implementing authentication in SurrealQL requires defining permissions and auditing patterns. You can apply security patterns directly within your schema definitions to control access and manage user authentication safely.

Can I use SCHEMAFULL and SCHEMALESS tables together in SurrealDB?

Yes, SurrealDB supports both SCHEMAFULL and SCHEMALESS table definitions. This allows you to enforce strict schemas where needed while maintaining flexibility for document, graph, and relational models within the same database.

How do transactions and live queries work in SurrealDB?

Transactions in SurrealDB group multiple operations into atomic units, while live queries provide real-time data updates. Both features are supported through specific SurrealQL syntax for robust data tasks.