当用户希望“通过建表语句 + 慢 SQL 自动优化索引”时使用此 Skill,支持 MySQL、Oracle、PostgreSQL。脚本使用 Python,自动解析 DDL 与慢 SQL 中的 WHERE/JOIN/ORDER BY 列,生成候选索引及对应数据库的 CREATE INDEX 语句,并输出到文件。

v1.0.0

当用户希望“通过建表语句 + 慢 SQL 自动优化索引”时使用此 Skill,支持 MySQL、Oracle、PostgreSQL。脚本使用 Python,自动解析 DDL 与慢 SQL 中的 WHERE/JOIN/ORDER BY 列,生成候选索引及对应数据库的 CREATE INDEX 语句,并输出到文件。

0· 61·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill name/description match the included Python script and SKILL.md: both describe parsing DDL and slow SQL to produce candidate CREATE INDEX statements for mysql/oracle/postgresql. There are no unrelated environment variables, binaries, or external services requested.
Instruction Scope
SKILL.md instructs the agent to run the bundled Python script with user-supplied paths for DDL and slow SQL files and to output a .md/.json result. The instructions do not direct reading other system files, environment variables, or sending data to external endpoints.
Install Mechanism
No install spec is provided (instruction-only). The skill includes a local Python script that the agent runs; there are no downloads, package installs, or external installers referenced.
Credentials
The skill requires no environment variables, credentials, or config paths. The code operates on files provided by the user and does not access secrets or external services.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request persistent presence or modify other skills or system-wide settings.
Assessment
This skill appears to do what it says: it heuristically parses supplied DDL + slow SQL and emits candidate CREATE INDEX statements. Before using in production: (1) review generated DDL carefully — the tool is regex-based and can mis-parse complex DDL/queries; (2) validate suggestions with EXPLAIN/EXPLAIN ANALYZE / AWR / pg_stat_statements in a safe environment; (3) do not pass arbitrary sensitive files as the input paths — the script will read any files you provide; (4) ensure you run the script with a trusted Python interpreter (python3) and review the bundled script if you have strict security policies. If you enable autonomous invocation for agents, be aware an agent with access to files could run this script on any file paths it can access — grant file access accordingly.

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

latestvk971epnkf5faz95gcvwaybk9fs84d7h8

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Comments