Install any skill in seconds. Free to start, no credit card required.
Get Started Free →SurrealFS virtual filesystem for AI agents. Rust core + Python agent (Pydantic AI). Persistent file operations backed by SurrealDB. Part of the surreal-skills collection.
.claude/skills/majiayu000-surrealfs/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -51% | 0% |
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.
| 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 |
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:
Built on Pydantic AI with tools that mirror the filesystem commands.
pythonfrom 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:
/ is isolated; paths cannot escape to host filesystembash# 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
Credentials: Remote SurrealDB connections require --user/--pass. Use dedicated, least-privilege credentials scoped to a specific namespace/database. Never use root credentials in shared or production environments.
Telemetry: The Python agent uses Pydantic Logfire (OpenTelemetry). To disable telemetry, set: export LOGFIRE_SEND_TO_LOGFIRE=false or configure Logfire with send_to_logfire=False in code. Audit telemetry endpoints before enabling in environments with sensitive data.
HTTP binding: The agent binds to 127.0.0.1 by default. Do not expose to 0.0.0.0 or public networks without authentication and TLS. If running in a container, use network isolation.
Pipe commands: The Rust core supports curl URL > /path syntax for content ingress. This executes the pipe source command on the host. Use only with trusted URLs in controlled environments. Do not allow untrusted input to construct pipe commands.
Sandboxing: The virtual FS root (/) is a SurrealDB-backed abstraction, not the host filesystem. Path traversal (e.g., ../../etc/passwd) is normalized and rejected. However, pipe commands execute on the host -- run in a container or sandbox if accepting untrusted agent input.
See the main skill's rule file for complete guidance:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | 15,109 | 13,792 | -9% | 1 | 1 | 0% | 2,386 | 2,466 | +3% | 0 | 0 | — |
case-01 | pass→pass | 6,722 | 12,110 | +80% | 1 | 1 | 0% | 1,200 | 2,204 | +84% | 0 | 0 | — |
case-02 | pass→pass | 13,563 | 16,933 | +25% | 1 | 1 | 0% | 2,481 | 3,615 | +46% | 0 | 0 | — |
case-03 | pass→pass | 19,225 | 19,649 | +2% | 1 | 1 | 0% | 3,201 | 3,644 | +14% | 0 | 0 | — |
case-04 | fail→pass | 14,118 | 11,412 | -19% | 1 | 1 | 0% | 1,646 | 1,973 | +20% | 0 | 0 | — |
case-05 | fail→pass | 15,202 | 4,105 | -73% | 1 | 1 | 0% | 1,570 | 1,952 | +24% | 0 | 0 | — |
case-07 | pass→pass | 29,340 | 2,448 | -92% | 1 | 1 | 0% | 3,263 | 1,480 | -55% | 0 | 0 | — |
case-08 | fail→pass | 9,524 | 7,650 | -20% | 1 | 1 | 0% | 1,564 | 1,498 | -4% | 0 | 0 | — |
case-09 | fail→pass | 25,118 | 2,152 | -91% | 1 | 1 | 0% | 2,814 | 1,374 | -51% | 0 | 0 | — |
case-10 | fail→pass | 19,018 | 7,167 | -62% | 1 | 1 | 0% | 2,087 | 1,433 | -31% | 0 | 0 | — |
case-11 | pass→pass | 19,647 | 10,688 | -46% | 1 | 1 | 0% | 2,360 | 1,995 | -15% | 0 | 0 | — |
case-12 | pass→pass | 16,402 | 9,790 | -40% | 1 | 1 | 0% | 1,976 | 1,920 | -3% | 0 | 0 | — |
case-13 | pass→pass | 18,187 | 9,017 | -50% | 1 | 1 | 0% | 2,141 | 1,908 | -11% | 0 | 0 | — |
case-14 | fail→pass | 10,440 | 2,182 | -79% | 1 | 1 | 0% | 1,855 | 1,413 | -24% | 0 | 0 | — |
case-15 | pass→pass | 7,093 | 6,864 | -3% | 1 | 1 | 0% | 1,260 | 1,403 | +11% | 0 | 0 | — |
case-16 | fail→pass | 48,809 | 4,901 | -90% | 1 | 1 | 0% | 5,497 | 1,522 | -72% | 0 | 0 | — |
case-17 | pass→pass | 19,442 | 9,164 | -53% | 1 | 1 | 0% | 2,315 | 1,781 | -23% | 0 | 0 | — |
case-18 | fail→pass | 8,771 | 2,305 | -74% | 1 | 1 | 0% | 1,461 | 1,326 | -9% | 0 | 0 | — |
case-19 | pass→pass | 9,218 | 6,780 | -26% | 1 | 1 | 0% | 674 | 1,336 | +98% | 0 | 0 | — |
case-20 | pass→pass | 14,361 | 7,127 | -50% | 1 | 1 | 0% | 2,287 | 1,421 | -38% | 0 | 0 | — |
case-21 | pass→pass | 5,794 | 1,473 | -75% | 1 | 1 | 0% | 858 | 1,287 | +50% | 0 | 0 | — |
case-22 | fail→pass | 11,002 | 2,366 | -78% | 1 | 1 | 0% | 1,741 | 1,510 | -13% | 0 | 0 | — |
case-23 | pass→pass | 6,793 | 6,529 | -4% | 1 | 1 | 0% | 1,006 | 1,313 | +31% | 0 | 0 | — |
case-24 | fail→pass | 17,917 | 1,442 | -92% | 1 | 1 | 0% | 2,171 | 1,289 | -41% | 0 | 0 | — |
case-25 | pass→pass | 6,788 | 2,317 | -66% | 1 | 1 | 0% | 1,327 | 1,449 | +9% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +44 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.