Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

SQL智能助手

v1.0.0

SQL智能助手,支持SQL执行、重写优化、质量分析、数据分析、智能补全、Schema查询、批量执行、数据导入导出。 使用场景: - 用户说"执行这个SQL" → execute 或直接 dbskiter sql "SELECT..." - 用户说"优化这个SQL" → rewrite - 用户说"分析SQL质量"...

0· 31·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for magicczc/dbskiter-sql-master.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "SQL智能助手" (magicczc/dbskiter-sql-master) from ClawHub.
Skill page: https://clawhub.ai/magicczc/dbskiter-sql-master
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install dbskiter-sql-master

ClawHub CLI

Package manager switcher

npx clawhub@latest install dbskiter-sql-master
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
The SKILL.md explicitly requires running the external CLI 'dbskiter' for all functionality (execute, rewrite, analyze, import/export, batch, schema, etc.), but the skill metadata declares no required binaries, no install steps, and no primary credential. That mismatch (calling a specific CLI while not declaring it) is an incoherence: a consumer would reasonably need the dbskiter binary and database credentials to use this skill.
!
Instruction Scope
Runtime instructions tell the agent to execute arbitrary SQL (including batch files and imports) and to read/write files (export/import, batch <file>). Those actions are within the stated SQL-assistant purpose, but the instructions do not specify where database credentials/config are read from or any limits on file paths. This leaves open the possibility that the skill will access local files or privileged DBs in ways the user didn't expect.
Install Mechanism
No install spec or code is provided (instruction-only skill), so nothing will be written to disk by the skill installer itself. This is lower risk, but it shifts attention to the external CLI 'dbskiter' which the instructions rely on being present.
!
Credentials
The skill declares no required environment variables or credentials, yet its commands require a --database argument and implicitly depend on whatever credentials/config the 'dbskiter' CLI uses (env vars, config files, or system keychains). The absence of any declared credential requirements is disproportionate and ambiguous: the agent running these commands could end up using existing local DB credentials or config without the user realizing.
Persistence & Privilege
Flags show always:false and standard model invocation allowed. The skill does not request persistent presence or modifications to other skills. Autonomous invocation is allowed (default) — that is normal but combined with the other concerns increases potential impact.
What to consider before installing
This skill looks like a sensible SQL helper, but it depends on an external tool ('dbskiter') and will run arbitrary SQL and file import/export commands. Before installing: 1) verify the skill's source/trustworthiness and where 'dbskiter' comes from; 2) confirm how database credentials are supplied (env vars, ~/.dbskiter, system keychain) and avoid exposing production credentials — prefer a read-only or sandbox DB user; 3) be aware batch/import commands can read local files and export can write arbitrary paths; 4) if you don't control or trust the dbskiter binary, don't enable the skill or run it against sensitive data. Ask the author to declare the required binary, how credentials/config are used, and any filesystem expectations before using in production.

Like a lobster shell, security has layers — review code before you run it.

latestvk9746f5d0pd6fgszen1s8pvr0s85qv4g
31downloads
0stars
1versions
Updated 7h ago
v1.0.0
MIT-0

SQL Master Skill

目标

帮助用户执行SQL、优化SQL、分析SQL质量、理解数据结构。

何时使用

当用户提到以下关键词时使用此skill:

用户说法执行命令说明
"执行SQL" / "跑一下这个SQL"dbskiter --output-mode=ai --database=<name> sql "<SQL>"dbskiter --output-mode=ai --database=<name> sql execute "<SQL>"执行SQL语句
"优化SQL" / "重写SQL"dbskiter --output-mode=ai --database=<name> sql rewrite "<SQL>"重写SQL优化性能
"分析SQL" / "SQL质量"dbskiter --output-mode=ai --database=<name> sql analyze "<SQL>"分析SQL质量评分
"分析数据" / "数据统计"dbskiter --output-mode=ai --database=<name> sql data "<SQL>"分析查询结果数据特征
"SQL补全" / "自动完成"dbskiter --output-mode=ai --database=<name> sql complete "<部分SQL>"智能补全建议
"表结构" / "Schema"dbskiter --output-mode=ai --database=<name> sql schema --table=<表名>查看表结构
"有哪些表"dbskiter --output-mode=ai --database=<name> sql schema列出所有表
"批量执行SQL文件"dbskiter --output-mode=ai --database=<name> sql batch <文件>批量执行文件中的SQL
"导出数据"dbskiter --output-mode=ai --database=<name> sql export --table=<表名> --output=<文件>导出表数据
"导入数据"dbskiter --output-mode=ai --database=<name> sql import <文件> --table=<表名>导入数据到表

核心命令(9个)

1. 执行SQL

dbskiter --output-mode=ai --database=<数据库名> sql execute "<SQL语句>"

参数

  • --params='{"key": "value"}':SQL参数(JSON格式)
  • --limit=100:限制返回行数

示例

# 基础查询
dbskiter --output-mode=ai --database=prod sql execute "SELECT * FROM users LIMIT 10"

# 带参数
dbskiter --output-mode=ai --database=prod sql execute "SELECT * FROM users WHERE age > %(age)s" --params='{"age": 18}'

# 限制返回行数
dbskiter --output-mode=ai --database=prod sql execute "SELECT * FROM orders" --limit=50

2. 重写SQL优化

dbskiter --output-mode=ai --database=<数据库名> sql rewrite "<SQL语句>"

功能

  • 展开 SELECT * 为具体字段
  • 优化 WHERE 条件
  • 推荐索引
  • 重写低效JOIN

示例

# 优化SELECT *
dbskiter --output-mode=ai --database=prod sql rewrite "SELECT * FROM users WHERE id = 1"
# 输出:SELECT id, name, email FROM users WHERE id = 1

# 优化复杂查询
dbskiter --output-mode=ai --database=prod sql rewrite "SELECT * FROM orders o JOIN users u ON o.user_id = u.id WHERE u.status = 'active'"

3. 分析SQL质量

dbskiter --output-mode=ai --database=<数据库名> sql analyze "<SQL语句>"

输出

  • 质量评分(0-100分)
  • 等级(A/B/C/D/F)
  • 问题列表
  • 优化建议

评分标准

  • 90-100分:A级(优秀)
  • 80-89分:B级(良好)
  • 70-79分:C级(一般)
  • 60-69分:D级(较差)
  • <60分:F级(危险)

示例

dbskiter --output-mode=ai --database=prod sql analyze "SELECT * FROM users WHERE email = 'test@test.com'"

4. 数据分析

dbskiter --output-mode=ai --database=<数据库名> sql data "<查询SQL>"

功能:分析查询结果的数据特征

  • 每列的数据类型
  • 空值数量
  • 唯一值数量
  • 数值列的统计(最小/最大/平均值)
  • 示例值

示例

# 分析订单数据
dbskiter --output-mode=ai --database=prod sql data "SELECT * FROM orders WHERE created_at > '2024-01-01'"

# 分析用户数据
dbskiter --output-mode=ai --database=prod sql data "SELECT age, city, status FROM users"

5. SQL智能补全

dbskiter --output-mode=ai --database=<数据库名> sql complete "<部分SQL>"

功能:根据部分SQL提供补全建议

  • 表名补全
  • 字段名补全
  • SQL关键字补全
  • 函数补全

示例

# 补全表名
dbskiter --output-mode=ai --database=prod sql complete "SELECT * FROM "

# 补全字段
dbskiter --output-mode=ai --database=prod sql complete "SELECT id, name, "

# 补全WHERE条件
dbskiter --output-mode=ai --database=prod sql complete "SELECT * FROM users WHERE "

6. Schema查询

# 列出所有表
dbskiter --output-mode=ai --database=<数据库名> sql schema

# 查看指定表结构
dbskiter --output-mode=ai --database=<数据库名> sql schema --table=<表名>

输出

  • 所有表名列表
  • 表字段详情(名称、类型、是否可空、默认值)
  • 索引信息

示例

# 列出所有表
dbskiter --output-mode=ai --database=prod sql schema

# 查看users表结构
dbskiter --output-mode=ai --database=prod sql schema --table=users

# 查看orders表结构和索引
dbskiter --output-mode=ai --database=prod sql schema --table=orders

7. 导出数据

# 导出表数据
dbskiter --output-mode=ai --database=<数据库名> sql export --table=<表名> --output=<文件路径> --format=<格式>

# 导出查询结果
dbskiter --output-mode=ai --database=<数据库名> sql export --query="<SQL>" --output=<文件路径> --format=<格式>

参数

  • --table: 表名(与--query二选一)
  • --query: SQL查询语句(与--table二选一)
  • --output, -o: 输出文件路径(必需)
  • --format, -f: 导出格式(csv/json/sql,默认csv)
  • --where: WHERE条件(仅table模式)
  • --limit: 限制导出行数

示例

# 导出users表为CSV
dbskiter --output-mode=ai --database=prod sql export --table=users --output=users.csv

# 导出为JSON格式
dbskiter --output-mode=ai --database=prod sql export --table=users --output=users.json --format=json

# 导出查询结果
dbskiter --output-mode=ai --database=prod sql export --query="SELECT * FROM orders WHERE status='pending'" --output=pending_orders.csv

# 只导出前1000行
dbskiter --output-mode=ai --database=prod sql export --table=users --output=users.csv --limit=1000

8. 导入数据

dbskiter --output-mode=ai --database=<数据库名> sql import <文件路径> --table=<表名> --format=<格式>

参数

  • --table, -t: 目标表名(必需)
  • --format, -f: 文件格式(csv/json/sql,默认csv)
  • --columns: 指定列名(逗号分隔,CSV格式用)
  • --batch-size: 批量插入大小(默认1000)

示例

# 从CSV导入
dbskiter --output-mode=ai --database=prod sql import users.csv --table=users

# 从JSON导入
dbskiter --output-mode=ai --database=prod sql import users.json --table=users --format=json

# 从SQL文件导入
dbskiter --output-mode=ai --database=prod sql import users.sql --format=sql

# 指定列名导入
dbskiter --output-mode=ai --database=prod sql import data.csv --table=users --columns=id,name,email

# 调整批量大小
dbskiter --output-mode=ai --database=prod sql import large_data.csv --table=users --batch-size=500

9. 批量执行SQL文件

dbskiter --output-mode=ai --database=<数据库名> sql batch <文件路径>

功能:批量执行文件中的SQL语句

示例

# 批量执行SQL文件
dbskiter --output-mode=ai --database=prod sql batch queries.sql

AI决策流程

场景1:用户说"执行这个SQL"

步骤1:提取用户提供的SQL
步骤2:执行 dbskiter --output-mode=ai --database=<name> sql execute "<SQL>"
步骤3:展示结果(最多50行)
步骤4:告知总行数和耗时

场景2:用户说"优化这个SQL"

步骤1:提取用户提供的SQL
步骤2:执行 dbskiter --output-mode=ai --database=<name> sql rewrite "<SQL>"
步骤3:展示优化后的SQL和解释
步骤4:如果质量评分<80,建议进一步优化

场景3:用户说"查看表结构"

步骤1:提取表名
步骤2:执行 dbskiter --output-mode=ai --database=<name> sql schema --table=<表名>
步骤3:展示表结构和索引信息

Comments

Loading comments...