surrealql

Write and debug SurrealQL queries and schema definitions for SurrealDB 3.0.

1|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/baladithyab/engram --skill surrealql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: surrealql
Source: https://github.com/baladithyab/engram/tree/main/skills/surrealql
Command: npx skills add https://github.com/baladithyab/engram --skill surrealql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users write correct SurrealQL queries, manage SurrealDB schema definitions, and debug errors, preventing common pitfalls and ensuring efficient database operations.

Core Features & Use Cases

  • SurrealQL Syntax: Provides guidance on correct SurrealQL syntax, differentiating it from standard SQL.
  • Schema Management: Assists in defining tables, fields, indexes, and relations using DEFINE statements.
  • Query Debugging: Helps identify and fix errors in SurrealQL queries, especially concerning UPSERT, VALUE vs COMPUTED, and FULLTEXT vs SEARCH analyzers.
  • Use Case: You need to create a new table in SurrealDB 3.0 to store user preferences, ensuring it's SCHEMAFULL and includes a FULLTEXT index for searching user-defined descriptions.

Quick Start

Use the surrealql skill to write a SurrealQL query to create a new table named 'preferences' with a 'user_id' field and a 'description' field that supports full-text search.

Frequently Asked Questions about surrealql

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

FAQPage Schema
How do I write a SurrealDB UPSERT query correctly in version 3.0?

To write a SurrealDB UPSERT query correctly in version 3.0, you must use the specific SurrealQL syntax that differentiates it from standard SQL updates. This skill provides guidance on correct syntax and helps identify anti-patterns for UPSERT operations.

What is the difference between VALUE and COMPUTED fields in SurrealQL schema definitions?

The difference between VALUE and COMPUTED fields in SurrealQL schema definitions is a critical syntax distinction. This skill helps define tables and fields correctly using DEFINE statements while debugging common errors related to these field types.

How do I create a SCHEMAFULL table with a FULLTEXT index for searching in SurrealDB?

To create a SCHEMAFULL table with a FULLTEXT index for searching in SurrealDB, you use DEFINE statements to manage schema definitions. This skill assists in defining tables, fields, indexes, and relations for efficient database operations.

Why are my SurrealDB 2.x queries breaking after upgrading to 3.0?

Your SurrealDB 2.x queries are breaking after upgrading to 3.0 due to critical breaking changes and syntax differences. This skill addresses these breaking changes and common anti-patterns to help fix errors in SurrealQL queries.

Can I use BM25 and HNSW indexing for hybrid search strategies in SurrealDB?

You can use BM25 and HNSW indexing for hybrid search strategies in SurrealDB. This skill provides comprehensive guidance on managing these indexing types and differentiating between FULLTEXT and SEARCH analyzers.