db-migration SKILL.md skillA
db-migration from chainlesschain/chainlesschain is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add chainlesschain/chainlesschain/db-migration@v1.0.0Pins v1.0.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- chainlesschain/chainlesschain
- Path
desktop-app-vue/src/main/ai-engine/cowork/skills/builtin/db-migration/SKILL.md- Versions recorded
- 3
- Latest version
- v1.0.0, committed Aug 28, 2026
- First version recorded
- Jun 3, 2026
- Size
- 3,681 bytes
- Repository stars
- 11
- License
- a license file GitHub does not identify
数据库迁移技能 - Schema检查、迁移脚本生成、漂移检测、索引优化.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 数据库迁移技能 ## 描述 管理数据库 Schema 演进:检查当前结构、生成迁移脚本、检测代码与数据库的漂移、优化索引、生成测试数据。支持 SQLite 和 PostgreSQL。 ## 使用方法 ``` /db-migration [操作] [选项] ``` ## 操作 ### Schema 检查 ``` /db-migration --inspect ``` 分析当前数据库结构: - 表列表及列信息 - 主键和外键关系 - 索引和约束 - 数据量统计 ### 生成迁移脚本 ``` /db-migration --generate "描述变更内容" ``` 从自然语言描述生成 SQL 迁移: - UP 脚本(应用变更) - DOWN 脚本(回滚变更) - 数据安全检查(避免数据丢失) - 向后兼容性验证 ### 漂移检测 ``` /db-migration --drift ``` 对比代码中的 Schema 定义与实际数据库: - 缺失的表/列 - 类型不匹配 - 索引差异 - 修复建议 ### 索引优化 ``` /db-migration --optimize-indexes ``` 分析查询模式建议索引优化: - 缺失索引(频繁查询但无索引) - 冗余索引(重复或未使用) - 复合索引建议 - EXPLAIN ANALYZE 输出分析 ### 生成种子数据 ``` /db-migration --seed <table_name> ``` 为表生成测试数据: - 符合约束的随机数据 - 外键关系维护 - 可配置数量 ## 支持的数据库 | 数据库 | Schema 来源 | 说明 | | ---------- | ------------------------- | ----------------------- | | SQLite | database.js, \*.db | ChainlessChain 主数据库 | | PostgreSQL | Spring Boot entities, DDL | 后端服务数据库 | ## 输出格式 ### 迁移脚本 ```sql -- Migration: 004_add_tags_to_notes -- Created: 2026-02-16 -- Description: Add tags column to notes table -- UP ALTER TABLE notes ADD COLUMN tags TEXT DEFAULT '[]'; …
Read the whole file at its exact version.
How to install
mdr add chainlesschain/chainlesschain/db-migration@sha256:5fb256e876f5cf12The line at the top of this page pins the label v1.0.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_d2qzqg6rkqio5yqi)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Jun 3, 2026 and Aug 28, 2026, about one every 43 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.0.0 latest | 2026-08-28 | 44248c7 | 3,681 B | A | view · diff |
| v1.0.0 | 2026-08-28 | c29953e | 3,664 B | A | view · diff |
| v1.0.0 | 2026-06-03 | 3b0b2dc | 3,558 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3681 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
chainlesschain/chainlesschain · 11 stars · license a license file GitHub does not identify · pushed 2026-11-02 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_d2qzqg6rkqio5yqi GET https://markdownregistry.com/api/v1/resolve?ref=chainlesschain/chainlesschain/db-migration GET https://markdownregistry.com/api/v1/blob/5fb256e876f5cf12203f62d3e787f26ef8e2b2bc3d39692e6f76f767955c919a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from chainlesschain/chainlesschain
Every file in chainlesschain/chainlesschain