solidb
БесплатноЗапускает вложенные скриптыНе проверенUse when working with SoliDB (the Soli framework's document database) — writing or debugging SDBQL queries (its AQL-like FOR/FILTER/RETURN language), `@sdbql{…
от solisoft★ 20 звёзд на GitHubОб этом скилле
SoliDB and SDBQL
SoliDB is a document database (Rust; a new data directory is stored on
solistore since 2.15.0, on RocksDB through 2.14.0, and an existing
one keeps its engine) that speaks HTTP/JSON
(plus a binary MessagePack driver protocol on the same port). Queries are
written in SDBQL, an ArangoDB-AQL-style language: FOR … FILTER … SORT … LIMIT … RETURN. The Soli framework's Model ORM compiles to SDBQL.
Everything below was checked against solidb 2.4.0 and Soli 2.28.2 (Soli-side
statements reviewed against Soli 2.36.3's changelog, not re-run). Where a
claim could not be checked it says (unverified).
Core concepts
- Database → collections → documents. A server holds databases (
_systemalways exists). A collection holds JSON documents. Collection types:document(default),edge(requires_from/_to),blob. - System fields, added by the server on every write:
_key— the primary key, unique in its collection. Generated as a UUIDv7 string if you don't give one ("01a1682c-4ade-78e0-…"). Any string is accepted (even"bad key!")._id—"<database>:<collection>/<key>", e.g."shop:users/alice". Notusers/aliceas in ArangoDB.FILTER u._id == "users/alice"matches nothing; filter on_keyinstead._rev— a UUID that changes on every write (used forIf-MatchCAS)._created_at,_updated_at— RFC 3339 strings._id/_revyou supply on insert are overwritten.
- Edges reference vertices as
"collection/key"(_from: "users/alice"); traversal andDOCUMENT("users/alice")accept that short form. - Auth: every
/_api/*call needsAuthorization: Bearer <jwt>(fromPOST /auth/login), HTTP Basic (-u user:pass), orX-API-Key: <key>.GET /_api/healthis open.
SDBQL essentials
-- comments start with -- (NOT // or /* */ — those are parse errors)
FOR u IN users -- collection, array, range (1..10), or subquery
FILTER u.age >= @min AND u.active -- several FILTERs are ANDed
LET posts = (FOR p IN posts FILTER p.user_id == u._key RETURN p)
SORT u.age DESC, u.name ASC
LIMIT 20, 10 -- offset, count (or LIMIT count)
RETURN { name: u.name, n: LENGTH(posts) }
- Keywords are case-insensitive; function names are upper-case by convention.
- Since 3.1.0 (observed 2026-11-24/25 on builds of the tree
released as 3.1.0):
EXPLAIN <query>returns one plan row and does not write;EXPLAIN ANALYZEof a write does write, once, and returns the plan without timings.QUALIFY <window-predicate>filters after the body and beforeSORT(windows numbered on the full set).FOR d IN c SAMPLE n/SAMPLE p PERCENTsamples the source beforeFILTERand reads all of it.COLLECT a = …, b = … ROLLUP|CUBE AGGREGATE …adds subtotals;GROUPING(a)is 1 whereawas rolled up. Full rules:references/sdbql.md. - Strings take
"…"or'…'. Object keys: bare, quoted ({"b-c": 1}), or shorthand{name}. Computed keys{[k]: 1}are not supported. LETmay come afterSORT/LIMIT— then it runs only for surviving rows.RETURN DISTINCT expr;x[*].fieldprojects over an array;a[-1]is the last element;1..3is an inclusive range[1,2,3].- Operators:
== != < <= > >=,IN,NOT IN,LIKE(%,_, case-sensitive),=~/!~regex,AND OR NOT/&& || !,? :,??(null fallback),?.(null-safe access),|>(pipe into a function's first argument),CASE WHEN … THEN … ELSE … END. null || "x"→"x"butnull OR "x"→true(||returns a value).- Quantifiers:
FILTER ANY t IN u.tags SATISFIES t == "x"andNONE … SATISFIESwork;ALL … SATISFIESdoes not parse — useEVERY(u.tags, t -> t == "x"). - Lambdas:
MAP(xs, x -> x * 2),FILTER(xs, x -> x > 1),REDUCE(xs, (acc, x) -> acc + x, 0),SORT_BY,GROUP_BY,EVERY,SOME. - Read one document:
DOCUMENT("users/alice")orDOCUMENT("users", "alice")(returnsnullwhen missing).
Grouping
FOR o IN orders
COLLECT country = o.country -- group key(s)
AGGREGATE total = SUM(o.amount), n = COUNT() -- per-group aggregates
FILTER total > 100 -- post-COLLECT filter
SORT total DESC
RETURN { country, total, n }
FOR o IN orders COLLECT s = o.status WITH COUNT INTO n RETURN { s, n }
FOR o IN orders COLLECT s = o.status INTO g RETURN { s, keys: g[*].o._key }
FOR o IN orders COLLECT s = o.status INTO keys = o._key RETURN { s, keys }
FOR o IN orders COLLECT AGGREGATE total = SUM(o.amount) RETURN total -- no key
-- Since 3.1.0. Subtotals; GROUPING is 1 on a rolled-up key.
FOR o IN orders
COLLECT country = o.country, status = o.status ROLLUP
AGGREGATE total = SUM(o.amount)
RETURN { country, status, total, rolled: GROUPING(status) }
Window functions work in RETURN, in a LET and, since 3.1.0,
in QUALIFY (the predicat
Установить solidb в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл solidb?
Use when working with SoliDB (the Soli framework's document database) — writing or debugging SDBQL queries (its AQL-like FOR/FILTER/RETURN language), `@sdbql{ … }` blocks, `db.query(...)` / the `Solidb` client, `Model.where("doc.… == @x", binds)` strings, Soli model queries that need raw SDBQL (window functions, graph traversal, UPSERT, bulk writes), reading `.to_query` / `dev_queries()` output, or calling the SoliDB HTTP API (`/auth/login`, `/_api/database/{db}/cursor`, collections, documents, indexes, transactions). Also for running a throwaway `solidb` instance to test queries.
Как установить скилл solidb?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл solidb запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic