/surrealdb:surrealdb-pythonfrom surrealdb
Using SurrealDB with the Python SDK, covering both client/server mode (WebSocket) and embedded mode (in-memory or file-based). Use when connecting to SurrealDB from Python, using the surrealdb Python package, running SurrealDB embedded without a server, or performing CRUD operations from Python code. Triggers: surrealdb Python, Surreal(), AsyncSurreal(), Python SDK, embedded SurrealDB, mem://, file://.
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"))
print(db.update("person", {
"user": "you",
"password": "very_safe",
"marketing": False,
"tags": ["Awesome"],
}))
print(db.delete("person"))
db.query("""
insert into person {
user: 'me',
password: 'very_safe',
tags: ['python', 'documentation']
};
""")
print(db.query("select * from person"))
print(db.query("""
update person content {
user: 'you',
password: 'more_safe',
tags: ['awesome']
};
"""))
print(db.query("delete person"))
Run SurrealDB directly inside your Python process — no server required.
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
Other plugins' skills for the same job
npx claudepluginhub surrealdb/ai-claude-plugin --plugin surrealdb5 skills in this plugin
/surql-formatterUse after editing or writing any `.surql` file, or when the user asks Claude to format, lint, or check SurrealQL files./surrealdb-mcpUse when the user asks Claude to query, inspect, administer, or troubleshoot SurrealDB through the bundled MCP server — SurrealDB's managed MCP at mcp.surrealdb.com, covering both data (SurrealQL, schema, records) and account-level work (instances, organizations, spend)./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.