← 返回 Skills 市场
Middleware Query
作者
gakkiismywife
· GitHub ↗
· v1.0.0
· MIT-0
194
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install middleware-query
功能描述
Natural-language read-only querying for MySQL, Redis, and MongoDB with explicit connection configuration (host, port, username, password), guarded query plan...
安全使用建议
This skill appears to do what it says: translate NL into guarded, read-only DB queries and run them against explicit connection profiles. Before installing: 1) Keep your connections.json local and gitignored (the docs make this recommendation). 2) Review and control which DB credentials you give it — the tool needs host/port/user/password to connect. 3) If you don't want any queries or user text sent to OpenAI, do not set OPENAI_API_KEY (the planner will fall back to a local rule-based router). 4) Run the Python dependencies in an isolated environment and inspect connections.json and any saved plan files if you keep them. 5) Note masking is implemented for common sensitive field names, but confirm it covers any custom secret field names you care about.
功能分析
Type: OpenClaw Skill
Name: middleware-query
Version: 1.0.0
The middleware-query skill bundle provides a structured and safety-conscious framework for querying MySQL, Redis, and MongoDB. It implements a multi-stage pipeline (Plan -> Guard -> Execute) that enforces read-only operations through regex patterns and command whitelists in scripts like query_sql.py, query_redis.py, and query_mongo.py. Additionally, it includes a sensitive data masking utility in _common.py to redact passwords and PII from query results, and it follows best practices by requiring local configuration of credentials via a gitignored connections.json file.
能力评估
Purpose & Capability
The name/description (read-only NL queries for MySQL/Redis/Mongo) matches the included scripts and referenced config. The skill asks for database connection parameters (host/port/username/password) which are appropriate and necessary for the stated functionality. No unrelated services or credentials are requested.
Instruction Scope
SKILL.md and the scripts stick to the declared scope (collect connection info, produce guarded read-only plans, execute using script-level executors). One privacy-related behavior to note: the optional LLM planner (when OPENAI_API_KEY is set) will send the user NL request (and default profile names) to OpenAI. The skill documents this fallback and how to disable it by not setting OPENAI_API_KEY. Also, the JSON schema allows additionalProperties, so a returned plan could include unexpected fields — the current execution flow does not use arbitrary extra fields, but it's worth knowing.
Install Mechanism
There is no remote install/download step. The skill is instruction/code-only and ships Python scripts. No external archives or URL downloads are used. Optional Python packages are documented (openai, jsonschema, pymongo, redis, pymysql), which is expected for DB clients and LLM integration.
Credentials
The skill sensibly uses database-specific environment variables (MYSQL_*, REDIS_*, MONGO_*) and optionally OPENAI_API_KEY for planner LLM access. The registry declared no required envs; that matches reality because envs are optional fallbacks or used only if you enable the LLM planner. Requesting DB credentials (via connections.json or envs) is proportionate to the task; ensure you only provide credentials you intend the skill to access.
Persistence & Privilege
always is false and the skill does not request elevated agent-wide privileges. It stores/reads a local connections.json and writes temporary plan JSON files; this is normal for a CLI-style skill. It does not modify other skills or global agent configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install middleware-query - 安装完成后,直接呼叫该 Skill 的名称或使用
/middleware-query触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: NL query for MySQL/Redis/Mongo with guarded execution, multi-env env/alias profile selector, and one-command entry.
元数据
常见问题
Middleware Query 是什么?
Natural-language read-only querying for MySQL, Redis, and MongoDB with explicit connection configuration (host, port, username, password), guarded query plan... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 194 次。
如何安装 Middleware Query?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install middleware-query」即可一键安装,无需额外配置。
Middleware Query 是免费的吗?
是的,Middleware Query 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Middleware Query 支持哪些平台?
Middleware Query 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Middleware Query?
由 gakkiismywife(@gakkiismywife)开发并维护,当前版本 v1.0.0。
推荐 Skills