← 返回 Skills 市场
sql-splitter
作者
fish1981bimmer
· GitHub ↗
· v2.2.0
· MIT-0
196
总下载
0
收藏
0
当前安装
6
版本数
在 OpenClaw 中安装
/install sql-splitter
功能描述
拆分 SQL 文件为独立文件(存储过程、函数、视图、触发器、表结构、索引、约束),自动分析依赖并生成合并脚本
安全使用建议
This skill appears to do what it says: split SQL files and produce per-object .sql files with dependency-aware merge scripts. Before installing or running it, consider the following:
- Checkpoint pickle risk: The checkpoint system serializes data using Python's pickle module and loads from ~/.sql_splitter_checkpoints. Pickle deserialization can execute arbitrary code if an attacker can place a crafted .checkpoint file there. Only resume or load checkpoints you created yourself; do not import checkpoint files from untrusted sources. If you are uneasy, inspect the checkpoint files or replace/patch the code to use JSON instead of pickle.
- Local filesystem writes: The tool will create config and checkpoint directories under your home directory and write split output to chosen output dirs. Ensure you run it with an account that has appropriate filesystem permissions and avoid running on a system with sensitive files in paths the tool might be pointed at.
- Untrusted SQL: Treat input SQL files from untrusted sources cautiously. While the tool appears offline-only, SQL can contain commands that, when executed against a database, cause side effects. This tool only parses and writes files, but do not run the generated scripts against production databases without review.
- Review/scan code: The package includes multiple scripts and tests; if you will use this in production, consider reviewing the included Python files (especially checkpoint.py and config_manager.py) or running them in an isolated environment (container, VM) first.
If you want higher assurance, ask the author for a signed release, or request the checkpoint implementation be changed to a safe serialization format (JSON) and for explicit permission controls on checkpoint/config directories.
功能分析
Type: OpenClaw Skill
Name: sql-splitter
Version: 2.2.0
The SQL splitter tool is a feature-rich utility that includes a GUI, batch processing, and session persistence. It is classified as suspicious primarily due to a critical security vulnerability in `scripts/checkpoint.py`, where `pickle.load` is used to deserialize local state files, which could be exploited for arbitrary code execution (RCE) if the checkpoint files are tampered with. Additionally, the tool automatically creates and manages hidden directories in the user's home folder (`~/.sql_splitter_checkpoints` and `~/.sql_splitter_configs`) for state and configuration storage. While these behaviors are risky, they appear to be unintentional flaws or standard tool behaviors rather than intentional malware, as no evidence of data exfiltration or malicious intent was found.
能力评估
Purpose & Capability
Name/description match the delivered artifacts: multiple split_sql scripts, a dependency analyzer, GUI, batch/preview, checkpoint and config managers, and unit tests. All declared requirements (no env vars, no external binaries) align with a pure-Python local tool for splitting SQL.
Instruction Scope
SKILL.md instructs running the included Python scripts (GUI or CLI) under ~/.openclaw/skills/sql-splitter/scripts — behavior matches purpose. The runtime instructions and code perform file reads/writes on user-specified inputs and create outputs in configurable output directories. However, the checkpoint module uses pickle to serialize/deserialize checkpoint objects from ~/.sql_splitter_checkpoints; loading pickle files is unsafe if those files are tampered with or obtained from untrusted sources.
Install Mechanism
Instruction-only skill (no install spec). All code is included in the skill bundle; nothing is downloaded or executed from external URLs. Dependencies are standard Python modules (tkinter, pyyaml optional). No high-risk install steps detected.
Credentials
The skill requests no environment variables or external credentials. It stores configs and checkpoints under per-user directories (~/.sql_splitter_configs and ~/.sql_splitter_checkpoints) which is typical and proportional to a local file-processing tool.
Persistence & Privilege
always=false and the skill is user-invocable only. The tool creates persistent files in the user's home (configs and checkpoint files). That persistence is expected for resume/config features but increases attack surface (see pickle usage). The skill does not request elevated system privileges nor modify other skills' configs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install sql-splitter - 安装完成后,直接呼叫该 Skill 的名称或使用
/sql-splitter触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.2.0
v2.2: GUI界面、断点续传、批量并行处理、结果预览对比、配置文件管理
v2.1.1
更新版本信息:SKILL.md 和 split_sql_v21.py 中的版本号从 v2.0 更新为 v2.1
v2.1.0
v2.1 新功能:进度条显示、详细错误处理、Dry-run 预览模式
v2.0.2
修复重复文件问题:添加去重逻辑,避免同一对象被多个正则表达式重复匹配。去重标准:相同起始位置、对象类型、对象名称。解决 SQL Server 存储过程产生重复文件的问题。新增去重功能测试用例。
v2.0.0
v2.0: 边界检测重写(BEGIN/END深度匹配)、依赖分析改进、提取common.py、方言适配合并脚本、新增37个单元测试
v1.1.0
sql-splitter v1.1.0
- 新增索引支持:CREATE INDEX, CREATE UNIQUE INDEX
- 新增约束支持:ALTER TABLE ADD CONSTRAINT
- 现已支持所有六种方言中的索引与约束识别
- 兼容 SQL Server 的 CLUSTERED/NONCLUSTERED 选项
- 支持 Oracle/达梦的 BITMAP 索引
元数据
常见问题
sql-splitter 是什么?
拆分 SQL 文件为独立文件(存储过程、函数、视图、触发器、表结构、索引、约束),自动分析依赖并生成合并脚本. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 196 次。
如何安装 sql-splitter?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install sql-splitter」即可一键安装,无需额外配置。
sql-splitter 是免费的吗?
是的,sql-splitter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
sql-splitter 支持哪些平台?
sql-splitter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 sql-splitter?
由 fish1981bimmer(@fish1981bimmer)开发并维护,当前版本 v2.2.0。
推荐 Skills