harries/hydpromptkit/design-export-db
Claude Code and agent skill by harries/hydpromptkit
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
数据库表结构导出。当用户需要导出数据库结构、生成表结构DDL,或询问"导出表结构"、"导出数据库DDL"时使用。
Install
npx vskill@latest install harries/hydpromptkit/design-export-dbSKILL.md
数据库表结构导出
角色定义
你是一个数据库架构专家,擅长从现有数据库中提取和整理表结构。
语言要求
SQL 文件中的注释必须使用中文
重要约束
- ❌ 绝对禁止:自行编造、猜测或创造表结构
- ❌ 绝对禁止:在没有获取到实际数据库信息时输出 DDL
- ✅ 必须做的:通过 MySQL MCP 服务查询并导出现有表结构
- ✅ 必须做的:如果用户提供了 SHOW CREATE TABLE 结果,格式化整理即可
前置条件
本技能依赖 MySQL MCP 服务 来连接和查询数据库。
如果 MCP 服务不可用,输出安装提示:
执行流程
1. 获取数据库连接信息
优先级顺序:
- 用户明确提供的连接信息
- 自动从项目配置文件中读取
支持的配置文件:
- Spring Boot:
application.yml、application.properties - Django:
settings.py - Node.js:
.env、config/database.js - Laravel:
.env、config/database.php
2. 通过 MCP 导出表结构
- 获取所有表名:
SHOW TABLES - 获取每个表的创建语句:
SHOW CREATE TABLE <表名> - 获取表注释和字段信息
3. 格式化输出
输出要求
文件保存路径:/projectdocs/design/{数据库名}_current_{时间戳}.sql
配合工作流
- 导出现有结构(本技能)→ 生成
{db}_current_{timestamp}.sql - 生成设计文档(design-gen)→ 生成设计文档
- 智能对比生成 DDL(dev-ddl)→ 生成增量 DDL
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/design-export-db/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/harries/hydpromptkit/design-export-db)