← Back to Skills Marketplace
sql-splitter
by
fish1981bimmer
· GitHub ↗
· v2.2.0
· MIT-0
196
Downloads
0
Stars
0
Active Installs
6
Versions
Install in OpenClaw
/install sql-splitter
Description
拆分 SQL 文件为独立文件(存储过程、函数、视图、触发器、表结构、索引、约束),自动分析依赖并生成合并脚本
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install sql-splitter - After installation, invoke the skill by name or use
/sql-splitter - Provide required inputs per the skill's parameter spec and get structured output
Version History
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 索引
Metadata
Frequently Asked Questions
What is sql-splitter?
拆分 SQL 文件为独立文件(存储过程、函数、视图、触发器、表结构、索引、约束),自动分析依赖并生成合并脚本. It is an AI Agent Skill for Claude Code / OpenClaw, with 196 downloads so far.
How do I install sql-splitter?
Run "/install sql-splitter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is sql-splitter free?
Yes, sql-splitter is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does sql-splitter support?
sql-splitter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created sql-splitter?
It is built and maintained by fish1981bimmer (@fish1981bimmer); the current version is v2.2.0.
More Skills