By codecubit
SurrealDB v3 and JavaScript SDK v2 expertise for Claude Code — two skills (SurrealQL and the surrealdb npm package), two slash commands for review and scaffolding, and an MCP server that wraps the surreal CLI.
Write correct JavaScript and TypeScript against the SurrealDB SDK v2 (`surrealdb` npm package). Use this skill whenever the user imports from `"surrealdb"`, calls `new Surreal()`, `db.connect`, `db.use`, `db.signin`, `db.signup`, `db.authenticate`, `db.query`, `db.select`, `db.create`, `db.update`, `db.merge`, `db.patch`, `db.delete`, `db.live`, `db.kill`, `db.close`, constructs a `RecordId`/`Table`/`Uuid`, sets up a SurrealDB connection in a Node or browser app, debugs SDK errors like `ResponseError` or `EngineDisconnected`, or migrates from the legacy `surrealdb.js` v1 package. Pair with the `surrealql` skill whenever the user writes the query string. Trigger even when the user does not explicitly name the skill.
Write correct SurrealQL for SurrealDB v3 — queries, schema design, graph edges, permissions, live queries, transactions, full-text and vector search. Use this skill whenever the user is working in a `.surql` file, asks for any SurrealQL statement (SELECT, CREATE, UPDATE, UPSERT, DELETE, INSERT, RELATE, LIVE SELECT, DEFINE, REMOVE, REBUILD, BEGIN/COMMIT), designs a database schema with DEFINE TABLE/FIELD/INDEX/EVENT/FUNCTION/ACCESS/ANALYZER/SEQUENCE, writes row-level permissions using `$auth`, traverses graph relationships with arrow syntax, or debugs query errors. Trigger even when the user does not explicitly name the skill.
Admin access level
Server config contains admin-level keywords
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code plugin for working with SurrealDB v3 and the JavaScript SDK v2 (surrealdb npm package).
SurrealDB has two sides most users touch:
surrealdb npm package used from Node, browsers, React Native.These are different concerns. This plugin ships a skill for each, plus two slash commands and an MCP server wrapping the surreal CLI.
Versions. This plugin targets SurrealDB server v3 and JavaScript SDK v2. If you're on server v1/v2 or the legacy
surrealdb.jspackage, some recipes here won't apply — check the version note in each skill.
| Component | Name | When it triggers |
|---|---|---|
| Skill | surrealql | Writing/reviewing .surql, schema, DEFINE ..., permissions, live queries, graph edges |
| Skill | surrealdb-js | Code using the surrealdb package — new Surreal(), db.query, RecordId, auth flows |
| Command | /surrealql-review | Review a SurrealQL file or snippet for v3 compatibility and common gotchas |
| Command | /surreal-scaffold | Generate a starter schema.surql + SDK client for a new project |
| MCP | surreal-cli | Exposes surreal_version, surreal_is_ready, surreal_sql, surreal_import, surreal_export |
claude plugin marketplace add codecubit/surrealdb-claude-plugin
claude plugin install surrealdb-v3@surrealdb-claude-plugin
Clone the repo and install the plugin directory.
For the MCP server, install dependencies once:
cd mcp-server && npm install
Make sure the surreal CLI is on your PATH:
curl -sSf https://install.surrealdb.com | sh
surreal --version
The MCP server reads connection details from env vars. Set them in your shell or Claude Code config:
| Var | Purpose | Default |
|---|---|---|
SURREAL_BIN | Path/name of the surreal binary | surreal |
SURREAL_URL | Server URL (e.g. http://127.0.0.1:8000) | (required) |
SURREAL_NS | Default namespace | (empty) |
SURREAL_DB | Default database | (empty) |
SURREAL_USER | Operator username | (empty) |
SURREAL_PASS | Operator password | (empty) |
You can still override any of these per tool call — tool arguments take precedence over env.
surreal_version — print the CLI version (and server version if url is set).surreal_is_ready — GET /health probe.surreal_sql — run ad-hoc SurrealQL via surreal sql. Supports multi-statement input.surreal_import — apply a .surql file (or inline content) via surreal import.surreal_export — dump a namespace/database to a .surql file (returned inline if no path).surreal_info — run INFO FOR DB, INFO FOR TABLE <name>, or INFO FOR NS to inspect schema.# 1. Start a local SurrealDB server
surreal start --user root --pass root --log info memory
# 2. Export env vars
export SURREAL_URL=http://127.0.0.1:8000
export SURREAL_USER=root
export SURREAL_PASS=root
export SURREAL_NS=app
export SURREAL_DB=main
# 3. In Claude Code, ask for a starter:
# /surreal-scaffold
Then apply the generated schema with the surreal_import MCP tool, or directly:
surreal import --conn $SURREAL_URL --user $SURREAL_USER --pass $SURREAL_PASS --ns app --db main schema.surql
Both skills use progressive disclosure. The SKILL.md is short; dense material sits in references/.
skills/surrealql/
references/dml.md — CREATE/SELECT/UPDATE/UPSERT/DELETE/INSERT/RELATE, graph traversal, types, operators.references/schema.md — DEFINE TABLE/FIELD/INDEX/EVENT/FUNCTION/PARAM/SEQUENCE/CONFIG/USER/ANALYZER.references/permissions.md — $auth-based row-level permissions, patterns, caveats.references/advanced.md — live queries, transactions, full-text/vector search, GraphQL.references/auth.md — DEFINE ACCESS types (RECORD / JWT / BEARER), v1→v3 migration.references/modeling.md — decision tree: record links vs graph edges vs embedding, anti-patterns, denormalization.references/migrations.md — safe schema evolution: add/remove/rename fields, backfill pattern, versioning traps.references/cookbook.md — 10 real-world recipes: pagination, full-text search, graph recommendations, transactions, soft delete.references/gotchas.md — 28 gotchas (18 common + 10 from production incidents).skills/surrealdb-js/
references/api.md — every method on Surreal, every helper class.references/patterns.md — connection lifecycle, auth flows, live-query reconnect, testing.references/gotchas.md — SDK-specific traps.MIT.
SurrealDB v3 plugin tailored to the Base platform — Schema Builder, pre-commit gates, jsonify/extractId, Mastra SCHEMALESS, EventBus/SurrealLiveAdapter, and real production-incident lessons.
npx claudepluginhub codecubit/surrealdb-claude-plugin --plugin surrealdb-v3Give your AI a memory — mine projects and conversations into a searchable palace. 33 MCP tools, auto-save hooks, and guided setup.
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.
TypeScript/JavaScript full-stack development with NestJS, React, and React Native
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Intelligent draw.io diagramming plugin with AI-powered diagram generation, multi-platform embedding (GitHub, Confluence, Azure DevOps, Notion, Teams, Harness), conditional formatting, live data binding, and MCP server integration for programmatic diagram creation and management.
Persistent file-based planning for AI coding agents. Crash-proof markdown plans (task_plan.md, findings.md, progress.md) that survive context loss and /clear, with an opt-in completion gate and multi-agent shared state. Manus-style. Works with Claude Code, Codex CLI, Cursor, Kiro, OpenCode and 60+ agents via the SKILL.md standard. Includes Arabic, German, Spanish, and Chinese (Simplified and Traditional).