SQL Query Optimizer
v1.0.0Analyze and optimize SQL queries by providing performance analysis, index recommendations, execution plan interpretation, and optimization suggestions.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name and description match the actual content: static analysis and optimization suggestions for SQL. The skill requests no unrelated binaries, env vars, or installs.
Instruction Scope
SKILL.md and skill.yaml contain only static analysis guidance (patterns, suggestions). They do not request database connections, read files, or transmit data. Minor implementation inconsistency: the JavaScript snippet refers to applySuggestions (not defined) and the example output uses an arbitrary 'LIMIT 100' — a functional/accuracy issue but not a security red flag.
Install Mechanism
No install spec or code to download; this is instruction-only, which minimizes disk/network risk.
Credentials
The skill requires no environment variables, credentials, or config paths — proportional and minimal for its stated purpose.
Persistence & Privilege
always:false and no sign of writing or modifying other skills or system-wide configs. Autonomous invocation is allowed (platform default) but not elevated.
Assessment
This skill appears coherent and low-risk: it only provides static SQL suggestions and does not request credentials or install software. Before using it in automated workflows, keep in mind: (1) it does not connect to your database or run EXPLAIN by itself — paste actual EXPLAIN output if you want real execution-plan analysis; (2) suggestions are generic and may be incorrect or overly blunt (example shows LIMIT 100); (3) the implementation snippet has a missing applySuggestions function, so optimized output may be a placeholder. If you plan to integrate the skill with an agent that has database access, avoid supplying production DB credentials unless you trust the skill's source; consider asking the author for a homepage or repo to verify provenance.Like a lobster shell, security has layers — review code before you run it.
databaselatestsql
SQL Query Optimizer
分析并优化 SQL 查询,提升数据库性能。
功能
- 查询性能分析
- 索引建议
- 执行计划解读
- SQL 优化建议
触发词
- "SQL优化"
- "查询优化"
- "sql optimization"
- "慢查询"
检测问题
-- 检测 SELECT * 问题
SELECT * FROM users WHERE id = 1;
-- 检测缺少 LIMIT
SELECT name FROM users;
-- 检测前导通配符
SELECT * FROM users WHERE name LIKE '%john%';
优化建议
- 避免 SELECT *,只查询需要的列
- 添加 WHERE 条件和 LIMIT
- 避免 LIKE 前导通配符
- 使用索引列
- 避免嵌套子查询
- 使用 EXPLAIN 分析执行计划
输出示例
{
"original": "SELECT * FROM users WHERE name LIKE '%john%'",
"suggestions": [
"避免使用 SELECT *,只查询需要的列",
"避免 LIKE 前导通配符",
"添加 LIMIT 限制返回数量"
],
"optimized": "SELECT id, name FROM users WHERE name LIKE '%john%' LIMIT 100"
}
Comments
Loading comments...
