24601/surrealism/SKILL.md
SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.
npx skillsauth add openclaw/skills surrealismInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
New in SurrealDB 3. Write custom functions in Rust, compile them to WebAssembly (WASM), and deploy them as native database modules callable from SurrealQL.
wasm32-unknown-unknown targetsurreal binary with surreal module subcommand)DEFINE MODULE and DEFINE BUCKET1. Annotate -- surrealism.toml + #[surrealism] on Rust functions
2. Compile -- surreal module compile (produces .wasm binary)
3. Register -- DEFINE BUCKET + DEFINE MODULE in SurrealQL
# Create a new Surrealism project
cargo new --lib my_extension
cd my_extension
# Add the WASM target
rustup target add wasm32-unknown-unknown
# Create surrealism.toml (required manifest)
cat > surrealism.toml << 'TOML'
[package]
name = "my_extension"
version = "0.1.0"
TOML
# Write your extension (annotate with #[surrealism])
cat > src/lib.rs << 'RUST'
use surrealism::surrealism;
#[surrealism]
fn greet(name: String) -> String {
format!("Hello, {}!", name)
}
RUST
# Compile to WASM using SurrealDB CLI
surreal module compile
# Register in SurrealDB
surreal sql --endpoint http://localhost:8000 --user root --pass root --ns test --db test
-- Grant access to the WASM file
DEFINE BUCKET my_bucket;
-- Register the module functions
DEFINE MODULE my_extension FROM 'my_bucket:my_extension.wasm';
-- Use the function in queries
SELECT my_extension::greet('World');
Surrealism is actively in development and not yet stable. The API may change between SurrealDB 3.x releases. File feedback via GitHub issues/PRs on the surrealdb/surrealdb repository.
See the main skill's rule file for complete guidance:
surreal module referencetools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。