ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

tg-mysql-design

MySQL数据库设计助手。根据业务规则文档和存量SQL DDL脚本,设计符合阿里巴巴规范的MySQL 5.7/8.0建表语句。当用户提到"数据库设计"、"建表语句"、"DDL"、"表结构设计"、"CREATE TABLE"等关键词时触发。支持读取业务规则文档(.md文件)、SQL脚本(.sql文件),输出遵循阿里云RDS规范的数据库表设计。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/2320117707/tg-mysql-design
Or

What This Skill Does

The tg-mysql-design skill serves as an intelligent database architect assistant for MySQL 5.7 and 8.0 environments. It streamlines the lifecycle of database schema design by parsing business requirement documents (.md) and existing SQL scripts. The agent enforces strict naming conventions, data type selection, and indexing strategies that align with industry-standard practices, such as Alibaba's development guidelines. By automating the boilerplate creation of DDL scripts, the skill ensures consistency in audit fields, proper storage engine configuration, and character encoding, drastically reducing the time required to architect scalable relational databases.

Installation

To integrate this skill into your OpenClaw environment, execute the following command in your terminal or assistant console: clawhub install openclaw/skills/skills/2320117707/tg-mysql-design

Use Cases

  • New System Architecture: Quickly bootstrap a full set of MySQL table definitions based on a functional specification document.
  • Legacy Refactoring: Analyze existing .sql files to identify anti-patterns, propose optimizations, and migrate legacy structures to modern standards.
  • Team Standardization: Ensure that all database schemas generated across different team members adhere to a unified style, naming convention, and audit logging requirement.
  • DDL Optimization: Generate efficient index strategies for complex business entities while maintaining logical deletion protocols.

Example Prompts

  1. "我有一个关于电商订单系统的业务规则说明文件(order_system.md),请帮我根据这些规则设计 MySQL 8.0 的建表语句,要求包含审计字段和合理的索引。"
  2. "这是我现有的用户表 DDL:[粘贴SQL],请分析其结构是否符合阿里巴巴数据库规范,并优化性能建议。"
  3. "请基于业务需求设计一个符合 MySQL 5.7 标准的库存管理模块,表名以 inventory_ 开头,并包含对应的逻辑删除和审计字段。"

Tips & Limitations

  • Contextual Awareness: Always provide the full business requirement file or context; the agent excels when provided with specific field relationships and state transition rules.
  • Review Mandatory: While the skill follows rigorous architectural rules, human verification is always required for complex foreign key constraints and production-level migration plans.
  • Encoding: The agent forces utf8mb4 encoding; ensure your application connection strings support this standard before deployment.
  • Data Privacy: Ensure that input files do not contain sensitive production credentials or proprietary data you do not wish to be processed.

Metadata

Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-2320117707-tg-mysql-design": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#mysql#database-design#ddl#sql#architecture
Safety Score: 4/5

Flags: file-read