standards-surrealdb

Enforce security-focused SurrealDB schema design with RBAC patterns.

2|Updated Apr 10, 2024
One-click install
npx skills add https://github.com/gdurandvadas/dotfiles --skill standards-surrealdb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: standards-surrealdb
Source: https://github.com/gdurandvadas/dotfiles/tree/main/config/opencode/skills/standards-surrealdb
Command: npx skills add https://github.com/gdurandvadas/dotfiles --skill standards-surrealdb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SurrealDB projects often struggle with enforcing security, permissions, and scalable RBAC across complex schema designs. This skill provides a standardized approach to embed security patterns, role-based access control, and robust schema validation into SurrealDB deployments.

Core Features & Use Cases

  • Security-first schema design with explicit PERMISSIONS and RBAC
  • SCHEMAFULL validation and ASSERT checks for critical tables
  • Guidance on indexing, live subscriptions, and connection practices for secure deployments
  • Use Case: A multi-tenant application with per-user access controls and audited data access

Quick Start

Apply the SurrealDB standards to implement secure schemas and RBAC in your designs.

Frequently Asked Questions about standards-surrealdb

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

FAQPage Schema
How do I implement role-based access control in SurrealDB?

Role-based access control in SurrealDB is implemented by defining explicit PERMISSIONS within your schema design. This approach embeds security patterns directly into table definitions to enforce per-user access controls and audited data access.

What is SCHEMAFULL validation in SurrealDB and when should I use it?

SCHEMAFULL validation in SurrealDB enforces strict data structure rules by requiring explicit field definitions. You should use it with ASSERT checks for critical tables to guarantee schema correctness and prevent unauthorized or malformed data injection.

How to design secure SurrealDB schemas for multi-tenant applications?

Secure SurrealDB schemas for multi-tenant applications require explicit PERMISSIONS, SCHEMAFULL validation, and structured RBAC patterns. This combination enforces per-user access controls and ensures audited data access across isolated tenant boundaries.

Does SurrealDB support live queries and how do I handle their cleanup?

SurrealDB supports LIVE queries for real-time data subscriptions. Proper cleanup of these live subscriptions is required alongside secure connection practices to maintain performance and prevent resource leaks during deployment.

What are the best practices for SurrealDB indexing and secure deployment?

Best practices for SurrealDB indexing and secure deployment involve applying security-focused schema design, explicit PERMISSIONS, and proper indexing strategies. These practices ensure data correctness, query performance, and robust access control.