surrealfs

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

A persistent virtual filesystem for AI agents, backed by SurrealDB, a database system. It provides folders, files, content search, and a Python agent interface that can be used across sessions.

In plain words
What is it for?
Listing, reading, searching, creating, editing, copying, and organising files in a virtual filesystem, including through an agent or command-line interface.
Why use it?
It gives agents durable, searchable storage instead of relying only on temporary files or short-lived session context.

Skill for Claude CodeCodex

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

Good fit Listing, reading, searching, creating, editing, copying, and organising files in a virtual filesystem, including through an agent or command-line interface.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/24601/surreal-skills/surrealfs
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 surrealfs
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 surrealfs

README.md
[![agentmods](https://agentmods.dev/badge/skills/24601/surreal-skills/surrealfs/github.svg)](https://agentmods.dev/skills/24601/surreal-skills/surrealfs)
Your own site
<a href="https://agentmods.dev/skills/24601/surreal-skills/surrealfs"><img src="https://agentmods.dev/badge/skills/24601/surreal-skills/surrealfs/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 surrealfs

Your own site · 80×15
<a href="https://agentmods.dev/skills/24601/surreal-skills/surrealfs"><img src="https://agentmods.dev/badge/skills/24601/surreal-skills/surrealfs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00041 $0.01293
Opus 5 $0.00020 $0.00647
Sonnet 5 $0.00008 $0.00259
Haiku 4.5 $0.00004 $0.00129

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

Security

Grade A, and why

surrealfs scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Supports piping from external commands: `curl https://example.com > /pages/example.html`
skills/surrealfs/SKILL.md · 152 lines

How it starts

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

SurrealFS -- Virtual Filesystem for AI Agents

SurrealFS provides a persistent, queryable virtual filesystem backed by SurrealDB. Designed for AI agents that need durable file operations, hierarchical storage, and content search across sessions.

Components

Component Crate/Package Language Purpose
Core Library surrealfs Rust Filesystem operations, CLI REPL, SurrealDB storage layer
AI Agent surrealfs-ai Python (Pydantic AI) Agent interface with tool integration, HTTP hosting

Rust Core -- Commands

The surrealfs crate provides a REPL with POSIX-like commands:

Command Description
ls List directory contents
cat Display file contents
tail Show last lines of a file
nl Number lines of a file
grep Search file contents
touch Create empty file
mkdir Create directory
write_file Write content to file
edit Edit file contents
cp Copy file
cd Change directory
pwd Print working directory

Supports piping from external commands: curl https://example.com > /pages/example.html

Storage backends:

  • Embedded RocksDB (local)
  • Remote SurrealDB via WebSocket

Python AI Agent

Built on Pydantic AI with tools that mirror the filesystem commands.

from surrealfs_ai import build_chat_agent

# Create the agent (default LLM: Claude Haiku)
agent = build_chat_agent()

# Expose over HTTP
import uvicorn
app = agent.to_web()
uvicorn.run(app, host="127.0.0.1", port=7932)

Features:

  • Default LLM: Claude Haiku
  • Telemetry via Pydantic Logfire (OpenTelemetry) -- see Security section for opt-out
  • All filesystem operations available as agent tools
  • HTTP hosting (default port 7932, bound to 127.0.0.1)
  • Path normalization: virtual FS root / is isolated; paths cannot escape to host filesystem

Quick Start

# Install the Rust core
cargo install surrealfs

# Start the REPL with embedded storage
surrealfs

# Or connect to a remote SurrealDB instance
surrealfs --endpoint ws://localhost:8000 --user root --pass root --ns agent --db workspace

# Install the Python agent
pip install surrealfs-ai

# Run the agent HTTP server
python -m surrealfs_ai --host 127.0.0.1 --port 7932

Read the full file on GitHub · 152 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 · 152 lines · 41 tokens per session scan A 58bc82cb88bd

Subscribe to this mod's changes

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