← Back to Skills Marketplace
ink5725

Schema Migrator

by InkLin · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
39
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install schema-migrator
Description
Applies pending database migration files against the target database
README (SKILL.md)

迁移执行器

概述

读取索引分析器生成的 Schema 建议文件,验证并对目标数据库执行索引清理操作。记录已执行的清理到数据库。

使用场景

  • Schema 优化:根据分析建议执行索引清理
  • CI/CD 集成:在部署流水线中自动执行 Schema 变更
  • 索引维护:基于结构化建议安全执行索引变更

使用方法

  1. 读取 /root/.schema/recommendation.json 获取待清理索引列表。
  2. 验证索引名合法性(仅允许 idx_ 前缀的标识符)。
  3. 执行索引删除操作并记录结果。
  4. 输出执行报告 JSON。

输出格式

{
  "execution_timestamp": "2026-06-01T12:00:10",
  "migrations_executed": ["idx_users_email_unique"],
  "errors": [],
  "status": "completed"
}

实现代码

scripts/migrate.py

Usage Guidance
Install only after the publisher clearly documents that the skill drops indexes, exactly which database and indexes it can affect, how recommendation.json is produced and trusted, and how to preview, approve, audit, and roll back changes. Use least-privilege database credentials and test on a non-production copy first.
Capability Assessment
Purpose & Capability
The stated migration purpose does not coherently match the reported behavior of reading a recommendation file and dropping database indexes, which is high-impact schema mutation authority.
Instruction Scope
The destructive index-drop behavior is not clearly scoped to reviewed migration files or bounded by an explicit target database, dry-run, confirmation, or rollback process.
Install Mechanism
No separate installer or persistence mechanism was evidenced, but the included runtime script would execute privileged database operations if invoked with capable credentials.
Credentials
Database DDL authority can be proportionate for migrations only when the operations are explicit and reviewed; recommendation-driven DROP INDEX operations are under-scoped for the advertised purpose.
Persistence & Privilege
No background persistence is indicated, but the skill uses direct schema-changing privilege and could permanently alter database performance or constraints when run.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install schema-migrator
  3. After installation, invoke the skill by name or use /schema-migrator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
schema-migrator 1.0.0 - Initial release. - Applies pending database migration files to the target database. - Validates and removes database indexes based on structured recommendations. - Logs all executed changes and outputs a JSON report. - Designed for schema optimization, CI/CD integration, and index maintenance.
Metadata
Slug schema-migrator
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Schema Migrator?

Applies pending database migration files against the target database. It is an AI Agent Skill for Claude Code / OpenClaw, with 39 downloads so far.

How do I install Schema Migrator?

Run "/install schema-migrator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Schema Migrator free?

Yes, Schema Migrator is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Schema Migrator support?

Schema Migrator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Schema Migrator?

It is built and maintained by InkLin (@ink5725); the current version is v1.0.0.

💬 Comments