/surrealdb:surrealdb-pythonfrom surrealdb
Connects to SurrealDB from Python using the surrealdb package, covering WebSocket client/server mode and embedded in-memory or file-based operation.
Ships in surrealdb. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Persist data with RocksDB:
surreal start -u root -p root rocksdb:database
In-memory:
surreal start -u root -p root
Connect via WebSocket using the Surreal context manager:
from surrealdb import Surreal
with Surreal("ws://localhost:8000/rpc") as db:
db.signin({"username": "root", "password": "root"})
db.use("namespace_test", "database_test")
db.create(
"person",
{
"user": "me",
"password": "safe",
"marketing": True,
"tags": ["python", "documentation"],
},
)
print(db.select("person").execute())
print(db.update("person", {
"user": "you",
"password": "very_safe",
"marketing": False,
"tags": ["Awesome"],
}))
print(db.delete("person").execute())
db.query("""
insert into person {
user: 'me',
password: 'very_safe',
tags: ['python', 'documentation']
};
""").execute()
print(db.query("select * from person").execute())
print(db.query("""
update person content {
user: 'you',
password: 'more_safe',
tags: ['awesome']
};
""").execute())
print(db.query("delete person").execute())
.execute()query(), select(), delete() and the no-data forms of create() /
insert() return a builder. With the sync client, nothing is sent until
you call .execute() (or iterate the builder); a dropped builder is a silent
no-op and emits a RuntimeWarning. create() / update() with a data
argument run immediately. With AsyncSurreal, await the call instead
(await db.query(...)), and .execute() also works.
query() returns a list with one result per statement, even for a single
statement. .first() runs the query and returns just the first statement's
result:
people = db.query("select * from person").first()
Run SurrealDB directly inside your Python process — no server required.
Install with pip install "surrealdb[embedded]".
Surreal("mem://") / AsyncSurreal("mem://")Surreal(f"file://{db_path}") / AsyncSurreal(f"file://{db_path}")See references/embedded.md for a complete async example with file-based persistence.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub surrealdb/agent-skills --plugin surrealdb10 skills in this plugin
/surrealdb-agent-memory-docsLook up official SurrealDB Agent Memory (formerly Spectron) documentation from surrealdb.com as markdown: quickstarts, mental model, ingest, sessions, recall, reasoning, SDKs, framework integrations, MCP server, REST API, CLI, and configuration. Use when building with or answering questions about SurrealDB Agent Memory. Read-only; sends only search terms and doc paths./surrealdb-cliUse the `surreal` command-line binary to run a SurrealDB server (in-memory, RocksDB, SurrealKV, or TiKV), open an interactive or piped SQL REPL, import and export databases, check server readiness, install, switch and pin multiple database versions (`surreal +4.0.1 db …`), repair storage, and manage SurrealML models. Use this skill whenever users run, connect to, back up, restore, or operate SurrealDB from the terminal. Triggers: surreal db start, surreal db sql, surreal db import, surreal db export, surreal install, surreal cloud, surreal memory, surreal use, surreal list, surreal upgrade, surreal +VERSION, surreal fix, surreal ml, SurrealDB CLI, surreal server./surrealdb-docsLook up official SurrealDB documentation (SurrealQL, SDKs, CLI, deployment) from surrealdb.com as markdown. Read-only; sends only search terms and doc paths./surrealdb-jsUsing SurrealDB from JavaScript and TypeScript with the official surrealdb SDK, covering connecting (WebSocket/HTTP and embedded engines), authentication, CRUD, parameterized queries, and live queries. Use when connecting to SurrealDB from Node, Deno, Bun, or the browser, using the surrealdb npm package, or performing CRUD and real-time operations from JS/TS code. Triggers: surrealdb JS, surrealdb.js, new Surreal(), db.query, db.create, db.live, TypeScript SDK, npm i surrealdb./surrealdb-vectorVector search with SurrealDB using HNSW indexes, KNN queries, and similarity scoring. Use when creating vector indexes, querying vectors with KNN distance operators, building semantic search or RAG pipelines, tuning HNSW parameters (EFC, M, M0, distance function, type), or implementing recommendation systems with SurrealDB. Triggers: HNSW, vector, embedding, KNN, cosine, euclidean, semantic search, RAG, vector::distance./surrealkitUse SurrealKit, SurrealDB's schema-management and migration CLI, to scaffold projects from templates, sync schema in development, plan and execute production rollouts (with rollback), statically check SurrealQL without a database, generate JSON/TypeScript types, and write declarative TOML test suites for schemas, permissions, and API endpoints. Use this skill whenever users set up, migrate, type, check, or test a SurrealDB schema with SurrealKit.Other plugins' skills for the same job