surrealism

surrealism is a skill for Claude Code, Codex from 24601/surreal-skills. It costs 37 tokens per session (814 once invoked), scanned A, original, MIT.

A development workflow for Surrealism, SurrealDB’s system for running custom Rust functions compiled to WebAssembly inside the database. It covers writing, compiling, and registering these database extensions.

In plain words
What is it for?
Use it to create Surrealism projects, configure the WebAssembly target and manifest, annotate Rust functions, compile them with the SurrealDB CLI, and register the resulting modules and storage buckets.
Why use it?
It explains how to turn Rust functions into callable SurrealDB modules with the required project setup and database definitions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create Surrealism projects, configure the WebAssembly target and manifest, annotate Rust functions, compile them with the SurrealDB CLI, and register the resulting modules and storage buckets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/24601/surreal-skills/surrealism
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 24601/surreal-skills --skill surrealism
Clone the repo
git clone --depth 1 https://github.com/24601/surreal-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for surrealism

README.md
[![agentmods](https://agentmods.dev/badge/skills/24601/surreal-skills/surrealism/github.svg)](https://agentmods.dev/skills/24601/surreal-skills/surrealism)
Your own site
<a href="https://agentmods.dev/skills/24601/surreal-skills/surrealism"><img src="https://agentmods.dev/badge/skills/24601/surreal-skills/surrealism/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for surrealism

Your own site · 80×15
<a href="https://agentmods.dev/skills/24601/surreal-skills/surrealism"><img src="https://agentmods.dev/badge/skills/24601/surreal-skills/surrealism.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 814 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00814
Opus 5 $0.00018 $0.00407
Sonnet 5 $0.00007 $0.00163
Haiku 4.5 $0.00004 $0.00081

Measured 11d ago against content hash 51114b9b81f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

surrealism scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/surrealism/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Surrealism -- WASM Extensions for SurrealDB

New in SurrealDB 3. Write custom functions in Rust, compile them to WebAssembly (WASM), and deploy them as native database modules callable from SurrealQL.

Prerequisites

  • Rust toolchain (stable) with wasm32-unknown-unknown target
  • SurrealDB CLI v3.1.4+ (surreal binary with surreal module subcommand)
  • Familiarity with SurrealQL DEFINE MODULE and DEFINE BUCKET

Development Workflow

1. Annotate   -- surrealism.toml + #[surrealism] on Rust functions
2. Compile    -- surreal module compile  (produces .wasm binary)
3. Register   -- DEFINE BUCKET + DEFINE MODULE in SurrealQL

Quick Start

# 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');

Use Cases

  • Custom scalar functions callable from SurrealQL
  • Fake/mock data generation for testing
  • Domain-specific logic (language processing, quantitative finance, custom encoding)
  • Access to niche Rust crate functionality too specific for core SurrealDB
  • Custom analyzers for full-text search

Status

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.

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 101 lines · 37 tokens per session scan A 51114b9b81f2

Subscribe to this mod's changes

surrealism is a skill published in the GitHub repository 24601/surreal-skills (34 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 814 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

azure-cosmos-rust

Azure Cosmos DB SDK for Rust (NoSQL API). Use for document CRUD, queries, containers, and globally distributed data.

tmolavi/mcp-agent-skills-hub · 31 tokens

azure-cosmos-rust

Azure Cosmos DB library for Rust (NoSQL API). Document CRUD, containers, and globally distributed data. Triggers: "cosmos db rust", "CosmosClient rust", "document crud rust", "NoSQL rust", "partition key rust".

microsoft/skills · 56 tokens

entity-framework-core

Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET applications. USE FOR: DbContext, migrations, model configuration, EF queries, tracking, loading, performance, transactions, and EF6 migration decisions. DO NOT USE FOR…

managedcode/dotnet-skills · 110 tokens

entity-framework6

Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is not the right next step. USE FOR: EF6 codebases; runtime versus ORM migration decisions; EDMX, code-first, ObjectContext, and legacy data-access review. DO NOT USE FOR: unrelated stacks…

managedcode/dotnet-skills · 114 tokens

gdextension

Use when building native extensions for Godot — godot-cpp (C++) or gdext (Rust), binding classes, building, and GDScript/C# interop.

jame581/GodotPrompter · 38 tokens

azure-cosmos-rust

Client library for Azure Cosmos DB NoSQL API — globally distributed, multi-model database.

benjaminasterA/antigravity-awesome-skills · 0 tokens