← 返回 Skills 市场
gausszhu

SQL Guard Copilot

作者 GaussZhu · GitHub ↗ · v0.2.0 · MIT-0
cross-platform ⚠ suspicious
307
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install sql-guard-copilot-zhu
功能描述
Simplify SQL querying and troubleshooting for MySQL, PostgreSQL, and SQLite. Use when users ask to inspect schema, convert natural language to SQL, debug SQL...
安全使用建议
This skill appears to be a legitimate SQL helper, but review these points before installing or using it: - Expect to supply SQL_DSN (DB credentials) and, for the natural-language 'ask' feature, an OPENAI_API_KEY and OPENAI_BASE_URL. The registry metadata did not declare these — verify you are comfortable passing credentials via environment variables or CLI. - The 'ask' command sends schema and prompts to an external LLM endpoint (defaults to api.openai.com). That will expose table/column names and possibly query text/results to the remote model. If your data or schema are sensitive, do not use 'ask' against a remote LLM; consider using --dry-run, a local/private LLM endpoint, or disabling 'ask'. - Use a least-privilege, read-only DB user in SQL_DSN. Test against a non-sensitive sample DB first to confirm the read-only guard blocks writes and DDL as promised. - If you must allow LLM access, set OPENAI_BASE_URL to a trusted host, restrict --max-tables/--max-columns, and review the prompt with --show-prompt before execution. - Enable audit logging to a secure location (SQL_EASY_AUDIT_LOG or --audit-log) and inspect logs for any unexpected data capture. - Review/inspect scripts/sql_easy.py yourself (or have a trusted reviewer do so) before running in production, and pin dependency versions when installing runtime libraries.
功能分析
Type: OpenClaw Skill Name: sql-guard-copilot-zhu Version: 0.2.0 The skill bundle provides a legitimate SQL assistant tool (sql-query-copilot) designed for schema discovery, linting, and safe querying across MySQL, PostgreSQL, and SQLite. The core script, scripts/sql_easy.py, implements several security guardrails, including a read-only enforcement mechanism that blocks DML/DDL keywords (e.g., INSERT, DROP, ALTER) and a linting engine to warn about risky patterns like missing LIMIT clauses or full table scans. While it includes an 'ask' feature that integrates with LLMs for natural language to SQL conversion, it does so using standard API patterns and provides clear documentation on its security defaults.
能力评估
Purpose & Capability
The name/description (SQL helper for MySQL/Postgres/SQLite) matches the included code and commands. However, the registry metadata declares no required environment variables or primary credential while the runtime instructions and code require SQL_DSN for DB access and optionally OPENAI_API_KEY / OPENAI_BASE_URL for natural-language 'ask' mode. That metadata omission reduces transparency.
Instruction Scope
SKILL.md and the CLI prominently instruct setting SQL_DSN and (for 'ask') OPENAI_API_KEY and base URL. The 'ask' flow builds a schema prompt (tables/columns) and sends it to an LLM endpoint (default https://api.openai.com or any user-supplied base URL). That means database schema — and potentially query text or results depending on options — will be transmitted off-host. The skill otherwise enforces read-only guards and blocks DDL/DML tokens, which is appropriate, but the external transmission of schema/data is a significant privacy/exfiltration risk and should be explicitly considered before use.
Install Mechanism
No install spec (instruction-only with a single Python script). Dependencies (pymysql, psycopg/psycopg2) are imported at runtime and only required for corresponding DB drivers; the script raises clear errors if a dependency is missing. No remote arbitrary downloads are used in the provided files.
Credentials
The skill requires sensitive inputs at runtime: SQL_DSN (which contains DB host, username, and password in the examples) and optionally OPENAI_API_KEY/OPENAI_BASE_URL. The registry did not declare these env vars. Asking for an LLM API key and sending schema/data to an LLM is proportional for the 'ask' capability but increases risk: use of an unrestricted base URL allows pointing to arbitrary endpoints. Audit logging to a JSONL file is available and should be configured carefully.
Persistence & Privilege
always is false and the skill does not request persistent platform-wide privileges. It does write optional local audit logs (user-specified path) but does not modify other skills or system-wide config. Agent autonomous invocation is allowed by default (normal), but combine this with the data-exfil risk when enabling autonomous runs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install sql-guard-copilot-zhu
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /sql-guard-copilot-zhu 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.0
v0.2.0: add ask(natural language), lint, explain, summary, postgres support, audit log
元数据
Slug sql-guard-copilot-zhu
版本 0.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

SQL Guard Copilot 是什么?

Simplify SQL querying and troubleshooting for MySQL, PostgreSQL, and SQLite. Use when users ask to inspect schema, convert natural language to SQL, debug SQL... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 307 次。

如何安装 SQL Guard Copilot?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install sql-guard-copilot-zhu」即可一键安装,无需额外配置。

SQL Guard Copilot 是免费的吗?

是的,SQL Guard Copilot 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

SQL Guard Copilot 支持哪些平台?

SQL Guard Copilot 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 SQL Guard Copilot?

由 GaussZhu(@gausszhu)开发并维护,当前版本 v0.2.0。

💬 留言讨论