
Surrealql Functions
- 131 installs
- 21 repo stars
- Updated June 16, 2026
- surrealdb/agent-skills
Helps with ai & agent building tasks.
About
surrealql-functions is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- surrealql-functions
- AI & Agent Building
- AI-coding skill
Surrealql Functions by the numbers
- 131 all-time installs (skills.sh)
- +13 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #3,660 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/surrealdb/agent-skills --skill surrealql-functionsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 131 |
|---|---|
| repo stars | ★ 21 |
| Last updated | June 16, 2026 |
| Repository | surrealdb/agent-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
SurrealQL Functions
SurrealDB ships hundreds of built-in functions grouped into namespaces (string::, array::, math::, type::, …). Function names and signatures change between releases, so the authoritative, version-current source is the SurrealQL tooling rather than memory:
- surrealql-language-server (LSP) — completions for built-in functions, hover with type info and function signatures, and signature help.
- surrealql-tree-sitter — the grammar the LSP parses with (targets SurrealDB v3+).
For mapping any function to authoritative documentation, see references/catalog.md.
When to use this skill
- Looking up which built-in function does what, or its exact arguments
- Getting live completions, hover, and signature help for
.surqlfiles - Confirming a function exists / has the expected signature in the installed
SurrealDB version (avoids emitting renamed or removed functions)
Setup
Install the language server from crates.io — the published crate bundles the grammar, so no separate tree-sitter checkout is needed:
cargo install surrealql-language-server
# -> installs the `surrealql-language-server` binary on your PATH (~/.cargo/bin)Verify it is on your PATH:
surrealql-language-server --helpBuild from source (optional)
Only needed for development or to track unreleased changes. The source build requires the tree-sitter grammar checked out as a sibling directory:
git clone https://github.com/surrealdb/surrealql-language-server.git
cd surrealql-language-server
bash scripts/setup-grammar.sh # clones/updates the grammar
# ...or: export TREE_SITTER_SURREALQL_DIR=/abs/path/to/surrealql-tree-sitter
cargo build --release # -> target/release/surrealql-language-serverFor browser/editor embedding, build the wasm-bindgen npm package instead with bash scripts/build-wasm.sh (outputs to pkg/).
Editor integration
Point your editor's LSP client at the surrealql-language-server binary for the .surql / surrealql language. Generic stdio LSP configuration:
- Command:
surrealql-language-server(or the absolute path from a source build) - File types:
*.surql
The server then provides, against the installed grammar version:
- Completions — built-in function names per namespace, field names,
record<table> types, and keywords
- Hover — type info, permission posture, and function signatures
- Signature help — argument shapes while typing a call
Using it to discover functions
- Open or create a
.surqlbuffer connected to the LSP. - Type a namespace prefix (e.g.
string::) and trigger completion to enumerate
that namespace's built-in functions for the installed version.
- Hover a function call, or invoke signature help inside the parentheses, to see
its exact signature and argument types.
Because completions and signatures come from the installed grammar, they reflect the current SurrealDB version — preventing stale or renamed functions from older releases. To read full documentation and examples for any namespace, follow the links in references/catalog.md.
Built-in Function Catalog
Every built-in SurrealQL function belongs to a namespace. Use this catalog to jump to authoritative docs for a namespace; use the language server (see SKILL.md) for exact, version-current signatures and completions.
Docs follow the pattern https://surrealdb.com/docs/surrealql/functions/database/<namespace>. Treat the docs site as the source of truth for the latest SurrealDB release; older versions may lack or rename functions.
| Namespace | Covers | Docs |
|---|---|---|
api | Custom API endpoint definition helpers | api |
array | Array manipulation, search, fold/reduce, set-like ops | array |
bytes | Byte-array length and inspection | bytes |
count | Counting values and truthy results | count |
crypto | Hashing and password helpers (argon2, bcrypt, scrypt, md5, sha) | crypto |
duration | Convert and extract parts of durations | duration |
encoding | base64 and similar encode/decode | encoding |
file | Storage bucket / file operations | file |
geo | Geospatial distance, area, bearing, hashing | geo |
http | Make HTTP requests (get/post/put/patch/delete) | http |
math | Numeric and statistical functions | math |
meta | Inspect record id / table metadata | meta |
not | Logical negation of a value's truthiness | not |
object | Build and inspect objects (keys, values, entries) | object |
parse | Parse emails and URLs into parts | parse |
rand | Random values, ULID/UUID, sampling | rand |
record | Inspect record ids (id, table, exists) | record |
search | Full-text search scoring and highlighting | search |
sequence | Read/advance defined sequences | sequence |
session | Current session/auth/namespace context | session |
set | Set operations (union, intersect, difference) | set |
sleep | Pause execution for a duration | sleep |
string | String manipulation, formatting, validation (string::is::*) | string |
time | Now, parts, rounding, conversions for datetimes | time |
type | Cast/convert values and construct ids (type::thing, type::table, …) | type |
value | Generic value inspection helpers | value |
vector | Vector math and distance/similarity functions | vector |
Notes:
type::*functions and record-id construction have changed across major
versions — verify the exact form against the installed version via the LSP or the docs rather than assuming older syntax.
- Scripting (
function() { … }) and customfn::*functions are user-defined,
not built-ins; see the surrealql skill's schema reference.