一键导入
surql-formatter
Use after editing or writing any `.surql` file, or when the user asks Claude to format, lint, or check SurrealQL files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use after editing or writing any `.surql` file, or when the user asks Claude to format, lint, or check SurrealQL files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user references Spectron, or when Spectron tools appear in the active toolset — this plugin connects Claude to a Spectron instance over its /mcp HTTP route.
Use when the user asks Claude to inspect, query, administer, or troubleshoot SurrealDB through the bundled Database MCP server — the user's own SurrealDB instance, reached over its built-in /mcp HTTP route.
Using SurrealDB with the Python SDK, covering both client/server mode (WebSocket) and embedded mode (in-memory or file-based). Use when connecting to SurrealDB from Python, using the surrealdb Python package, running SurrealDB embedded without a server, or performing CRUD operations from Python code. Triggers: surrealdb Python, Surreal(), AsyncSurreal(), Python SDK, embedded SurrealDB, mem://, file://.
Vector search with SurrealDB using HNSW indexes, KNN queries, and similarity scoring. Use when creating vector indexes, querying vectors with KNN distance operators, building semantic search or RAG pipelines, tuning HNSW parameters (EFC, M, M0, distance function, type), or implementing recommendation systems with SurrealDB. Triggers: HNSW, vector, embedding, KNN, cosine, euclidean, semantic search, RAG, vector::distance.
Generate and modify SurrealQL queries to interact with SurrealDB databases. This includes creating and retrieving records, designing and managing schemas, establishing and querying graph relationships, performing live (real-time) queries, and leveraging all unique SurrealQL features for advanced database workflows. Use this skill whenever users need to write, adapt, or troubleshoot SurrealQL statements.
| name | surql-formatter |
| description | Use after editing or writing any `.surql` file, or when the user asks Claude to format, lint, or check SurrealQL files. |
Primary instruction: after editing or writing any .surql file, run @surrealdb/surql-fmt on it:
npx -y --package=@surrealdb/surql-fmt surqlfmt --write path/to/file.surql
First run downloads the npm package and may take a few seconds. Formatter errors are non-fatal — if the formatter fails, leave the file as the user edited it and continue.
PostToolUse hook in plugins/surrealdb/settings.json already runs surqlfmt --write on every .surql file after Edit, Write, or MultiEdit. The model does not need to invoke the formatter — it happens automatically.surqlfmt via Bash after each .surql edit, per the primary instruction above.When unsure which host you are running in, just run the formatter — re-running it on already-formatted output is a no-op.
Format a file in place:
npx -y --package=@surrealdb/surql-fmt surqlfmt --write path/to/file.surql
Check formatting without writing (CI use — exits 1 on diff):
npx -y --package=@surrealdb/surql-fmt surqlfmt --check path/to/file.surql
Format from stdin:
echo 'SELECT * FROM user;' | npx -y --package=@surrealdb/surql-fmt surqlfmt --stdin
Common flags: --indent <n>, --indent-char space|tab, --max-line-length <n>.
.surql files only. SurQL strings embedded in JS/TS/Python/Rust sources are not touched — there is no language-server or tagged-template walker. To format an embedded query, copy it into a .surql scratch file, format it, and paste back.surqlfmt --check manually to see the error.PostToolUse block from plugins/surrealdb/settings.json, or delete the file.Manual surqlfmt invocations continue to work either way.